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.

436 lines
12 KiB

  1. import "oaidl.idl";
  2. import "ocidl.idl";
  3. #define UUID_IAppletSession e65dc590-a4d9-11d2-b724-00104bc51339
  4. #define UUID_IAppletSessionNotify f7c10ec0-a4d9-11d2-b724-00104bc51339
  5. #define UUID_IApplet 07970b30-a4da-11d2-b724-00104bc51339
  6. #define UUID_IAppletNotify 16153670-a4da-11d2-b724-00104bc51339
  7. #include "nmapptyp.h"
  8. /* ------ octet string ------ */
  9. typedef struct tagAppletOctetString
  10. {
  11. ULONG cbStrSize;
  12. [size_is(cbStrSize)] BYTE* pbValue;
  13. }
  14. AppletOctetString;
  15. typedef struct tagAppletLongString
  16. {
  17. ULONG nStrLen;
  18. [size_is(nStrLen)] ULONG *pnValue;
  19. }
  20. AppletLongString;
  21. /* ------ object, session, and registry keys ------ */
  22. typedef struct tagAppletObjectKey
  23. {
  24. AppletKeyType eType;
  25. AppletLongString lstrObjectID;
  26. AppletOctetString ostrH221NonStdID;
  27. }
  28. AppletObjectKey;
  29. typedef struct tagAppletSessionKey
  30. {
  31. AppletObjectKey AppletProtocolKey;
  32. AppletSessionID nSessionID;
  33. }
  34. AppletSessionKey;
  35. typedef struct tagAppletRegistryKey
  36. {
  37. AppletSessionKey SessionKey;
  38. AppletOctetString ostrResourceID;
  39. }
  40. AppletRegistryKey;
  41. /* ------ registry request ------ */
  42. typedef struct tagAppletRegistryRequest
  43. {
  44. AppletRegistryCommand eCommand;
  45. AppletRegistryKey RegistryKey;
  46. // register channel
  47. AppletChannelID nChannelID;
  48. // set parameter
  49. AppletOctetString ostrParamValue;
  50. AppletModificationRights eParamModifyRights;
  51. // allocate handle
  52. ULONG cHandles;
  53. }
  54. AppletRegistryRequest;
  55. /* ------ channel request ------ */
  56. typedef struct tagAppletChannelRequest
  57. {
  58. AppletChannelCommand eCommand;
  59. AppletChannelID nChannelID;
  60. ULONG cUsers;
  61. [size_is(cUsers)] AppletUserID *aUsers;
  62. }
  63. AppletChannelRequest;
  64. /* ------ token request ------ */
  65. typedef struct tagAppletTokenRequest
  66. {
  67. AppletTokenCommand eCommand;
  68. AppletTokenID nTokenID;
  69. AppletUserID uidGiveTo;
  70. HRESULT hrGiveResponse;
  71. }
  72. AppletTokenRequest;
  73. /* ------ capability ------ */
  74. typedef struct tagAppletCapabilityID
  75. {
  76. AppletCapIDType eType;
  77. AppletObjectKey nNonStdCap;
  78. ULONG nStdCap;
  79. }
  80. AppletCapabilityID;
  81. typedef struct tagAppletCapability
  82. {
  83. AppletCapabilityID CapID;
  84. AppletCapabilityClass CapClass;
  85. ULONG cEntities;
  86. }
  87. AppletCapability;
  88. typedef struct tagAppletCapability2
  89. {
  90. AppletCapabilityID CapID;
  91. AppletOctetString *pCapData;
  92. }
  93. AppletCapability2;
  94. typedef struct tagAppletProtocolEntity
  95. {
  96. AppletSessionKey SessionKey;
  97. AppletChannelType eStartupChannelType;
  98. BOOL fMustBeInvoked;
  99. ULONG cExpectedCapabilities;
  100. [size_is(cExpectedCapabilities)] AppletCapability **apExpectedCapabilities;
  101. }
  102. AppletProtocolEntity;
  103. //
  104. // T120 Applet Session Callback
  105. //
  106. typedef struct tagAppletRecord
  107. {
  108. AppletNodeID nNodeID;
  109. AppletEntityID nEntityID;
  110. BOOL fEnrolledActively;
  111. BOOL fConductingCapable;
  112. AppletChannelType eStartupChannelType;
  113. AppletUserID nAppletUserID;
  114. ULONG cCapabilities;
  115. [size_is(cCapabilities)] AppletCapability2 **apCapabilities;
  116. }
  117. AppletRecord;
  118. typedef struct tagAppletRoster
  119. {
  120. AppletSessionKey SessionKey;
  121. BOOL fRosterChanged;
  122. ULONG nInstanceNumber;
  123. BOOL fNodesAdded;
  124. BOOL fNodesRemoved;
  125. BOOL fCapabilitiesChanged;
  126. ULONG cRecords;
  127. [size_is(cRecords)] AppletRecord **apAppletRecords;
  128. ULONG cCapabilities;
  129. [size_is(cCapabilities)] AppletCapability **apCapabilities;
  130. }
  131. AppletRoster;
  132. typedef struct tagAppletRegistryItem
  133. {
  134. AppletRegistryItemType ItemType;
  135. // channel
  136. AppletChannelID nChannelID;
  137. // token
  138. AppletTokenID nTokenID;
  139. // parameter
  140. AppletOctetString ostrParamValue;
  141. }
  142. AppletRegistryItem;
  143. typedef struct tagAppletRegistryEntryOwner
  144. {
  145. BOOL fEntryOwned;
  146. AppletNodeID nOwnerNodeID;
  147. AppletEntityID nOwnerEntityID;
  148. }
  149. AppletRegistryEntryOwner;
  150. typedef struct tagAppletSessionRequest
  151. {
  152. // session specific
  153. AppletSessionKey SessionKey;
  154. // applet enroll
  155. AppletChannelType nStartupChannelType;
  156. // collapsed capability
  157. ULONG cCollapsedCaps;
  158. [size_is(cCollapsedCaps)] AppletCapability **apCollapsedCaps;
  159. // non-collapsing capability
  160. ULONG cNonCollapsedCaps;
  161. [size_is(cNonCollapsedCaps)] AppletCapability2 **apNonCollapsedCaps;
  162. // static channels
  163. ULONG cStaticChannels;
  164. [size_is(cStaticChannels)] AppletChannelID *aStaticChannels;
  165. // dynamic channels
  166. ULONG cDynamicChannels;
  167. [size_is(cDynamicChannels)] AppletRegistryKey *aChannelRegistryKeys;
  168. }
  169. AppletSessionRequest;
  170. [
  171. object,
  172. uuid(UUID_IAppletSessionNotify),
  173. pointer_default(unique)
  174. ]
  175. interface IAppletSessionNotify : IUnknown
  176. {
  177. HRESULT JoinSessionConfirm(
  178. [in] HRESULT hrResult,
  179. [in] AppletUserID uidMyself,
  180. [in] AppletNodeID nidMyself,
  181. [in] AppletSessionID sidMyself,
  182. [in] AppletEntityID eidMyself,
  183. [in] ULONG cDynamicChannels,
  184. [in,size_is(cDynamicChannels)] AppletChannelID aDynamicChannels[]);
  185. HRESULT LeaveSessionIndication(
  186. [in] AppletReason eReason,
  187. [in] AppletUserID uidLeave);
  188. HRESULT SendDataIndication(
  189. [in] BOOL fUniformSend,
  190. [in] AppletUserID uidInitiator,
  191. [in] AppletChannelID nChannelID,
  192. [in] AppletPriority eDataPriority,
  193. [in] AppletOctetString Data);
  194. HRESULT RosterReportIndication(
  195. [in] ULONG cRosters,
  196. [in,size_is(cRosters)] AppletRoster **apAppRosters);
  197. HRESULT InquireRosterConfirm(
  198. [in] HRESULT hrResult,
  199. [in] ULONG cRosters,
  200. [in,size_is(cRosters)] AppletRoster **apAppRosters);
  201. HRESULT InvokeAppletConfirm(
  202. [in] AppletRequestTag nReqTag,
  203. [in] HRESULT hrResult);
  204. HRESULT RegistryConfirm(
  205. [in] AppletRegistryCommand eCommand,
  206. [in] HRESULT hrResult,
  207. [in] AppletRegistryKey *pRegistryKey,
  208. [in] AppletRegistryItem *pRegistryItem,
  209. [in] AppletRegistryEntryOwner *pEntryOwner,
  210. [in] AppletModificationRights eRights);
  211. HRESULT AllocateHandleConfirm(
  212. [in] HRESULT hrResult,
  213. [in] ULONG nFirstHandle,
  214. [in] ULONG cHandles);
  215. HRESULT ChannelConfirm(
  216. [in] AppletChannelCommand eCommand,
  217. [in] HRESULT hrResult,
  218. [in] AppletChannelID nChannelID);
  219. HRESULT ChannelIndication(
  220. [in] AppletChannelCommand eCommand,
  221. [in] AppletChannelID nChannelID,
  222. [in] AppletReason eReason,
  223. [in] AppletUserID uidManager);
  224. HRESULT TokenConfirm(
  225. [in] AppletTokenCommand eCommand,
  226. [in] HRESULT hrResult,
  227. [in] AppletTokenID nTokenID);
  228. HRESULT TestTokenConfirm(
  229. [in] AppletTokenID nTokenID,
  230. [in] AppletTokenStatus eStatus);
  231. HRESULT TokenIndication(
  232. [in] AppletTokenCommand eCommand,
  233. [in] AppletReason eReason,
  234. [in] AppletTokenID nTokenID,
  235. [in] AppletUserID uidInitiator);
  236. };
  237. [
  238. object,
  239. uuid(UUID_IAppletSession),
  240. pointer_default(unique)
  241. ]
  242. interface IAppletSession : IUnknown
  243. {
  244. /* ------ Basic Info ------ */
  245. HRESULT GetConfID([out] AppletConfID *pnConfID);
  246. HRESULT IsThisNodeTopProvider([out] BOOL *pfTopProvider);
  247. /* ------ Join Conference ------ */
  248. HRESULT Join([in] AppletSessionRequest *pRequest);
  249. HRESULT Leave(void);
  250. /* ------ Send Data ------ */
  251. HRESULT SendData(
  252. [in] BOOL fUniformSend,
  253. [in] AppletChannelID nChannelID,
  254. [in] AppletPriority ePriority,
  255. [in] ULONG cbBufSize,
  256. [in,size_is(cbBufSize)] BYTE *pBuffer);
  257. /* ------ Invoke Applet ------ */
  258. HRESULT InvokeApplet(
  259. [out] AppletRequestTag *pnReqTag,
  260. [in] AppletProtocolEntity *pAPE,
  261. [in] ULONG cNodes,
  262. [in,size_is(cNodes)] AppletNodeID aNodeIDs[]);
  263. /* ------ Inquiry ------ */
  264. HRESULT InquireRoster([in] AppletSessionKey *pSessionKey);
  265. /* ------ Registry Services ------ */
  266. HRESULT RegistryRequest([in] AppletRegistryRequest *pRequest);
  267. /* ------ Channel Services ------ */
  268. HRESULT ChannelRequest([in] AppletChannelRequest *pRequest);
  269. /* ------ Token Services ------ */
  270. HRESULT TokenRequest([in] AppletTokenRequest *pRequest);
  271. /* ------ Notification registration / unregistration------ */
  272. HRESULT Advise( [in] IAppletSessionNotify *pNotify,
  273. [out] DWORD *pdwCookie);
  274. HRESULT UnAdvise([in] DWORD dwCookie);
  275. };
  276. [
  277. object,
  278. uuid(UUID_IAppletNotify),
  279. pointer_default(unique)
  280. ]
  281. interface IAppletNotify : IUnknown
  282. {
  283. HRESULT PermitToJoinSessionIndication(
  284. [in] AppletConfID nConfID,
  285. [in] BOOL fPermissionGranted);
  286. HRESULT AutoJoinSessionIndication(
  287. [in] IAppletSession *pSession,
  288. [in] HRESULT hrResult,
  289. [in] AppletUserID uidMyself,
  290. [in] AppletNodeID nidMyself,
  291. [in] AppletSessionID sidMyself,
  292. [in] AppletEntityID eidMyself,
  293. [in] ULONG cDynamicChannels,
  294. [in,size_is(cDynamicChannels)] AppletChannelID aDynamicChannels[]);
  295. };
  296. [
  297. object,
  298. uuid(UUID_IApplet),
  299. pointer_default(unique)
  300. ]
  301. interface IApplet : IUnknown
  302. {
  303. /* ------ Initialization ------ */
  304. HRESULT Initialize(void);
  305. /* ------ Auto Join ------ */
  306. HRESULT RegisterAutoJoin([in] AppletSessionRequest *pRequest);
  307. HRESULT UnregisterAutoJoin(void);
  308. /* ------ Session ------ */
  309. HRESULT CreateSession(
  310. [out] IAppletSession **ppSession,
  311. [in] AppletConfID nConfID);
  312. /* ------ Notification registration / unregistration------ */
  313. HRESULT Advise( [in] IAppletNotify *pNotify,
  314. [out] DWORD *pdwCookie);
  315. HRESULT UnAdvise([in] DWORD dwCookie);
  316. };
  317. // These version numbers should match the version attribute in the library definitoen below
  318. cpp_quote("enum { NmApplet_Ver_Major = 1};")
  319. cpp_quote("enum { NmApplet_Ver_Minor = 0};")
  320. [
  321. uuid(8C3ADF96-CCFE-11d2-AD10-00C04F72DD47),
  322. version(1.0),
  323. helpstring("NmApplet 1.0 Type Library")
  324. ]
  325. library NmApplet
  326. {
  327. importlib("stdole2.tlb");
  328. [
  329. uuid(8C3ADF99-CCFE-11d2-AD10-00C04F72DD47),
  330. helpstring("NetMeeting Applet")
  331. ]
  332. coclass NmApplet
  333. {
  334. [default] interface IApplet;
  335. };
  336. };