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.

353 lines
10 KiB

  1. //****************************************************************************
  2. //
  3. // Module: ULS.DLL
  4. // File: ulsldap.h
  5. // Content: This file contains the declaration for LDAP function calls
  6. // History:
  7. // Tue 08-Oct-1996 08:54:45 -by- Lon-Chan Chu [lonchanc]
  8. //
  9. // Copyright (c) Microsoft Corporation 1996-1997
  10. //
  11. //****************************************************************************
  12. #ifndef _ILS_LDAP_H_
  13. #define _ILS_LDAP_H_
  14. #include <pshpack8.h>
  15. //
  16. // Asynchronous request result:
  17. //
  18. // **********************************************************************************
  19. // Message wParam lParam
  20. // **********************************************************************************
  21. //
  22. #define WM_ILS_ASYNC_RES (WM_USER+0x1001)
  23. // client object
  24. #define WM_ILS_REGISTER_CLIENT (WM_ILS_ASYNC_RES+0) // uMsgID hResult
  25. #define WM_ILS_UNREGISTER_CLIENT (WM_ILS_ASYNC_RES+1) // uMsgID hResult
  26. #define WM_ILS_SET_CLIENT_INFO (WM_ILS_ASYNC_RES+2) // uMsgID hResult
  27. #define WM_ILS_RESOLVE_CLIENT (WM_ILS_ASYNC_RES+3)// uMsgID PLDAP_USERINFO_RES
  28. #define WM_ILS_ENUM_CLIENTS (WM_ILS_ASYNC_RES+4)// uMsgID PLDAP_ENUM
  29. #define WM_ILS_ENUM_CLIENTINFOS (WM_ILS_ASYNC_RES+5)// uMsgID PLDAP_ENUM
  30. // protocol object
  31. #define WM_ILS_REGISTER_PROTOCOL (WM_ILS_ASYNC_RES+6) // uMsgID hResult
  32. #define WM_ILS_UNREGISTER_PROTOCOL (WM_ILS_ASYNC_RES+7) // uMsgID hResult
  33. #define WM_ILS_SET_PROTOCOL_INFO (WM_ILS_ASYNC_RES+8) // uMsgID hResult
  34. #define WM_ILS_RESOLVE_PROTOCOL (WM_ILS_ASYNC_RES+9)// uMsgID PLDAP_PROTINFO_RES
  35. #define WM_ILS_ENUM_PROTOCOLS (WM_ILS_ASYNC_RES+10)// uMsgID PLDAP_ENUM
  36. #ifdef ENABLE_MEETING_PLACE
  37. // meeting object
  38. #define WM_ILS_REGISTER_MEETING (WM_ILS_ASYNC_RES+11)
  39. #define WM_ILS_UNREGISTER_MEETING (WM_ILS_ASYNC_RES+12)
  40. #define WM_ILS_SET_MEETING_INFO (WM_ILS_ASYNC_RES+13)
  41. #define WM_ILS_RESOLVE_MEETING (WM_ILS_ASYNC_RES+14)
  42. #define WM_ILS_ENUM_MEETINGINFOS (WM_ILS_ASYNC_RES+15)
  43. #define WM_ILS_ENUM_MEETINGS (WM_ILS_ASYNC_RES+16)
  44. #define WM_ILS_ADD_ATTENDEE (WM_ILS_ASYNC_RES+17)
  45. #define WM_ILS_REMOVE_ATTENDEE (WM_ILS_ASYNC_RES+18)
  46. #define WM_ILS_ENUM_ATTENDEES (WM_ILS_ASYNC_RES+19)
  47. #define WM_ILS_CANCEL (WM_ILS_ASYNC_RES+20)
  48. #else
  49. #define WM_ILS_CANCEL (WM_ILS_ASYNC_RES+11)
  50. #endif
  51. #define WM_ILS_LAST_ONE WM_ILS_CANCEL
  52. // client notification
  53. #define WM_ILS_CLIENT_NEED_RELOGON (WM_ILS_ASYNC_RES+51)// fPrimary pszServerName
  54. #define WM_ILS_CLIENT_NETWORK_DOWN (WM_ILS_ASYNC_RES+52)// fPrimary pszServerName
  55. #ifdef ENABLE_MEETING_PLACE
  56. // meeting notification
  57. #define WM_ILS_MEETING_NEED_RELOGON (WM_ILS_ASYNC_RES+61)
  58. #define WM_ILS_MEETING_NETWORK_DOWN (WM_ILS_ASYNC_RES+62)
  59. #endif
  60. //
  61. // Constants
  62. //
  63. #define INVALID_OFFSET 0
  64. #define INVALID_USER_FLAGS -1 // used in LDAP_USERINFO dwFlags
  65. #ifdef ENABLE_MEETING_PLACE
  66. #define INVALID_MEETING_FLAGS 0 // used in LDAP_MEETINFO dwFlags
  67. #define INVALID_MEETING_TYPE 0 // used in LDAP_MEETINFO lMeetingType
  68. #define INVALID_ATTENDEE_TYPE 0 // used in LDAP_MEETINFO lAttendeeType
  69. #endif
  70. //
  71. // Asynchronous response info structures
  72. //
  73. typedef struct tagLDAPAsyncInfo
  74. {
  75. ULONG uMsgID;
  76. }
  77. LDAP_ASYNCINFO, *PLDAP_ASYNCINFO;
  78. typedef struct tagLDAPEnum
  79. {
  80. ULONG uSize;
  81. HRESULT hResult;
  82. ULONG cItems;
  83. ULONG uOffsetItems;
  84. }
  85. LDAP_ENUM, *PLDAP_ENUM;
  86. typedef struct tagLDAPClientInfo
  87. {
  88. ULONG uSize;
  89. // user object attributes
  90. ULONG uOffsetCN;
  91. ULONG uOffsetFirstName;
  92. ULONG uOffsetLastName;
  93. ULONG uOffsetEMailName;
  94. ULONG uOffsetCityName;
  95. ULONG uOffsetCountryName;
  96. ULONG uOffsetComment;
  97. ULONG uOffsetIPAddress;
  98. DWORD dwFlags; // 0, private; 1, public
  99. // app object attributes
  100. ULONG uOffsetAppName;
  101. ULONG uOffsetAppMimeType;
  102. GUID AppGuid;
  103. // app extended attributes to add, modify, and remove
  104. ULONG cAttrsToAdd;
  105. ULONG uOffsetAttrsToAdd;
  106. ULONG cAttrsToModify;
  107. ULONG uOffsetAttrsToModify;
  108. ULONG cAttrsToRemove;
  109. ULONG uOffsetAttrsToRemove;
  110. // for notification of enum-user-infos
  111. ULONG cAttrsReturned;
  112. ULONG uOffsetAttrsReturned;
  113. }
  114. LDAP_CLIENTINFO, *PLDAP_CLIENTINFO;
  115. typedef struct tagLDAPClientInfoRes
  116. {
  117. ULONG uSize;
  118. HRESULT hResult;
  119. LDAP_CLIENTINFO lci;
  120. }
  121. LDAP_CLIENTINFO_RES, *PLDAP_CLIENTINFO_RES;
  122. typedef struct tagLDAPProtocolInfo
  123. {
  124. ULONG uSize;
  125. // protocol standard attributes
  126. ULONG uOffsetName;
  127. ULONG uPortNumber;
  128. ULONG uOffsetMimeType;
  129. }
  130. LDAP_PROTINFO, *PLDAP_PROTINFO;
  131. typedef struct tagLDAPProtInfoRes
  132. {
  133. ULONG uSize;
  134. HRESULT hResult;
  135. LDAP_PROTINFO lpi;
  136. }
  137. LDAP_PROTINFO_RES, *PLDAP_PROTINFO_RES;
  138. #ifdef ENABLE_MEETING_PLACE
  139. typedef struct tagLDAPMeetingInfo
  140. {
  141. ULONG uSize;
  142. // meeting standard attributes
  143. LONG lMeetingPlaceType;
  144. LONG lAttendeeType;
  145. ULONG uOffsetMeetingPlaceID;
  146. ULONG uOffsetDescription;
  147. ULONG uOffsetHostName;
  148. ULONG uOffsetHostIPAddress;
  149. // meeting extended attributes to add, modify, and remove
  150. ULONG cAttrsToAdd;
  151. ULONG uOffsetAttrsToAdd;
  152. ULONG cAttrsToModify;
  153. ULONG uOffsetAttrsToModify;
  154. ULONG cAttrsToRemove;
  155. ULONG uOffsetAttrsToRemove;
  156. // for notification of enum-meeting-infos
  157. ULONG cAttrsReturned;
  158. ULONG uOffsetAttrsReturned;
  159. }
  160. LDAP_MEETINFO, *PLDAP_MEETINFO;
  161. #endif
  162. #ifdef ENABLE_MEETING_PLACE
  163. typedef struct tagLDAPMeetingInfoRes
  164. {
  165. ULONG uSize;
  166. HRESULT hResult;
  167. LDAP_MEETINFO lmi;
  168. }
  169. LDAP_MEETINFO_RES, *PLDAP_MEETINFO_RES;
  170. #endif
  171. // Initialization
  172. HRESULT UlsLdap_Initialize (
  173. HWND hwndCallback);
  174. HRESULT UlsLdap_Deinitialize (void);
  175. HRESULT UlsLdap_Cancel (
  176. ULONG uMsgID);
  177. // Clients related
  178. HRESULT UlsLdap_RegisterClient (
  179. DWORD_PTR dwContext,
  180. SERVER_INFO *pServer,
  181. PLDAP_CLIENTINFO pCleintInfo,
  182. PHANDLE phClient,
  183. PLDAP_ASYNCINFO pAsyncInfo );
  184. HRESULT UlsLdap_UnRegisterClient (
  185. HANDLE hClient,
  186. PLDAP_ASYNCINFO pAsyncInfo );
  187. HRESULT UlsLdap_SetClientInfo (
  188. HANDLE hClient,
  189. PLDAP_CLIENTINFO pInfo,
  190. PLDAP_ASYNCINFO pAsyncInfo );
  191. HRESULT UlsLdap_EnumClients (
  192. SERVER_INFO *pServer,
  193. LPTSTR pszFilter,
  194. PLDAP_ASYNCINFO pAsyncInfo );
  195. HRESULT UlsLdap_ResolveClient (
  196. SERVER_INFO *pServer,
  197. LPTSTR pszUserName,
  198. LPTSTR pszAppName,
  199. LPTSTR pszProtName,
  200. LPTSTR pszAttrNameList,
  201. ULONG cAttrNames,
  202. PLDAP_ASYNCINFO pAsyncInfo );
  203. HRESULT UlsLdap_EnumClientInfos (
  204. SERVER_INFO *pServer,
  205. LPTSTR pszAttrNameList,
  206. ULONG cAttrNames,
  207. LPTSTR pszFilter,
  208. PLDAP_ASYNCINFO pAsyncInfo );
  209. // Protocols related
  210. HRESULT UlsLdap_RegisterProtocol (
  211. HANDLE hApp,
  212. PLDAP_PROTINFO pProtInfo,
  213. PHANDLE phProt,
  214. PLDAP_ASYNCINFO pAsyncInfo );
  215. HRESULT UlsLdap_UnRegisterProtocol (
  216. HANDLE hProt,
  217. PLDAP_ASYNCINFO pAsyncInfo );
  218. HRESULT UlsLdap_VirtualUnRegisterProtocol (
  219. HANDLE hProt );
  220. HRESULT UlsLdap_SetProtocolInfo (
  221. HANDLE hProt,
  222. PLDAP_PROTINFO pInfo,
  223. PLDAP_ASYNCINFO pAsyncInfo );
  224. HRESULT UlsLdap_EnumProtocols (
  225. SERVER_INFO *pServer,
  226. LPTSTR pszUserName,
  227. LPTSTR pszAppName,
  228. PLDAP_ASYNCINFO pAsyncInfo );
  229. HRESULT UlsLdap_ResolveProtocol (
  230. SERVER_INFO *pServer,
  231. LPTSTR pszUserName,
  232. LPTSTR pszAppName,
  233. LPTSTR pszProtName,
  234. LPTSTR pszAnyAttrNameList,
  235. ULONG cAttrNames,
  236. PLDAP_ASYNCINFO pAsyncInfo );
  237. #ifdef ENABLE_MEETING_PLACE
  238. // Meetings related
  239. HRESULT UlsLdap_RegisterMeeting(
  240. DWORD dwContext,
  241. SERVER_INFO *pServer,
  242. PLDAP_MEETINFO pMeetInfo,
  243. PHANDLE phMeeting,
  244. PLDAP_ASYNCINFO pAsyncInfo );
  245. HRESULT UlsLdap_UnRegisterMeeting(
  246. HANDLE hMeeting,
  247. PLDAP_ASYNCINFO pAsyncInfo );
  248. HRESULT UlsLdap_EnumMeetingInfos(
  249. SERVER_INFO *pServer,
  250. LPTSTR pszAnyAttrNameList,
  251. ULONG cAnyAttrNames,
  252. LPTSTR pszFilter,
  253. PLDAP_ASYNCINFO pAsyncInfo );
  254. HRESULT UlsLdap_EnumMeetings(
  255. SERVER_INFO *pServer,
  256. LPTSTR pszFilter,
  257. PLDAP_ASYNCINFO pAsyncInfo );
  258. HRESULT UlsLdap_ResolveMeeting(
  259. SERVER_INFO *pServer,
  260. LPTSTR pszMeetingID,
  261. LPTSTR pszAnyAttrNameList,
  262. ULONG cAnyAttrNames,
  263. PLDAP_ASYNCINFO pAsyncInfo );
  264. HRESULT UlsLdap_SetMeetingInfo(
  265. SERVER_INFO *pServer,
  266. LPTSTR pszMeetingID,
  267. PLDAP_MEETINFO pMeetInfo,
  268. PLDAP_ASYNCINFO pAsyncInfo );
  269. HRESULT UlsLdap_AddAttendee(
  270. SERVER_INFO *pServer,
  271. LPTSTR pszMeetingID,
  272. ULONG cAttendees,
  273. LPTSTR pszAttendeeID,
  274. PLDAP_ASYNCINFO pAsyncInfo );
  275. HRESULT UlsLdap_RemoveAttendee(
  276. SERVER_INFO *pServer,
  277. LPTSTR pszMeetingID,
  278. ULONG cAttendees,
  279. LPTSTR pszAttendeeID,
  280. PLDAP_ASYNCINFO pAsyncInfo );
  281. HRESULT UlsLdap_EnumAttendees(
  282. SERVER_INFO *pServer,
  283. LPTSTR pszMeetingID,
  284. LPTSTR pszFilter,
  285. PLDAP_ASYNCINFO pAsyncInfo );
  286. #endif // ENABLE_MEETING_PLACE
  287. const TCHAR *UlsLdap_GetStdAttrNameString (
  288. ILS_STD_ATTR_NAME StdName );
  289. const TCHAR *UlsLdap_GetExtAttrNamePrefix ( VOID );
  290. #include <poppack.h>
  291. #endif // _ILS_LDAP_H_
  292.