Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
4.5 KiB

  1. /* ----------------------------------------------------------------------
  2. Module: ULS.DLL (Service Provider)
  3. File: spmtg.h
  4. Content: This file contains the meeting place object definition.
  5. History:
  6. 12/9/96 Chu, Lon-Chan [lonchanc]
  7. Created.
  8. Copyright (c) Microsoft Corporation 1996-1997
  9. ---------------------------------------------------------------------- */
  10. #ifndef _ILS_SP_MTGOBJ_H_
  11. #define _ILS_SP_MTGOBJ_H_
  12. #ifdef ENABLE_MEETING_PLACE
  13. #include <pshpack8.h>
  14. enum
  15. {
  16. ENUM_MTGATTR_CN,
  17. ENUM_MTGATTR_MTG_TYPE,
  18. ENUM_MTGATTR_MEMBER_TYPE,
  19. ENUM_MTGATTR_DESCRIPTION,
  20. ENUM_MTGATTR_HOST_NAME,
  21. ENUM_MTGATTR_IP_ADDRESS,
  22. /* -- the above are resolvable -- */
  23. ENUM_MTGATTR_MEMBERS,
  24. ENUM_MTGATTR_CLIENT_SIG,
  25. ENUM_MTGATTR_TTL,
  26. /* -- the above are changeable standard attributes for RTConf -- */
  27. ENUM_MTGATTR_OBJECT_CLASS,
  28. ENUM_MTGATTR_O,
  29. ENUM_MTGATTR_C,
  30. COUNT_ENUM_MTGATTR
  31. };
  32. #define COUNT_ENUM_MTGINFO (ENUM_MTGATTR_TTL + 1) // exclude uid, o, c
  33. #define COUNT_ENUM_DIRMTGINFO (ENUM_MTGATTR_IP_ADDRESS + 1) // count of attrs in dir dlg
  34. #define COUNT_ENUM_RESMTGINFO (ENUM_MTGATTR_IP_ADDRESS + 1) // count of attrs resolvable
  35. extern const TCHAR *c_apszMtgStdAttrNames[COUNT_ENUM_MTGATTR];
  36. #define STR_MTG_NAME ((TCHAR *) c_apszMtgStdAttrNames[ENUM_MTGATTR_CN])
  37. #define STR_MTG_MEMBERS ((TCHAR *) c_apszMtgStdAttrNames[ENUM_MTGATTR_MEMBERS])
  38. #define STR_MTG_IP_ADDR ((TCHAR *) c_apszMtgStdAttrNames[ENUM_MTGATTR_IP_ADDRESS])
  39. #define STR_MTG_TTL ((TCHAR *) c_apszMtgStdAttrNames[ENUM_MTGATTR_TTL])
  40. #define STR_DEF_MTG_BASE_DN ((TCHAR *) &c_szDefMtgBaseDN[0])
  41. #define MTGOBJ_F_NAME 0x0001
  42. #define MTGOBJ_F_MTG_TYPE 0x0002
  43. #define MTGOBJ_F_MEMBER_TYPE 0x0004
  44. #define MTGOBJ_F_DESCRIPTION 0x0008
  45. #define MTGOBJ_F_HOST_NAME 0x0010
  46. #define MTGOBJ_F_IP_ADDRESS 0x0020
  47. typedef struct
  48. {
  49. DWORD dwFlags;
  50. TCHAR *apszStdAttrValues[COUNT_ENUM_MTGATTR];
  51. ANY_ATTRS AnyAttrs;
  52. TCHAR szMtgType[INTEGER_STRING_LENGTH];
  53. TCHAR szMemberType[INTEGER_STRING_LENGTH];
  54. TCHAR szIPAddress[INTEGER_STRING_LENGTH];
  55. TCHAR szFlags[INTEGER_STRING_LENGTH];
  56. TCHAR szTTL[INTEGER_STRING_LENGTH];
  57. TCHAR szClientSig[INTEGER_STRING_LENGTH];
  58. TCHAR szGuid[sizeof (GUID) * 2 + 2];
  59. }
  60. MTG_INFO;
  61. #define MTGOBJ_SIGNATURE ((ULONG) 0x98007206UL)
  62. class SP_CMeeting
  63. {
  64. friend class SP_CRefreshScheduler;
  65. public:
  66. SP_CMeeting ( DWORD dwContext );
  67. ~SP_CMeeting ( VOID );
  68. ULONG AddRef ( VOID );
  69. ULONG Release ( VOID );
  70. HRESULT Register ( ULONG uRespID, SERVER_INFO *pServerInfo, LDAP_MEETINFO *pInfo );
  71. HRESULT UnRegister ( ULONG uRespID );
  72. VOID SetRegNone ( VOID ) { m_RegStatus = ILS_REG_STATUS_NONE; }
  73. VOID SetRegLocally ( VOID ) { m_RegStatus = ILS_REG_STATUS_LOCALLY; }
  74. VOID SetRegRemotely ( VOID ) { m_RegStatus = ILS_REG_STATUS_REMOTELY; }
  75. BOOL IsRegistered ( VOID ) { return (m_RegStatus > ILS_REG_STATUS_NONE); }
  76. BOOL IsRegLocally ( VOID ) { return (m_RegStatus == ILS_REG_STATUS_LOCALLY); }
  77. BOOL IsRegRemotely ( VOID ) { return (m_RegStatus == ILS_REG_STATUS_REMOTELY); }
  78. BOOL IsValidObject ( VOID ) { return m_uSignature == MTGOBJ_SIGNATURE; }
  79. SERVER_INFO *GetServerInfo ( VOID ) { return &m_ServerInfo; }
  80. TCHAR *GetMtgName ( VOID ) { return m_pszMtgName; }
  81. ULONG GetTTL ( VOID ) { return m_uTTL; }
  82. DWORD GetContext ( VOID ) { return m_dwContext; }
  83. protected:
  84. HRESULT SendRefreshMsg ( VOID );
  85. private:
  86. HRESULT CreateRegModArr ( LDAPMod ***pppMod );
  87. HRESULT UpdateIPAddress ( VOID );
  88. ULONG m_uSignature;
  89. LONG m_cRefs;
  90. MTG_INFO m_MtgInfo;
  91. TCHAR *m_pszMtgName;
  92. TCHAR *m_pszDN;
  93. SERVER_INFO m_ServerInfo;
  94. TCHAR *m_pszRefreshFilter;
  95. REG_STATUS m_RegStatus;
  96. DWORD m_dwIPAddress;
  97. ULONG m_uTTL;
  98. DWORD m_dwContext;
  99. };
  100. #define MtgGetPrefixCount() 1
  101. #define MtgGetPrefixString() g_pszMtgPrefix
  102. HRESULT MtgSetAttrs ( SERVER_INFO *pServerInfo, TCHAR *pszMtgName, LDAP_MEETINFO *pInfo, ULONG uRespID );
  103. HRESULT MtgCreateSetAttrsModArr ( LDAPMod ***pppMod, MTG_INFO *pMtgInfo );
  104. VOID MtgFillModArrAttr ( LDAPMod *pMod, MTG_INFO *pMtgInfo, INT nIndex );
  105. HRESULT MtgCacheInfo ( LDAP_MEETINFO *pInfo, MTG_INFO *pMtgInfo );
  106. HRESULT MtgUpdateMembers ( ULONG uNotifyMsg, SERVER_INFO *pServerInfo, TCHAR *pszMtgName, ULONG cMembers, TCHAR *pszMemberNames, ULONG uRespID );
  107. HRESULT MtgCreateUpdateMemberModArr ( ULONG uNotifyMsg, LDAPMod ***pppMod, ULONG cMembers, TCHAR *pszMemberNames );
  108. #include <poppack.h>
  109. #endif // ENABLE_MEETING_PLACE
  110. #endif // _ILS_SP_MTGOBJ_H_