Source code of Windows XP (NT5)
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.

333 lines
8.5 KiB

  1. #ifndef _IGCCAPP_H_
  2. #define _IGCCAPP_H_
  3. #include <basetyps.h>
  4. #include "gcc.h"
  5. #define GCCAPI_(_type_) virtual _type_ __stdcall
  6. #define GCCAPI GCCAPI_(GCCError)
  7. typedef struct
  8. {
  9. GCCSessionKey *pSessionKey;
  10. BOOL fEnrollActively;
  11. UserID nUserID;
  12. BOOL fConductingCapable;
  13. MCSChannelType nStartupChannelType;
  14. ULONG cNonCollapsedCaps;
  15. GCCNonCollCap **apNonCollapsedCaps;
  16. ULONG cCollapsedCaps;
  17. GCCAppCap **apCollapsedCaps;
  18. BOOL fEnroll;
  19. }
  20. GCCEnrollRequest, *PGCCEnrollRequest;
  21. typedef struct
  22. {
  23. ULONG cNodes;
  24. GCCNodeID *aNodeIDs;
  25. }
  26. GCCSimpleNodeList, *PGCCSimpleNodeList;
  27. typedef struct
  28. {
  29. ULONG cApes;
  30. GCCAppProtocolEntity **apApes;
  31. }
  32. GCCAppProtEntityList, *PGCCAppProtEntityList;
  33. typedef struct
  34. {
  35. GCCConfID nConfID;
  36. ULONG cRosters;
  37. GCCAppRoster **apAppRosters;
  38. GCCResult nResult;
  39. LPVOID pReserved; // do not touch
  40. }
  41. GCCAppRosterInquireConfirm, *PGCCAppRosterInquireConfirm;
  42. typedef struct
  43. {
  44. GCCConfID nConfID;
  45. GCCConfName ConfName;
  46. LPSTR pszConfModifier;
  47. LPWSTR pwszConfDescriptor;
  48. GCCConfRoster *pConfRoster;
  49. GCCResult nResult;
  50. }
  51. GCCConfRosterInquireConfirm, *PGCCConfRosterInquireConfirm;
  52. typedef struct
  53. {
  54. GCCConfID nConfID;
  55. BOOL fPermissionGranted;
  56. }
  57. GCCAppPermissionToEnrollInd, *PGCCAppPermissionToEnrollInd;
  58. typedef struct
  59. {
  60. GCCConfID nConfID;
  61. // GCCSessionKey *pSessionKey;
  62. GCCSessionID sidMyself;
  63. GCCEntityID eidMyself;
  64. GCCNodeID nidMyself;
  65. GCCResult nResult;
  66. GCCRequestTag nReqTag;
  67. }
  68. GCCAppEnrollConfirm, *PGCCAppEnrollConfirm;
  69. typedef struct
  70. {
  71. GCCConfID nConfID;
  72. // GCCAppProtEntityList *pApeList;
  73. GCCResult nResult;
  74. GCCRequestTag nReqTag;
  75. }
  76. GCCAppInvokeConfirm, *PGCCAppInvokeConfirm;
  77. typedef struct
  78. {
  79. GCCConfID nConfID;
  80. GCCAppProtEntityList ApeList;
  81. GCCNodeID nidInvoker;
  82. }
  83. GCCAppInvokeInd, *PGCCAppInvokeInd;
  84. typedef struct
  85. {
  86. GCCConfID nConfID;
  87. ULONG cRosters;
  88. GCCAppRoster **apAppRosters;
  89. LPVOID pReserved; // do not touch
  90. }
  91. GCCAppRosterReportInd, *PGCCAppRosterReportInd;
  92. typedef struct
  93. {
  94. GCCConfID nConfID;
  95. GCCRegistryKey *pRegKey;
  96. GCCRegistryItem *pRegItem;
  97. GCCRegistryEntryOwner EntryOwner;
  98. GCCModificationRights eRights;
  99. GCCResult nResult;
  100. BOOL fDeliveryEnabled; // for monitor confirm only
  101. }
  102. GCCRegistryConfirm, *PGCCRegistryConfirm;
  103. typedef struct
  104. {
  105. GCCConfID nConfID;
  106. ULONG nFirstHandle;
  107. ULONG cHandles;
  108. GCCResult nResult;
  109. }
  110. GCCRegAllocateHandleConfirm, *PGCCRegAllocateHandleConfirm;
  111. typedef struct
  112. {
  113. GCCConfID nConfID;
  114. BOOL fConducted;
  115. GCCNodeID nidConductor;
  116. BOOL fGranted;
  117. GCCResult nResult;
  118. }
  119. GCCConductorInquireConfirm, *PGCCConductorInquireConfirm;
  120. typedef struct
  121. {
  122. GCCConfID nConfID;
  123. BOOL fThisNodeIsGranted;
  124. GCCSimpleNodeList Granted;
  125. GCCSimpleNodeList Waiting;
  126. LPVOID pReserved; // do not touch
  127. }
  128. GCCConductorPermitGrantInd, *PGCCConductorPermitGrantInd;
  129. typedef struct
  130. {
  131. GCCConfID nConfID;
  132. GCCNodeID nidConductor;
  133. }
  134. GCCConductorAssignInd, *PGCCConductorAssignInd;
  135. typedef struct
  136. {
  137. GCCConfID nConfID;
  138. }
  139. GCCConductorReleaseInd, *PConductorReleaseInd;
  140. /*
  141. * GCCAppSapMsg
  142. * This structure defines the callback message that is passed from GCC to
  143. * a user application when an indication or confirm occurs.
  144. */
  145. typedef struct
  146. {
  147. GCCMessageType eMsgType;
  148. LPVOID pAppData;
  149. LPVOID reserved1; // reserved
  150. GCCConfID nConfID; // reserved
  151. union
  152. {
  153. GCCAppPermissionToEnrollInd AppPermissionToEnrollInd;
  154. GCCAppEnrollConfirm AppEnrollConfirm;
  155. GCCAppRosterInquireConfirm AppRosterInquireConfirm;
  156. GCCAppRosterReportInd AppRosterReportInd;
  157. GCCConfRosterInquireConfirm ConfRosterInquireConfirm;
  158. GCCAppInvokeConfirm AppInvokeConfirm;
  159. GCCAppInvokeInd AppInvokeInd;
  160. GCCRegistryConfirm RegistryConfirm;
  161. GCCRegAllocateHandleConfirm RegAllocHandleConfirm;
  162. GCCConductorInquireConfirm ConductorInquireConfirm;
  163. GCCConductorPermitGrantInd ConductorPermitGrantInd;
  164. GCCConductorAssignInd ConductorAssignInd;
  165. GCCConductorReleaseInd ConductorReleaseInd;
  166. };
  167. }
  168. GCCAppSapMsg, *PGCCAppSapMsg;
  169. typedef void (CALLBACK *LPFN_APP_SAP_CB) (GCCAppSapMsg *);
  170. #undef INTERFACE
  171. #define INTERFACE IGCCAppSap
  172. DECLARE_INTERFACE(IGCCAppSap)
  173. {
  174. STDMETHOD_(void, ReleaseInterface) (THIS) PURE;
  175. /* application roster services */
  176. STDMETHOD_(GCCError, AppEnroll) (THIS_
  177. IN GCCConfID,
  178. IN GCCEnrollRequest *,
  179. OUT PGCCRequestTag)
  180. PURE;
  181. STDMETHOD_(GCCError, AppInvoke) (THIS_
  182. IN GCCConfID,
  183. IN GCCAppProtEntityList *,
  184. IN GCCSimpleNodeList *,
  185. OUT PGCCRequestTag)
  186. PURE;
  187. // to acquire one or all full-refresh app roster.
  188. // can be called by both app sap and control sap.
  189. STDMETHOD_(GCCError, AppRosterInquire) (THIS_
  190. IN GCCConfID,
  191. IN GCCSessionKey *,
  192. OUT GCCAppSapMsg **)
  193. PURE;
  194. STDMETHOD_(void, FreeAppSapMsg) (THIS_
  195. IN GCCAppSapMsg *)
  196. PURE;
  197. /* conference roster service */
  198. STDMETHOD_(BOOL, IsThisNodeTopProvider) (THIS_
  199. IN GCCConfID)
  200. PURE;
  201. STDMETHOD_(GCCNodeID, GetTopProvider) (THIS_
  202. IN GCCConfID)
  203. PURE;
  204. // to acquire a full-refresh conf roster.
  205. STDMETHOD_(GCCError, ConfRosterInquire) (THIS_
  206. IN GCCConfID,
  207. OUT GCCAppSapMsg **)
  208. PURE;
  209. /* registry services */
  210. STDMETHOD_(GCCError, RegisterChannel) (THIS_
  211. IN GCCConfID,
  212. IN GCCRegistryKey *,
  213. IN ChannelID)
  214. PURE;
  215. STDMETHOD_(GCCError, RegistryAssignToken) (THIS_
  216. IN GCCConfID,
  217. IN GCCRegistryKey *)
  218. PURE;
  219. STDMETHOD_(GCCError, RegistrySetParameter) (THIS_
  220. IN GCCConfID,
  221. IN GCCRegistryKey *,
  222. IN LPOSTR,
  223. IN GCCModificationRights)
  224. PURE;
  225. STDMETHOD_(GCCError, RegistryRetrieveEntry) (THIS_
  226. IN GCCConfID,
  227. IN GCCRegistryKey *)
  228. PURE;
  229. STDMETHOD_(GCCError, RegistryDeleteEntry) (THIS_
  230. IN GCCConfID,
  231. IN GCCRegistryKey *)
  232. PURE;
  233. STDMETHOD_(GCCError, RegistryMonitor) (THIS_
  234. IN GCCConfID,
  235. IN BOOL fEnableDelivery,
  236. IN GCCRegistryKey *)
  237. PURE;
  238. STDMETHOD_(GCCError, RegistryAllocateHandle) (THIS_
  239. IN GCCConfID,
  240. IN ULONG cHandles)
  241. PURE;
  242. /* conductorship services */
  243. STDMETHOD_(GCCError, ConductorInquire) (THIS_
  244. IN GCCConfID)
  245. PURE;
  246. };
  247. //
  248. // GCC Application Service Access Point exports
  249. //
  250. #ifdef __cplusplus
  251. extern "C" {
  252. #endif
  253. GCCError WINAPI GCC_CreateAppSap(
  254. OUT IGCCAppSap **,
  255. IN LPVOID, // user defined data
  256. IN LPFN_APP_SAP_CB);
  257. #ifdef __cplusplus
  258. }
  259. #endif
  260. #endif // _IGCCAPP_H_