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.

372 lines
9.0 KiB

  1. #ifndef _IT120APPSAP_H_
  2. #define _IT120APPSAP_H_
  3. #include <basetyps.h>
  4. #include "gcc.h"
  5. #include "igccapp.h"
  6. #include "imcsapp.h"
  7. typedef void (CALLBACK *LPFN_APPLET_SESSION_CB) (struct T120AppletSessionMsg *);
  8. typedef void (CALLBACK *LPFN_APPLET_CB) (struct T120AppletMsg *);
  9. /* ------ registry request ------ */
  10. typedef struct tagT120RegistryParameter
  11. {
  12. LPOSTR postrValue;
  13. AppletModificationRights eModifyRights;
  14. }
  15. T120RegistryParameter;
  16. typedef struct tagT120RegistryRequest
  17. {
  18. AppletRegistryCommand eCommand;
  19. GCCRegistryKey *pRegistryKey;
  20. union
  21. {
  22. // register channel
  23. T120ChannelID nChannelID;
  24. // set parameter
  25. T120RegistryParameter Param;
  26. // monitor
  27. BOOL fEnableDelivery;
  28. // allocate handle
  29. ULONG cHandles;
  30. };
  31. }
  32. T120RegistryRequest;
  33. /* ------ channel request ------ */
  34. typedef struct tagT120ChannelRequest
  35. {
  36. AppletChannelCommand eCommand;
  37. T120ChannelID nChannelID;
  38. ULONG cUsers;
  39. T120UserID *aUsers;
  40. }
  41. T120ChannelRequest;
  42. /* ------ token request ------ */
  43. typedef struct tagT120TokenRequest
  44. {
  45. AppletTokenCommand eCommand;
  46. T120TokenID nTokenID;
  47. T120UserID uidGiveTo;
  48. T120Result eGiveResponse;
  49. }
  50. T120TokenRequest;
  51. /* ------ join conference ------ */
  52. typedef struct tagT120ResourceRequest
  53. {
  54. AppletResourceAllocCommand eCommand;
  55. BOOL fImmediateNotification;
  56. T120ChannelID nChannelID;
  57. T120TokenID nTokenID;
  58. GCCRegistryKey RegKey;
  59. }
  60. T120ResourceRequest;
  61. typedef struct tagT120JoinSessionRequest
  62. {
  63. // attach user flags
  64. DWORD dwAttachmentFlags;
  65. // session specific
  66. GCCSessionKey SessionKey;
  67. // applet enroll
  68. BOOL fConductingCapable;
  69. AppletChannelType nStartupChannelType;
  70. ULONG cNonCollapsedCaps;
  71. GCCNonCollCap **apNonCollapsedCaps;
  72. ULONG cCollapsedCaps;
  73. GCCAppCap **apCollapsedCaps;
  74. // static and dynamic channels
  75. ULONG cStaticChannels;
  76. T120ChannelID *aStaticChannels;
  77. ULONG cResourceReqs;
  78. T120ResourceRequest *aResourceReqs;
  79. }
  80. T120JoinSessionRequest;
  81. #undef INTERFACE
  82. #define INTERFACE IT120AppletSession
  83. DECLARE_INTERFACE(IT120AppletSession)
  84. {
  85. STDMETHOD_(void, ReleaseInterface) (THIS) PURE;
  86. STDMETHOD_(void, Advise) (THIS_
  87. IN LPFN_APPLET_SESSION_CB pfnCallback,
  88. IN LPVOID pAppletContext,
  89. IN LPVOID pSessionContext) PURE;
  90. STDMETHOD_(void, Unadvise) (THIS) PURE;
  91. /* ------ basic info ------ */
  92. STDMETHOD_(T120ConfID, GetConfID) (THIS) PURE;
  93. STDMETHOD_(BOOL, IsThisNodeTopProvider) (THIS) PURE;
  94. STDMETHOD_(T120NodeID, GetTopProvider) (THIS) PURE;
  95. /* ------ join/leave ------ */
  96. STDMETHOD_(T120Error, Join) (THIS_
  97. IN T120JoinSessionRequest *) PURE;
  98. STDMETHOD_(void, Leave) (THIS) PURE;
  99. /* ------ send data ------ */
  100. STDMETHOD_(T120Error, AllocateSendDataBuffer) (THIS_
  101. IN ULONG,
  102. OUT void **) PURE;
  103. STDMETHOD_(void, FreeSendDataBuffer) (THIS_
  104. IN void *) PURE;
  105. STDMETHOD_(T120Error, SendData) (THIS_
  106. IN DataRequestType,
  107. IN T120ChannelID,
  108. IN T120Priority,
  109. IN LPBYTE,
  110. IN ULONG,
  111. IN SendDataFlags) PURE;
  112. /* ------ inquiry ------ */
  113. STDMETHOD_(T120Error, InvokeApplet) (THIS_
  114. IN GCCAppProtEntityList *,
  115. IN GCCSimpleNodeList *,
  116. OUT T120RequestTag *) PURE;
  117. STDMETHOD_(T120Error, InquireRoster) (THIS_
  118. IN GCCSessionKey *) PURE;
  119. /* ------ registry services ------ */
  120. STDMETHOD_(T120Error, RegistryRequest) (THIS_
  121. IN T120RegistryRequest *) PURE;
  122. /* ------ channel services ------ */
  123. STDMETHOD_(T120Error, ChannelRequest) (THIS_
  124. IN T120ChannelRequest *) PURE;
  125. /* ------ token services ------ */
  126. STDMETHOD_(T120Error, TokenRequest) (THIS_
  127. IN T120TokenRequest *) PURE;
  128. };
  129. //
  130. // T120 Applet Session Callback
  131. //
  132. typedef struct tagT120JoinSessionConfirm
  133. {
  134. T120Result eResult;
  135. T120Error eError;
  136. IT120AppletSession *pIAppletSession;
  137. T120UserID uidMyself;
  138. T120SessionID sidMyself;
  139. T120EntityID eidMyself;
  140. T120NodeID nidMyself;
  141. // the following two are the same as those in the request structure
  142. ULONG cResourceReqs;
  143. T120ResourceRequest *aResourceReqs;
  144. }
  145. T120JoinSessionConfirm;
  146. typedef struct tagT120ChannelConfirm
  147. {
  148. T120ChannelID nChannelID;
  149. T120Result eResult;
  150. }
  151. T120ChannelConfirm;
  152. typedef struct tagT120ChannelInd
  153. {
  154. T120ChannelID nChannelID;
  155. union
  156. {
  157. T120Reason eReason;
  158. T120UserID nManagerID;
  159. };
  160. }
  161. T120ChannelInd;
  162. typedef struct tagT120TokenConfirm
  163. {
  164. T120TokenID nTokenID;
  165. union
  166. {
  167. T120TokenStatus eTokenStatus;
  168. T120Result eResult;
  169. };
  170. }
  171. T120TokenConfirm;
  172. typedef struct tagT120TokenInd
  173. {
  174. T120TokenID nTokenID;
  175. union
  176. {
  177. T120Reason eReason;
  178. T120UserID nUserID;
  179. };
  180. }
  181. T120TokenInd;
  182. typedef struct tagT120DetachUserInd
  183. {
  184. T120UserID nUserID;
  185. T120Reason eReason;
  186. }
  187. T120DetachUserInd;
  188. // internal use
  189. typedef struct tagT120AttachUserConfirm
  190. {
  191. T120UserID nUserID;
  192. T120Result eResult;
  193. }
  194. T120AttachUserConfirm;
  195. /*
  196. * GCCAppSapMsg
  197. * This structure defines the callback message that is passed from GCC to
  198. * a user application when an indication or confirm occurs.
  199. */
  200. typedef struct T120AppletSessionMsg
  201. {
  202. T120MessageType eMsgType;
  203. LPVOID pAppletContext;
  204. LPVOID pSessionContext;
  205. T120ConfID nConfID;
  206. union
  207. {
  208. T120JoinSessionConfirm JoinSessionConfirm;
  209. T120DetachUserInd DetachUserInd;
  210. GCCAppRosterInquireConfirm AppRosterInquireConfirm;
  211. GCCAppRosterReportInd AppRosterReportInd;
  212. GCCConfRosterInquireConfirm ConfRosterInquireConfirm;
  213. GCCAppInvokeConfirm AppInvokeConfirm;
  214. GCCAppInvokeInd AppInvokeInd;
  215. GCCRegistryConfirm RegistryConfirm;
  216. GCCRegAllocateHandleConfirm RegAllocHandleConfirm;
  217. SendDataIndicationPDU SendDataInd;
  218. T120ChannelConfirm ChannelConfirm;
  219. T120ChannelInd ChannelInd;
  220. T120TokenConfirm TokenConfirm;
  221. T120TokenInd TokenInd;
  222. // will be removed in the future after converting all applets
  223. GCCAppEnrollConfirm AppEnrollConfirm;
  224. T120AttachUserConfirm AttachUserConfirm;
  225. };
  226. }
  227. T120AppletSessionMsg;
  228. typedef struct T120AppletMsg
  229. {
  230. T120MessageType eMsgType;
  231. LPVOID pAppletContext;
  232. LPVOID Reserved1;
  233. T120ConfID nConfID;
  234. union
  235. {
  236. GCCAppPermissionToEnrollInd PermitToEnrollInd;
  237. T120JoinSessionConfirm AutoJoinSessionInd;
  238. };
  239. }
  240. T120AppletMsg;
  241. #undef INTERFACE
  242. #define INTERFACE IT120AppletNotify
  243. DECLARE_INTERFACE(IT120AppletNotify)
  244. {
  245. STDMETHOD_(void, PermitToJoinSessionIndication) (THIS_
  246. IN T120ConfID,
  247. IN BOOL fPermissionGranted) PURE;
  248. STDMETHOD_(void, AutoJoinSessionIndication) (THIS_
  249. IN T120JoinSessionConfirm *) PURE;
  250. };
  251. #undef INTERFACE
  252. #define INTERFACE IT120Applet
  253. DECLARE_INTERFACE(IT120Applet)
  254. {
  255. STDMETHOD_(void, ReleaseInterface) (THIS) PURE;
  256. STDMETHOD_(void, Advise) (THIS_
  257. IN LPFN_APPLET_CB pfnCallback,
  258. IN LPVOID pAppletContext) PURE;
  259. STDMETHOD_(void, Unadvise) (THIS) PURE;
  260. /* ------ Auto Join ------ */
  261. STDMETHOD_(T120Error, RegisterAutoJoin) (THIS_
  262. IN T120JoinSessionRequest *) PURE;
  263. STDMETHOD_(void, UnregisterAutoJoin) (THIS) PURE;
  264. /* ------ Session ------ */
  265. STDMETHOD_(T120Error, CreateSession) (THIS_
  266. OUT IT120AppletSession **,
  267. IN T120ConfID) PURE;
  268. };
  269. //
  270. // T120 Applet SAP Exports
  271. //
  272. #ifdef __cplusplus
  273. extern "C" {
  274. #endif
  275. T120Error WINAPI T120_CreateAppletSAP(IT120Applet **);
  276. void WINAPI T120_GetNodeName(LPSTR, UINT);
  277. #ifdef __cplusplus
  278. }
  279. #endif
  280. #endif // _IT120APPSAP_H_