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.

561 lines
21 KiB

  1. /*
  2. @doc AQADMIN EXTERNAL
  3. @module AQADMIN.IDL - IDL for Advanced Queue Admin Object. | This module
  4. declares the various interfaces exported for access to the Advanced Queue
  5. administration object
  6. */
  7. cpp_quote("/*++")
  8. cpp_quote("")
  9. cpp_quote("Copyright (c) 1998 Microsoft Corporation")
  10. cpp_quote("")
  11. cpp_quote("Module Name:")
  12. cpp_quote("")
  13. cpp_quote(" aqadmin.idl / aqadmin.h")
  14. cpp_quote("")
  15. cpp_quote("Abstract:")
  16. cpp_quote("")
  17. cpp_quote(" This module contains definitions for the COM interfaces for")
  18. cpp_quote(" the Advanced Queue administration object.")
  19. cpp_quote("")
  20. cpp_quote("--*/")
  21. import "oaidl.idl";
  22. import "ocidl.idl";
  23. //
  24. // @doc AQADMIN EXTERNAL
  25. //
  26. interface IVSAQAdmin;
  27. interface IEnumVSAQLinks;
  28. interface IAQEnumMessages;
  29. interface IEnumLinkQueues;
  30. interface IAQMessage;
  31. interface IVSAQLink;
  32. interface ILinkQueue;
  33. cpp_quote("#ifndef __AQADMTYP_H__")
  34. cpp_quote("#define __AQADMTYP_H__")
  35. #include "aqadmtyp.h"
  36. cpp_quote("#endif")
  37. /*
  38. @interface IAQAdmin | Primary interface to Advanced Queue admin objects
  39. @meth HRESULT | GetVirtualServerAdminITF | Get admin interface to a
  40. SMTP or MTA virtual server's queues
  41. */
  42. [
  43. helpstring("Advanced Queue Administration Object"),
  44. object,
  45. pointer_default(unique),
  46. uuid(476D70A6-1A90-11d3-BFCB-00C04FA3490A)
  47. ]
  48. interface IAQAdmin : IUnknown
  49. {
  50. // @method HRESULT | IAQAdmin | GetVirtualServerAdminITF | Get admin
  51. // interface to a SMTP or MTA virtual server's queues
  52. // @rvalue S_OK | Success
  53. // @rvalue E_OUTOFMEMORY | Out of resources
  54. // @rvalue E_ACCESSDENIED | Logged on principal not authorized to view
  55. // queues on specified virtual server
  56. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  57. //connect to specified virtual server
  58. HRESULT GetVirtualServerAdminITF(
  59. // @parm hostname of the computer
  60. [in] LPCWSTR wszComputer,
  61. // @parm virtual server number
  62. [in] LPCWSTR wszVirtualServer,
  63. // @parm Interface to Virtual Server admin object is
  64. // returned here
  65. [out] IVSAQAdmin **ppivsaqadmin
  66. );
  67. }
  68. /*
  69. @interface IAQMessageAction | Interface used to apply actions
  70. to messages on this virtual server. This interface is
  71. implemented at the server, link and queue level
  72. @meth HRESULT | ApplyActionToMessages | Apply specified action to
  73. messages on this Virtual Server that match the specified message
  74. filter criteria.
  75. @meth HRESULT | QuerySupportedActions | Describes
  76. which actions/filters of <t ApplyActionToMessages> is supported.
  77. */
  78. [
  79. helpstring("Advanced Queue Message Action Interface"),
  80. object,
  81. pointer_default(unique),
  82. uuid(1EB44A71-1E95-11d3-BFCC-00C04FA3490A)
  83. ]
  84. interface IAQMessageAction : IUnknown
  85. {
  86. // @method HRESULT | IAQMessageAction | ApplyActionToMessages | Apply
  87. // specified action to messages on this Virtual Server that match the
  88. // specified message filter criteria. The actions will only be applied
  89. // to messages that belong to the object implmenting this interface.
  90. // For example, on messages that match the filter on a given queue will
  91. // be affected if this method is called on an ILinkQueue object.
  92. // @rvalue S_OK | Success
  93. // @rvalue E_OUTOFMEMORY | Insufficient resources
  94. // @rvalue E_POINTER | Null pointer parameter
  95. // @rvalue E_INVALIDARG | Invalid parameter
  96. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  97. // connect to specified virtual server
  98. HRESULT ApplyActionToMessages(
  99. // @parm The <t MESSAGE_FILTER> to use to select messages
  100. [in] PMESSAGE_FILTER Filter,
  101. // @parm The <t MESSAGE_ACTION> to apply to matching messages
  102. [in] MESSAGE_ACTION Action,
  103. // @parm The number of messages affected by the action
  104. [out] DWORD *pcMsgs
  105. );
  106. // @method HRESULT | IAQMessageAction | QuerySupportedActions | Describes
  107. // which actions/filters of <t ApplyActionToMessages> is supported.
  108. // @rvalue S_OK | Success
  109. // @rvalue E_OUTOFMEMORY | Insufficient resources
  110. // @rvalue E_POINTER | Null pointer parameter
  111. // @rvalue E_INVALIDARG | Invalid parameter
  112. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  113. // connect to specified virtual server
  114. HRESULT QuerySupportedActions(
  115. [out] DWORD *pdwSupportedActions,
  116. // @parm The <t MESSAGE_ACTION> flags supported by this interface.
  117. [out] DWORD *pdwSupportedFilterFlags);
  118. // @parm The <t MESSAGE_FILTER_FLAGS> supported by this interface.
  119. }
  120. /*
  121. @interface IVSAQAdmin | Interface to per-virtual-server AQ
  122. Administration
  123. @meth HRESULT | GetLinkEnum | Get an enumerator over all links on
  124. this VS
  125. @meth HRESULT | StopAllLinks | Stop all active outbound links
  126. @meth HRESULT | StartAllLinks | Start all eligible outbound links
  127. */
  128. [
  129. helpstring("Advanced Queue Administration Object"),
  130. object,
  131. pointer_default(unique),
  132. uuid(E2ED3340-1E96-11d3-BFCC-00C04FA3490A)
  133. ]
  134. interface IVSAQAdmin : IUnknown
  135. {
  136. // @method HRESULT | IVSAQAdmin | GetLinkEnum | Get an enumerator over
  137. // all links on this VS
  138. // @rvalue S_OK | Success
  139. // @rvalue E_OUTOFMEMORY | Insufficient resources
  140. // @rvalue E_POINTER | Null pointer parameter
  141. // @rvalue E_INVALIDARG | Invalid parameter
  142. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  143. // connect to specified virtual server
  144. HRESULT GetLinkEnum(
  145. // @parm Interface to link enumerator is returned here.
  146. [out] IEnumVSAQLinks **ppenum
  147. );
  148. // @method HRESULT | IVSAQAdmin | StopAllLinks | Stop all active
  149. // outbound links
  150. // @rvalue S_OK | Success
  151. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  152. // connect to specified virtual server
  153. HRESULT StopAllLinks();
  154. // @method HRESULT | IVSAQAdmin | StartAllLinks | Start all active
  155. // outbound links
  156. // @rvalue S_OK | Success
  157. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  158. // connect to specified virtual server
  159. HRESULT StartAllLinks();
  160. // @method HRESULT | IVSAQAdmin | GetGlobalLinkState | Checks the
  161. // global state of the links as set by StopAllLinks/StartAllLinks.
  162. // @rvalue S_OK | Links are started
  163. // @rvalue S_FALSE | Link have been stopped (by a previous call
  164. // to StopAllLinks.
  165. // @rvalue E_NOTIMPL | This provider does not support getting or
  166. // setting the global link state.
  167. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  168. // connect to specified virtual server
  169. HRESULT GetGlobalLinkState();
  170. }
  171. /*
  172. @interface IEnumVSAQLinks | Enumerator for a Virtual Server's AQ Links
  173. @meth HRESULT | Next | Returns the sequentially consequetive specified
  174. number of IVSAQLink objects.
  175. @meth HRESULT | Skip | Advances current element cursor by specified
  176. number of elements
  177. @meth HRESULT | Reset | Resets current element cursor to start of list
  178. @meth HRESULT | Clone | Creates a copy of this enumerator object
  179. */
  180. [
  181. helpstring("Advanced Queue Administration Object"),
  182. object,
  183. pointer_default(unique),
  184. uuid(ba7af300-7373-11d2-94e4-00c04fa379f1)
  185. ]
  186. interface IEnumVSAQLinks : IUnknown
  187. {
  188. // @method HRESULT | IEnumVSAQLinks | Next | Returns the sequentially
  189. // consequetive specified number of IVSAQLink objects.
  190. // @rvalue S_OK | Success
  191. // @rvalue S_FALSE | Fewer than requested number of object returned
  192. HRESULT Next(
  193. // @parm Number of elements requested
  194. [in] ULONG cElt,
  195. // @parm Array in which to return IVSAQLink objects. Must be
  196. // atleast <p cElt> long.
  197. [out] IVSAQLink **rgelt,
  198. // @parm Number of elements actually returned.
  199. [out] ULONG *pcFetched
  200. );
  201. // @method HRESULT | IEnumVSAQLinks | Skip | Advances current element
  202. // cursor by specified number of elements
  203. // @rvalue S_OK | Success
  204. // @rvalue S_FALSE | Too few elements in enumerator to successfully
  205. // advance cursor. Cursor positioned to last element
  206. HRESULT Skip(
  207. // @parm Number of elements to advance cursor by.
  208. [in] ULONG cElt
  209. );
  210. // @method HRESULT | IEnumVSAQLinks | Reset | Resets current element
  211. // cursor to start of list
  212. // @rvalue S_OK | Success
  213. HRESULT Reset();
  214. // @method HRESULT | IEnumVSAQLinks | Clone | Creates a clone of the
  215. // this enumerator object.
  216. // @rvalue S_OK | Success
  217. // @rvalue E_POINTER | Null pointer parameter
  218. // @rvalue E_OUTOFMEMORY | Out of memory creating clone.
  219. HRESULT Clone(
  220. // @parm Interface to cloned IEnumVSAQLinks is returned here.
  221. [out] IEnumVSAQLinks **ppenum
  222. );
  223. }
  224. /*
  225. @interface IVSAQLink | Interface to a single virtual server AQ Link. A
  226. link represents a connectable entity. Another way to think of a link
  227. is that it represents the next-hop to which mail messages on this
  228. link will be delivered to.
  229. @meth HRESULT | GetInfo | Returns information about the link
  230. @meth HRESULT | SetLinkState | Sets the links state.
  231. @meth HRESULT | GetQueueEnum | Returns an enumerator for msg queues
  232. on this link
  233. */
  234. [
  235. helpstring("Advanced Queue Administration Object"),
  236. object,
  237. pointer_default(unique),
  238. uuid(3F962F94-1ECD-11d3-BFCC-00C04FA3490A)
  239. ]
  240. interface IVSAQLink : IUnknown
  241. {
  242. // @method HRESULT | IVSAQLink | GetInfo | Returns information about
  243. // the link
  244. // @rvalue S_OK | Success
  245. // @rvalue E_OUTOFMEMORY | Insufficient resources
  246. // @rvalue E_POINTER | Null pointer parameter
  247. // @rvalue E_INVALIDARG | Invalid parameter
  248. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  249. // connect to specified virtual server
  250. HRESULT GetInfo(
  251. // @parm Pointer to <t LINK_INFO> structure to fill.
  252. [in, out] PLINK_INFO pli
  253. );
  254. // @method HRESULT | IVSAQLink | SetLinkState | Changes the state of the link
  255. // @rvalue S_OK | Success
  256. // @rvalue E_OUTOFMEMORY | Insufficient resources
  257. // @rvalue E_POINTER | Null pointer parameter
  258. // @rvalue E_INVALIDARG | Invalid parameter
  259. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  260. // connect to specified virtual server
  261. HRESULT SetLinkState(
  262. // @parm <t LINK_ACTION> describing new state of link.
  263. [in] LINK_ACTION la
  264. );
  265. // @method HRESULT | IVSAQLink | GetQueueEnum | Get an enumerator for
  266. // message queues on this link
  267. // @rvalue S_OK | Success
  268. // @rvalue E_OUTOFMEMORY | Insufficient resources
  269. // @rvalue E_POINTER | Null pointer parameter
  270. // @rvalue E_INVALIDARG | Invalid parameter
  271. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  272. // connect to specified virtual server
  273. HRESULT GetQueueEnum(
  274. // @parm Interface to IEnumLinkQueues is returned here.
  275. [out] IEnumLinkQueues **ppenum
  276. );
  277. }
  278. /*
  279. @interface IAQEnumMessages | Enumerator for a AQ Link's messages
  280. @meth HRESULT | Next | Returns the sequentially consequetive specified
  281. number of IAQMessage objects.
  282. @meth HRESULT | Skip | Advances current element cursor by specified
  283. number of elements
  284. @meth HRESULT | Reset | Resets current element cursor to start of list
  285. @meth HRESULT | Clone | Creates a copy of this enumerator object
  286. */
  287. [
  288. helpstring("Advanced Queue Administration Object"),
  289. object,
  290. pointer_default(unique),
  291. uuid(ba7af302-7373-11d2-94e4-00c04fa379f1)
  292. ]
  293. interface IAQEnumMessages : IUnknown
  294. {
  295. // @method HRESULT | IAQEnumMessages | Next | Returns the
  296. // sequentially consequetive specified number of IAQMessage objects.
  297. // @rvalue S_OK | Success
  298. // @rvalue S_FALSE | Fewer than requested number of object returned
  299. HRESULT Next(
  300. // @parm Number of elements requested
  301. [in] ULONG cElt,
  302. // @parm Array in which to return IAQMessage objects. Must be
  303. // atleast <p cElt> long.
  304. [out] IAQMessage **rgelt,
  305. // @parm Number of elements actually returned.
  306. [out] ULONG *pcFetched
  307. );
  308. // @method HRESULT | IAQEnumMessages | Skip | Advances current
  309. // element cursor by specified number of elements
  310. // @rvalue S_OK | Success
  311. // @rvalue S_FALSE | Too few elements in enumerator to successfully
  312. // advance cursor. Cursor positioned to last element
  313. HRESULT Skip(
  314. // @parm Number of elements to advance cursor by.
  315. [in] ULONG cElt
  316. );
  317. // @method HRESULT | IAQEnumMessages | Reset | Resets current element
  318. // cursor to start of list
  319. // @rvalue S_OK | Success
  320. HRESULT Reset();
  321. // @method HRESULT | IAQEnumMessages | Clone | Creates a clone of the
  322. // this enumerator object.
  323. // @rvalue S_OK | Success
  324. // @rvalue E_POINTER | Null pointer parameter
  325. // @rvalue E_OUTOFMEMORY | Out of memory creating clone.
  326. HRESULT Clone(
  327. // @parm Interface to cloned IAQEnumMessages is returned here.
  328. [out] IAQEnumMessages **ppenum
  329. );
  330. }
  331. /*
  332. @interface IEnumLinkQueues | Enumerator for a AQ Link's messages
  333. @meth HRESULT | Next | Returns the sequentially consequetive specified
  334. number of ILinkQueue objects.
  335. @meth HRESULT | Skip | Advances current element cursor by specified
  336. number of elements
  337. @meth HRESULT | Reset | Resets current element cursor to start of list
  338. @meth HRESULT | Clone | Creates a copy of this enumerator object
  339. */
  340. [
  341. helpstring("Advanced Queue Administration Object"),
  342. object,
  343. pointer_default(unique),
  344. uuid(ba7af303-7373-11d2-94e4-00c04fa379f1)
  345. ]
  346. interface IEnumLinkQueues : IUnknown
  347. {
  348. // @method HRESULT | IEnumLinkQueues | Next | Returns the sequentially
  349. // consequetive specified number of ILinkQueue objects.
  350. // @rvalue S_OK | Success
  351. // @rvalue S_FALSE | Fewer than requested number of object returned
  352. HRESULT Next(
  353. // @parm Number of elements requested
  354. [in] ULONG cElt,
  355. // @parm Array in which to return ILinkQueue objects. Must
  356. // be atleast <p cElt> long.
  357. [out] ILinkQueue **rgelt,
  358. // @parm Number of elements actually returned.
  359. [out] ULONG *pcFetched
  360. );
  361. // @method HRESULT | IEnumLinkQueues | Skip | Advances current element
  362. // cursor by specified number of elements
  363. // @rvalue S_OK | Success
  364. // @rvalue S_FALSE | Too few elements in enumerator to successfully
  365. // advance cursor. Cursor positioned to last element
  366. HRESULT Skip(
  367. // @parm Number of elements to advance cursor by.
  368. [in] ULONG cElt
  369. );
  370. // @method HRESULT | IEnumLinkQueues | Reset | Resets current element
  371. // cursor to start of list
  372. // @rvalue S_OK | Success
  373. HRESULT Reset();
  374. // @method HRESULT | IEnumLinkQueues | Clone | Creates a clone of
  375. // the this enumerator object.
  376. // @rvalue S_OK | Success
  377. // @rvalue E_POINTER | Null pointer parameter
  378. // @rvalue E_OUTOFMEMORY | Out of memory creating clone.
  379. HRESULT Clone(
  380. // @parm Interface to cloned IEnumLinkQueues is returned here.
  381. [out] IEnumLinkQueues **ppenum
  382. );
  383. }
  384. /*
  385. @interface ILinkQueue | Interface to a single queue of messages that
  386. will be serviced by a link. A link may be servicing 0 to many queues.
  387. For example, if the server GW1 has a SMTP connector for *.com, then
  388. on server MB1, there may be a link for GW1 servicing the queues for
  389. IBM.COM and MSFT.COM
  390. @meth HRESULT | GetInfo | Returns information about the Queue
  391. @meth HRESULT | GetMessageEnum | Returns an enumerator for messages
  392. on this link
  393. */
  394. [
  395. helpstring("Advanced Queue Administration Object"),
  396. object,
  397. pointer_default(unique),
  398. uuid(FF9A1BB6-1E96-11d3-BFCC-00C04FA3490A)
  399. ]
  400. interface ILinkQueue : IUnknown
  401. {
  402. // @method HRESULT | ILinkQueue | GetInfo | Returns information about
  403. // the link
  404. // @rvalue S_OK | Success
  405. // @rvalue E_OUTOFMEMORY | Insufficient resources
  406. // @rvalue E_POINTER | Null pointer parameter
  407. // @rvalue E_INVALIDARG | Invalid parameter
  408. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  409. // connect to specified virtual server
  410. HRESULT GetInfo(
  411. // @parm Pointer to <t QUEUE_INFO> structure to fill.
  412. [in, out] PQUEUE_INFO pqi
  413. );
  414. // @method HRESULT | ILinkQueue | GetMessageEnum | Get an enumerator for
  415. // messages on this link
  416. // @rvalue S_OK | Success
  417. // @rvalue E_OUTOFMEMORY | Insufficient resources
  418. // @rvalue E_POINTER | Null pointer parameter
  419. // @rvalue E_INVALIDARG | Invalid parameter
  420. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  421. // connect to specified virtual server
  422. HRESULT GetMessageEnum(
  423. // @parm Filter specifying messages to return
  424. [in] PMESSAGE_ENUM_FILTER pFilter,
  425. // @parm Interface to IAQEnumMessages is returned here.
  426. [out] IAQEnumMessages **ppenum
  427. );
  428. }
  429. /*
  430. @interface IAQMessage | Interface representing a single message
  431. @meth HRESULT | GetInfo | Returns information about the Queue
  432. @meth HRESULT | GetContentStream | Returns a stream for the message content
  433. */
  434. [
  435. helpstring("Advanced Queue Administration Object"),
  436. object,
  437. pointer_default(unique),
  438. uuid(ba7af305-7373-11d2-94e4-00c04fa379f1)
  439. ]
  440. interface IAQMessage : IUnknown
  441. {
  442. // @method HRESULT | IAQMessage | GetInfo | Returns information about
  443. // the message
  444. // @rvalue S_OK | Success
  445. // @rvalue E_OUTOFMEMORY | Insufficient resources
  446. // @rvalue E_POINTER | Null pointer parameter
  447. // @rvalue E_INVALIDARG | Invalid parameter
  448. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  449. // connect to specified virtual server
  450. HRESULT GetInfo(
  451. // @parm Pointer to <t MESSAGE_INFO> structure to fill
  452. [in, out] PMESSAGE_INFO pmi
  453. );
  454. // @method HRESULT | IAQMessage | GetContentStream | Returns
  455. // a Stream of the message content
  456. // @rvalue S_OK | Success
  457. // @rvalue E_NOTIMPL | This queue provider does not support
  458. // this functionality
  459. // @rvalue E_OUTOFMEMORY | Insufficient resources
  460. // @rvalue E_POINTER | Null pointer parameter
  461. // @rvalue E_INVALIDARG | Invalid parameter
  462. // @rvalue HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE) | Unable to
  463. // connect to specified virtual server
  464. HRESULT GetContentStream(
  465. // @parm Pointer to IStream interface for message content
  466. [out] IStream **ppIStream,
  467. // @parm String describing the content type (if known) of the message
  468. [out] LPWSTR *pwszContentType);
  469. }
  470. /*
  471. @interface IUniqueId | Interface to get canonical name of queue/link
  472. @meth HRESULT | GetUniqueId | Return QUEUELINK_ID for queue/link
  473. */
  474. [
  475. helpstring("Queue/Link Id Object"),
  476. object,
  477. pointer_default(unique),
  478. uuid(EA4DFDF2-9E87-4c57-B845-123872C5649F)
  479. ]
  480. interface IUniqueId : IUnknown
  481. {
  482. // @method HRESULT | IUniqueId | GetUniqueId | Returns
  483. // a QUEUELINK_ID for this queue or link. This is the canonical
  484. // representation of the queue. The QAPI guarantees that there is
  485. // no more than one queue or link with the same QUEUELINKID at a
  486. // given point in time. The memory associated with the out parameter
  487. // is guaranteed good until the underlying QAPI object is released
  488. // @rvalue S_OK | Success
  489. // @rvalue E_NOTIMPL | This queue provider does not support
  490. // this functionality
  491. HRESULT GetUniqueId(
  492. [out] QUEUELINK_ID **ppqlid);
  493. }
  494. [
  495. helpstring("Advanced Queueing Admin 1.0 Type Library"),
  496. uuid(83866cac-740d-11d2-94e4-00c04fa379f1),
  497. version(1.0)
  498. ]
  499. library AQAdmin
  500. {
  501. importlib("stdole2.tlb");
  502. interface IAQAdmin;
  503. [
  504. helpstring("Advanced Queueuing Administration Class"),
  505. uuid(83866cad-740d-11d2-94e4-00c04fa379f1)
  506. ]
  507. coclass AQAdmin {
  508. [default] interface IAQAdmin;
  509. }
  510. };