Leaked source code of windows server 2003
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.

270 lines
9.3 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. //
  4. // File: intrnlqa.idl
  5. //
  6. // Description: Internal Queue Admin Interfaces. IDL file containing the
  7. // interface definitions for the internal queue admin interfaces. These
  8. // interfaces are exlusively internal to AQueue and used to provide the
  9. // ability to admin different types of queues (i.e., local vs remote).
  10. //
  11. // This works as follows... the AQSvrInst object returns a IQueueAdmin*
  12. // interface via HrLinkFromLinkID or HrQueueFromQueueID.
  13. //
  14. // The IQueueAdminMessageFilter interface is initialized from a
  15. // MESSAGE_FILETER or MESSAGE_ENUM_FILTER.
  16. //
  17. // The IUknown message abstraction will typically also implement CMsgRef
  18. // (in the case of local and remote queues), but could also point to the
  19. // external message interface (IMailMsgProperties). This is currently
  20. // not used, but can easily be done by creating a IQueueAdminMessageFilter
  21. // and IQueueAdminAction implementation that supports it.
  22. //
  23. // IAdvQueueAdmin is the per-instance interface that is used by the
  24. // RPC server to talk to aqueue.
  25. //
  26. // Author: Mike Swafford (MikeSwa)
  27. //
  28. // History:
  29. // 2/20/99 - MikeSwa Created
  30. // 4/1/99 - MikeSwa Added context to IQueueAdminMessageFilter
  31. // 6/7/99 - MikeSwa Moved IAdvQueueAdmin from aqueue.idl to intrnlqa.idl
  32. // 7/1/99 - MikeSwa Added LinkDiagnostic HRESULT
  33. //
  34. // Copyright (C) 1999 Microsoft Corporation
  35. //
  36. //-----------------------------------------------------------------------------
  37. import "oaidl.idl";
  38. import "ocidl.idl";
  39. import "aqadmtyp.h";
  40. interface IQueueAdminAction;
  41. //---[ IQueueAdminMessageFilter ]----------------------------------------------
  42. //
  43. //
  44. // Description:
  45. // Interface used to encapsulate message filtering/processing. A queue
  46. // class will call HrProcessMsg for every message in the queue
  47. //
  48. //-----------------------------------------------------------------------------
  49. [
  50. object,
  51. local,
  52. uuid(34E2DCC4-C91A-11d2-A6B1-00C04FA3490A),
  53. helpstring("IQueueAdminMessageFilter Interface"),
  54. pointer_default(unique)
  55. ]
  56. interface IQueueAdminMessageFilter : IUnknown
  57. {
  58. //Called to process a message during enumeration.
  59. [helpstring("method HrProcessMessage")]
  60. HRESULT HrProcessMessage(
  61. IUnknown *pIUnknownMsg,
  62. BOOL *pfContinue,
  63. BOOL *pfDelete);
  64. [helpstring("method HrSetQueueAdminAction")]
  65. HRESULT HrSetQueueAdminAction(
  66. IQueueAdminAction *pIQueueAdminAction);
  67. //Allows the thread performing queue admin functions
  68. //to set a context that is passed to the
  69. //pIQueueAdminAction implementation
  70. [helpstring("method HrSetCurrentUserContext")]
  71. HRESULT HrSetCurrentUserContext(
  72. PVOID pvContext);
  73. [helpstring("method HrGetCurrentUserContext")]
  74. HRESULT HrGetCurrentUserContext(
  75. PVOID *ppvContext);
  76. };
  77. //---[ IQueueAdminAction ]-----------------------------------------------------
  78. //
  79. //
  80. // Description:
  81. // Internal interface that is the basis for all adminable queues. It
  82. // provides the abilitity to filter and apply actions to queues as well.
  83. //
  84. // A class that implements this class should also implement one of
  85. // the following:
  86. // IQueueAdminLink - Admin a next hop link
  87. // IQueueAdminQueue - Admin a final destination queue
  88. //
  89. //-----------------------------------------------------------------------------
  90. [
  91. object,
  92. local,
  93. uuid(486886B4-6542-4abe-8DE5-1A35E8A83A6C),
  94. helpstring("IQueueAdminAction Interface"),
  95. pointer_default(unique)
  96. ]
  97. interface IQueueAdminAction : IUnknown
  98. {
  99. //Applies a given Queue Admin function to all messages in this queue
  100. [helpstring("method HrApplyQueueAdminFunction")]
  101. HRESULT HrApplyQueueAdminFunction(
  102. IQueueAdminMessageFilter *pIQueueAdminMessageFilter);
  103. //Removes a message from this queue
  104. [helpstring("method HrApplyActionToMessage")]
  105. HRESULT HrApplyActionToMessage(
  106. IUnknown *pIUnknownMsg,
  107. MESSAGE_ACTION ma,
  108. PVOID pvContext,
  109. BOOL *pfShouldDelete);
  110. [helpstring("method fMatchesID")]
  111. BOOL fMatchesID(QUEUELINK_ID *QueueLinkID);
  112. //Returns the supported actions on this interface
  113. [helpstring("method QuerySupportedActions")]
  114. HRESULT QuerySupportedActions(
  115. DWORD *pdwSupportedActions,
  116. DWORD *pdwSupportedFilterFlags);
  117. };
  118. //---[ IQueueAdminLink ]-------------------------------------------------------
  119. //
  120. //
  121. // Description:
  122. // Queue Admin interface for a next hop link.
  123. //
  124. //-----------------------------------------------------------------------------
  125. [
  126. object,
  127. local,
  128. uuid(D81698CA-2FD1-11d3-BFD1-00C04FA3490A),
  129. helpstring("IQueueAdminLink Interface"),
  130. pointer_default(unique)
  131. ]
  132. interface IQueueAdminLink : IUnknown
  133. {
  134. [helpstring("method HrGetLinkInfo")]
  135. HRESULT HrGetLinkInfo(
  136. LINK_INFO *pliLinkInfo,
  137. HRESULT *phrLinkDiagnostic);
  138. [helpstring("method HrApplyActionToLink")]
  139. HRESULT HrApplyActionToLink(
  140. LINK_ACTION la);
  141. [helpstring("method HrGetLinkID")]
  142. HRESULT HrGetLinkID(
  143. QUEUELINK_ID *pLinkID);
  144. [helpstring("method HrGetNumQueues")]
  145. HRESULT HrGetNumQueues(DWORD *pcQueues);
  146. [helpstring("method HrGetQueueIDs")]
  147. HRESULT HrGetQueueIDs(
  148. DWORD *pcQueues,
  149. QUEUELINK_ID *rgQueues);
  150. };
  151. //---[ IQueueAdminQueue ]------------------------------------------------------
  152. //
  153. //
  154. // Description:
  155. // Queue Admin interface for a final destination queue
  156. //
  157. //-----------------------------------------------------------------------------
  158. [
  159. object,
  160. local,
  161. uuid(34E2DCC6-C91A-11d2-A6B1-00C04FA3490A),
  162. helpstring("IQueueAdminQueue Interface"),
  163. pointer_default(unique)
  164. ]
  165. interface IQueueAdminQueue : IUnknown
  166. {
  167. [helpstring("method HrGetQueueInfo")]
  168. HRESULT HrGetQueueInfo(
  169. QUEUE_INFO *pliQueueInfo);
  170. [helpstring("method HrGetQueueID")]
  171. HRESULT HrGetQueueID(
  172. QUEUELINK_ID *pQueueID);
  173. };
  174. //---[ IAdvQueueAdmin ]--------------------------------------------------------
  175. //
  176. //
  177. // Description: Public interface that exposes administrator APIs
  178. // for use by the SMTP Server's AQ RPCs.
  179. //
  180. //
  181. //-----------------------------------------------------------------------------
  182. [
  183. object,
  184. uuid(23700228-1D00-11d3-BFCB-00C04FA3490A),
  185. helpstring("IAdvQueueAdmin Interface"),
  186. pointer_default(unique)
  187. ]
  188. interface IAdvQueueAdmin : IUnknown
  189. {
  190. [helpstring("method ApplyActionToLinks")]
  191. HRESULT
  192. ApplyActionToLinks(
  193. [in] LINK_ACTION laAction);
  194. [helpstring("method ApplyActionToMessages")]
  195. HRESULT
  196. ApplyActionToMessages(
  197. [in] QUEUELINK_ID *pqlQueueLinkId,
  198. [in] MESSAGE_FILTER *pmfMessageFilter,
  199. [in] MESSAGE_ACTION maMessageAction,
  200. [out] DWORD *pcMsgs);
  201. [helpstring("method GetQueueInfo")]
  202. HRESULT
  203. GetQueueInfo(
  204. [in] QUEUELINK_ID *pqlQueueId,
  205. [out] QUEUE_INFO *pqiQueueInfo);
  206. [helpstring("method GetLinkInfo")]
  207. HRESULT
  208. GetLinkInfo(
  209. [in] QUEUELINK_ID *pqlLinkId,
  210. [out] LINK_INFO *pliLinkInfo,
  211. [out] HRESULT *phrLinkDiagnostic);
  212. [helpstring("method SetLinkState")]
  213. HRESULT
  214. SetLinkState(
  215. [in] QUEUELINK_ID *pqlLinkId,
  216. [in] LINK_ACTION la);
  217. [helpstring("method GetLinkIDs")]
  218. HRESULT
  219. GetLinkIDs(
  220. [in, out] DWORD *pcLinks,
  221. [in, out] QUEUELINK_ID *rgLinks);
  222. [helpstring("method GetQueueIDs")]
  223. HRESULT
  224. GetQueueIDs(
  225. [in] QUEUELINK_ID *pqlLinkId,
  226. [in, out] DWORD *pcQueues,
  227. [in, out] QUEUELINK_ID *rgQueues);
  228. [helpstring("method GetMessageProperties")]
  229. HRESULT
  230. GetMessageProperties(
  231. [in] QUEUELINK_ID *pqlQueueLinkId,
  232. [in] MESSAGE_ENUM_FILTER *pmfMessageEnumFilter,
  233. [in, out] DWORD *pcMsgs,
  234. [in, out] MESSAGE_INFO *rgMsgs);
  235. [helpstring("method QuerySupportedActions")]
  236. HRESULT
  237. QuerySupportedActions(
  238. [in] QUEUELINK_ID *pqlQueueLinkId,
  239. [out] DWORD *pdwSupportedActions,
  240. [out] DWORD *pdwSupportedFilterFlags);
  241. };