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.

478 lines
13 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright 1995 - 1997 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // Contents: Conferencing Services Object interfaces
  6. //
  7. //----------------------------------------------------------------------------
  8. cpp_quote("//+-------------------------------------------------------------------------")
  9. cpp_quote("//")
  10. cpp_quote("// Microsoft Windows")
  11. cpp_quote("// Copyright 1995-1997 Microsoft Corporation. All Rights Reserved.")
  12. cpp_quote("//")
  13. cpp_quote("// File: imsconf3.h")
  14. cpp_quote("//")
  15. cpp_quote("//--------------------------------------------------------------------------")
  16. import "objidl.idl";
  17. import "oleidl.idl";
  18. import "oaidl.idl";
  19. interface INmManager;
  20. interface INmManagerNotify;
  21. interface INmMember;
  22. interface INmCall;
  23. interface INmCallNotify;
  24. interface INmConference;
  25. interface INmConferenceNotify;
  26. interface INmChannelData;
  27. interface INmChannelDataNotify;
  28. interface IEnumNmMember;
  29. cpp_quote("")
  30. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  31. cpp_quote("//")
  32. cpp_quote("// Constants")
  33. cpp_quote("")
  34. cpp_quote("#define NO_LISTEN_PORT 0")
  35. cpp_quote("#define DEFAULT_LISTEN_PORT 522")
  36. cpp_quote("#define NMMANAGER_SERVICE 0x0001")
  37. cpp_quote("#define NMMANAGER_SERVER 0x0002")
  38. cpp_quote("#define NMMANAGER_CLIENT 0x0004")
  39. cpp_quote("HRESULT WINAPI CreateNmManager(INmManager ** ppMan);")
  40. cpp_quote("")
  41. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  42. cpp_quote("// Error Codes")
  43. cpp_quote("")
  44. cpp_quote("#define NM_E(e) (0x81000000UL | (ULONG) (e))")
  45. cpp_quote("")
  46. cpp_quote("enum {")
  47. cpp_quote("")
  48. cpp_quote("// Call specific error codes")
  49. cpp_quote("//")
  50. cpp_quote(" NM_CALLERR_NOT_INITIALIZED = NM_E(0x0100),") // Local system not initialized
  51. cpp_quote(" NM_CALLERR_NAME_RESOLUTION = NM_E(0x0102),") // Name resolution failed
  52. cpp_quote(" NM_CALLERR_PASSWORD = NM_E(0x0103),") // Invalid conference password
  53. cpp_quote(" NM_CALLERR_CONFERENCE_NAME = NM_E(0x0104),") // Problem with the conference name
  54. cpp_quote(" NM_CALLERR_IN_CONFERENCE = NM_E(0x0105),") // Remote system is in a conference
  55. cpp_quote(" NM_CALLERR_NOT_FOUND = NM_E(0x0106),") // User/Address not found
  56. cpp_quote(" NM_CALLERR_MCU = NM_E(0x0107),") // Can't invite MCU into existing conference
  57. cpp_quote(" NM_CALLERR_REJECTED = NM_E(0x0108),") // Remote system rejected the request
  58. cpp_quote(" NM_CALLERR_INVALID_IPADDRESS = NM_E(0x01F2),") // Tried ip type with invalid ip address
  59. cpp_quote(" NM_CALLERR_HOST_RESOLUTION_FAILED = NM_E(0x01F3),") // Tried computer type with unreachable host name
  60. cpp_quote(" NM_CALLERR_NO_ADDRESS = NM_E(0x01F6),") // No address component
  61. cpp_quote(" NM_CALLERR_INVALID_ADDRESS = NM_E(0x01F7),") // Invalid address component
  62. cpp_quote(" NM_CALLERR_PARAM_ERROR = NM_E(0x01FA),") // Error in parameter syntax
  63. cpp_quote(" NM_CALLERR_SECURITY_MISMATCH = NM_E(0x01FB),") // Desired security didnt match policy or current conference
  64. cpp_quote(" NM_CALLERR_UNESCAPE_ERROR = NM_E(0x01FC),") // Parse error during unescaping
  65. cpp_quote(" NM_CALLERR_ALREADY_CALLING = NM_E(0x01FD),") // Already calling this person
  66. cpp_quote(" NM_CALLERR_LOOPBACK = NM_E(0x01FE),") // Called Local Machine
  67. cpp_quote(" NM_CALLERR_UNKNOWN = NM_E(0x01FF),") // Unknown call error
  68. cpp_quote("")
  69. cpp_quote("// other error codes")
  70. cpp_quote("//")
  71. cpp_quote(" NM_E_NOT_INITIALIZED = NM_E(0x0200),") // INmManager not Initialized
  72. cpp_quote(" NM_E_NO_T120_CONFERENCE = NM_E(0x0202),") // Not in a T.120 data conference
  73. cpp_quote(" NM_E_NOT_ACTIVE = NM_E(0x0203),") // NetMeeting is not running
  74. cpp_quote(" NM_E_USER_CANCELED_SETUP = NM_E(0x0205),") // User canceled NetMeeting setup wizard
  75. cpp_quote(" NM_E_ALREADY_RUNNING = NM_E(0x0206),") // This means that NetMeeting is already running
  76. cpp_quote(" NM_E_SHARING_NOT_AVAILABLE = NM_E(0x0207),") // This means that NetMeeting is already running
  77. cpp_quote("};")
  78. cpp_quote("")
  79. cpp_quote("")
  80. cpp_quote("// INmChannelDataNotify.DataReceived dwFlags")
  81. cpp_quote("#define NM_DF_BROADCAST 0x00000010") // data was broadcast to everyone
  82. cpp_quote("#define NM_DF_PRIVATE 0x00000020") // data was private
  83. cpp_quote("#define NM_DF_SEGMENT_END 0x00000040") // end of data block
  84. cpp_quote("#define NM_DF_SEGMENT_BEGIN 0x00000080") // start of data block
  85. cpp_quote("// INmChannelData.SendData dwFlags")
  86. cpp_quote("// NOTE THESE ARE THE MCSSenDataMasks values")
  87. cpp_quote("#define DATA_TOP_PRIORITY 0x0001")
  88. cpp_quote("#define DATA_HIGH_PRIORITY 0x0002")
  89. cpp_quote("#define DATA_MEDIUM_PRIORITY 0x0004")
  90. cpp_quote("#define DATA_LOW_PRIORITY 0x0008")
  91. cpp_quote("#define DATA_UNIFORM_SEND 0x0010")
  92. cpp_quote("#define DATA_NORMAL_SEND 0x0020")
  93. typedef enum tagNmConferenceState{
  94. NM_CONFERENCE_IDLE = 0,
  95. NM_CONFERENCE_WAITING = 1,
  96. NM_CONFERENCE_INITIALIZING = 2,
  97. NM_CONFERENCE_ACTIVE = 3,
  98. } NM_CONFERENCE_STATE;
  99. typedef enum tagNM_ADDR_TYPE{
  100. NM_ADDR_IP = 1,
  101. NM_ADDR_MACHINENAME = 2,
  102. } NM_ADDR_TYPE;
  103. typedef enum tagNmCallState{
  104. NM_CALL_INVALID = 0,
  105. NM_CALL_INIT = 1,
  106. NM_CALL_RING = 2,
  107. NM_CALL_SEARCH = 3,
  108. NM_CALL_WAIT = 4,
  109. NM_CALL_ACCEPTED = 5,
  110. NM_CALL_REJECTED = 6,
  111. NM_CALL_CANCELED = 7,
  112. } NM_CALL_STATE;
  113. typedef enum tagNmMemberNotify{
  114. NM_MEMBER_ADDED = 0,
  115. NM_MEMBER_REMOVED = 1,
  116. NM_MEMBER_UPDATED = 2,
  117. } NM_MEMBER_NOTIFY;
  118. typedef enum tagConfn{
  119. // Call control
  120. CONFN_CALL_IGNORED = 0x000403,
  121. CONFN_CALL_FAILED = 0x000404,
  122. CONFN_CALL_IN_CONFERENCE = 0x000405,
  123. } CONFN;
  124. //--------------------------------------------------------------------------
  125. // INmManager Interface
  126. [
  127. object,
  128. uuid(0855E276-E230-428e-ACB9-8F2C7CD42848),
  129. pointer_default(unique)
  130. ]
  131. interface INmManager : IUnknown
  132. {
  133. HRESULT Initialize(
  134. [in] BSTR szName,
  135. [in] DWORD_PTR pCredentials,
  136. [in] DWORD port,
  137. [in] DWORD flags);
  138. HRESULT Call(
  139. [out] INmCall **ppCall, // Can be NULL
  140. [in] DWORD dwFlags,
  141. [in] NM_ADDR_TYPE addrType,
  142. [in] BSTR bstrAddr,
  143. [in] BSTR bstrConference,
  144. [in] BSTR bstrPassword);
  145. HRESULT CreateConference(
  146. [out] INmConference **ppConference, // Can be NULL
  147. [in] BSTR bstrName,
  148. [in] BSTR bstrPassword,
  149. [in] BOOL fSecure);
  150. }
  151. //--------------------------------------------------------------------------
  152. // INmManagerNotify Interface
  153. [
  154. object,
  155. uuid(EC7A4454-9DB5-4f35-BC98-F04376CA984D),
  156. pointer_default(unique)
  157. ]
  158. interface INmManagerNotify : IUnknown
  159. {
  160. typedef [unique] INmManagerNotify *LPNMMANAGERNOTIFY;
  161. HRESULT NmUI(
  162. [in] CONFN uNotify);
  163. HRESULT ConferenceCreated(
  164. [in] INmConference *pConference);
  165. HRESULT CallCreated(
  166. [in] INmCall *pCall);
  167. }
  168. //--------------------------------------------------------------------------
  169. // INmCall Interface
  170. [
  171. object,
  172. uuid(F0E5EE14-8112-4af3-A0D3-94C9F43FABC4),
  173. pointer_default(unique)
  174. ]
  175. interface INmCall : IUnknown
  176. {
  177. typedef [unique] INmCall *LPNMCALL;
  178. HRESULT IsIncoming(
  179. void);
  180. HRESULT GetState(
  181. [out] NM_CALL_STATE *pState);
  182. HRESULT GetAddress(
  183. [out] BSTR *pbstrAddr);
  184. HRESULT GetConference(
  185. [out] INmConference **ppConference);
  186. HRESULT Accept(
  187. void);
  188. HRESULT Reject(
  189. void);
  190. HRESULT Cancel(
  191. void);
  192. }
  193. //--------------------------------------------------------------------------
  194. // INmCallNotify Interface
  195. [
  196. object,
  197. uuid(4C04DBFC-E935-411d-87B4-028148B6B60C),
  198. pointer_default(unique)
  199. ]
  200. interface INmCallNotify : IUnknown
  201. {
  202. HRESULT NmUI(
  203. [in] CONFN uNotify);
  204. HRESULT StateChanged(
  205. [in] NM_CALL_STATE uState);
  206. HRESULT Failed(
  207. [in] ULONG uError);
  208. HRESULT Accepted(
  209. [in] INmConference *pConference);
  210. HRESULT CallError(
  211. [in] UINT cns);
  212. HRESULT RemoteConference(
  213. [in] BOOL fMCU,
  214. [in] BSTR *pwszConfNames,
  215. [in, out] BSTR *pbstrConfToJoin);
  216. HRESULT RemotePassword(
  217. [in] BSTR bstrConference,
  218. [in, out] BSTR *pbstrPassword,
  219. [in] BYTE *pb,
  220. [in] DWORD cb);
  221. }
  222. //--------------------------------------------------------------------------
  223. // INmConference Interface
  224. [
  225. object,
  226. uuid(1BFBB75A-FBE3-4e7f-94C4-629A346F31F5),
  227. pointer_default(unique)
  228. ]
  229. interface INmConference : IUnknown
  230. {
  231. typedef [unique] INmConference *LPNMCONFERENCE;
  232. HRESULT GetName(
  233. [out] BSTR *pbstrName);
  234. HRESULT GetID(
  235. [out] ULONG *puID);
  236. HRESULT GetState(
  237. [out] NM_CONFERENCE_STATE *pState);
  238. HRESULT GetTopProvider(
  239. [out] INmMember **ppMember);
  240. HRESULT EnumMember(
  241. [out] IEnumNmMember **ppEnum);
  242. HRESULT GetMemberCount(
  243. [out] ULONG * puCount);
  244. HRESULT FindMember(
  245. [in] ULONG gccID,
  246. [out] INmMember ** ppMember);
  247. HRESULT IsHosting(
  248. void);
  249. HRESULT Host(
  250. void);
  251. HRESULT Leave(
  252. void);
  253. HRESULT LaunchRemote(
  254. [in] REFGUID rguid,
  255. [in] INmMember *pMember);
  256. HRESULT CreateDataChannel(
  257. [out] INmChannelData **ppChannel,
  258. [in] REFGUID rguid);
  259. }
  260. //--------------------------------------------------------------------------
  261. // INmConferenceNotify Interface
  262. [
  263. object,
  264. uuid(3FA17F19-EB23-419b-85CA-882AA1ACF62D),
  265. pointer_default(unique)
  266. ]
  267. interface INmConferenceNotify : IUnknown
  268. {
  269. HRESULT NmUI(
  270. [in] CONFN uNotify);
  271. HRESULT StateChanged(
  272. [in] NM_CONFERENCE_STATE uState);
  273. HRESULT MemberChanged(
  274. [in] NM_MEMBER_NOTIFY uNotify,
  275. [in] INmMember *pMember);
  276. }
  277. //--------------------------------------------------------------------------
  278. // INmMember Interface
  279. [
  280. object,
  281. uuid(315D16C6-7854-4690-9C71-1358978E70DC),
  282. pointer_default(unique)
  283. ]
  284. interface INmMember : IUnknown
  285. {
  286. HRESULT GetName(
  287. [out] BSTR *pbstrName);
  288. HRESULT GetID(
  289. [out] ULONG *puID);
  290. HRESULT GetConference(
  291. [out] INmConference **ppConference);
  292. HRESULT IsSelf(
  293. void);
  294. HRESULT IsMCU(
  295. void);
  296. HRESULT Eject(
  297. void);
  298. }
  299. cpp_quote("")
  300. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  301. cpp_quote("// Enumerator Definitions")
  302. //--------------------------------------------------------------------------
  303. // IEnumNmMember Interface
  304. [
  305. object,
  306. uuid(F246195B-FF07-4016-BB36-E0DBD4CF62FE),
  307. pointer_default(unique)
  308. ]
  309. interface IEnumNmMember : IUnknown
  310. {
  311. [local]
  312. HRESULT Next(
  313. [in] ULONG cMember,
  314. [out] INmMember **rgpMember,
  315. [out] ULONG *pcFetched);
  316. [call_as(Next)]
  317. HRESULT RemoteNext(
  318. [in] ULONG cMember,
  319. [out, size_is(cMember), length_is(*pcFetched) ] INmMember **rgpMember,
  320. [out] ULONG *pcFetched,
  321. [out] ULONG *pcItems,
  322. [in] BOOL bGetNumberRemaining);
  323. HRESULT Skip(
  324. [in] ULONG cMember);
  325. HRESULT Reset();
  326. HRESULT Clone(
  327. [out] IEnumNmMember **ppEnum);
  328. }
  329. //--------------------------------------------------------------------------
  330. // INmChannelData Interface
  331. [
  332. object,
  333. uuid(00DA3B21-2C7D-479a-8F43-5D0BF3E552EA),
  334. pointer_default(unique)
  335. ]
  336. interface INmChannelData : IUnknown
  337. {
  338. HRESULT IsActive(
  339. void);
  340. HRESULT SetActive(
  341. [in] BOOL fActive);
  342. HRESULT GetConference(
  343. [out] INmConference **ppConference);
  344. HRESULT EnumMember(
  345. [out] IEnumNmMember **ppEnum);
  346. HRESULT GetMemberCount(
  347. [out] ULONG * puCount);
  348. HRESULT GetGuid(
  349. [out] GUID *pguid);
  350. HRESULT SendData(
  351. [in] INmMember *pMember,
  352. [in] ULONG uSize,
  353. [in, size_is(uSize)] byte *pvBuffer,
  354. [in] ULONG uOptions);
  355. HRESULT RegistryAllocateHandle(
  356. [in] ULONG numberOfHandlesRequested);
  357. }
  358. //--------------------------------------------------------------------------
  359. // INmChannelDataNotify Interface
  360. [
  361. object,
  362. uuid(BD8CED3B-6953-4375-9252-9F7C87EC2804),
  363. pointer_default(unique)
  364. ]
  365. interface INmChannelDataNotify : IUnknown
  366. {
  367. HRESULT NmUI(
  368. [in] CONFN uNotify);
  369. HRESULT MemberChanged(
  370. [in] NM_MEMBER_NOTIFY uNotify,
  371. [in] INmMember *pMember);
  372. HRESULT DataSent(
  373. [in] INmMember *pMember,
  374. [in] ULONG uSize,
  375. [in, size_is(uSize)] byte *pvBuffer);
  376. HRESULT DataReceived(
  377. [in] INmMember *pMember,
  378. [in] ULONG uSize,
  379. [in, size_is(uSize)] byte *pvBuffer,
  380. [in] ULONG dwFlags);
  381. HRESULT AllocateHandleConfirm(
  382. [in] ULONG handle_value,
  383. [in] ULONG chandles);
  384. }