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.

321 lines
13 KiB

  1. /*
  2. @doc MAILMSGI INTERNAL
  3. @module MAILMSGI.IDL - IDL for internal interfaces to Mail Message Object. |
  4. This module declares the various internal interfaces exported for access to
  5. the Mail Message Object.
  6. THESE INTERFACES ARE INTERNAL, AND ARE FOR USE BY OPERATING SYSTEM COMPONENTS
  7. ONLY. NO APPLICATION COMPONENT MAY MAKE USE OF THESE INTERFACES.
  8. */
  9. cpp_quote("/*++")
  10. cpp_quote("")
  11. cpp_quote("Copyright (c) 1996, 1997 Microsoft Corporation")
  12. cpp_quote("")
  13. cpp_quote("Module Name:")
  14. cpp_quote("")
  15. cpp_quote(" mailmsgi.idl / mailmsgi.h")
  16. cpp_quote("")
  17. cpp_quote("Abstract:")
  18. cpp_quote("")
  19. cpp_quote(" This module contains definitions for the internal COM interfaces")
  20. cpp_quote(" for the Mail Message Object.")
  21. cpp_quote("")
  22. cpp_quote(" THESE INTERFACES ARE INTERNAL, AND ARE FOR USE BY OPERATING SYSTEM COMPONENTS")
  23. cpp_quote(" ONLY. NO APPLICATION COMPONENT MAY MAKE USE OF THESE INTERFACES.")
  24. cpp_quote("")
  25. cpp_quote("Author:")
  26. cpp_quote("")
  27. cpp_quote(" Don Dumitru ([email protected])")
  28. cpp_quote("")
  29. cpp_quote("Revision History:")
  30. cpp_quote("")
  31. cpp_quote(" dondu 4/1/98 created")
  32. cpp_quote("")
  33. cpp_quote("--*/")
  34. // mailimsg.idl : IDL source for mailmsgi.dll
  35. //
  36. // This file will be processed by the MIDL tool to
  37. // produce the type library (mailmsg.tlb) and marshalling code.
  38. import "oaidl.idl";
  39. import "ocidl.idl";
  40. import "mailmsg.idl";
  41. //@doc MAILMSGI INTERNAL
  42. #if 0
  43. cpp_quote("#if 0")
  44. cpp_quote(" // We define these here because we want the various")
  45. cpp_quote(" // methods below to be declared using these types.")
  46. cpp_quote(" // When the generated .H file is used in a C++")
  47. cpp_quote(" // compilation, this section will get thrown away by")
  48. cpp_quote(" // the preprocessor, and the actual definitions from")
  49. cpp_quote(" // atq.h and winbase.h will be used instead.")
  50. cpp_quote(" // The only real problems with doing this are that")
  51. cpp_quote(" // MIDL can't generate the correct marshalling code")
  52. cpp_quote(" // in this instance - which doesn't matter because")
  53. cpp_quote(" // these interfaces are [local]. And of course, the")
  54. cpp_quote(" // type library get generated wrong, so tools like")
  55. cpp_quote(" // VB which read the type library will get confused...")
  56. struct _OVERLAPPED {
  57. int dummy;
  58. };
  59. typedef struct _OVERLAPPED OVERLAPPED;
  60. struct _ATQ_CONTEXT_PUBLIC {
  61. int dummy;
  62. };
  63. struct _ATQ_COMPLETION {
  64. int dummy;
  65. };
  66. typedef struct _ATQ_COMPLETION *ATQ_COMPLETION;
  67. cpp_quote("#endif")
  68. typedef BOOL (*PFNAtqAddAsyncHandle)(struct _ATQ_CONTEXT_PUBLIC **,
  69. void *,
  70. void *,
  71. ATQ_COMPLETION,
  72. DWORD,
  73. HANDLE);
  74. typedef void (*PFNAtqFreeContext)(struct _ATQ_CONTEXT_PUBLIC *,
  75. BOOL);
  76. #endif
  77. #if 0
  78. /*
  79. @interface IMailMsgBindATQ | Interface for ATQ binding operations on a mail message.
  80. @meth HRESULT | BindToStore | Bind a mail message to a store, with ATQ info.
  81. @meth HRESULT | GetATQInfo | Get the ATQ binding (with async completion).
  82. @meth HRESULT | ReleaseATQHandle | Decrement the reference count on the ATQ binding.
  83. */
  84. [
  85. helpstring("Interface for ATQ binding operations on a mail message."),
  86. local,
  87. object,
  88. pointer_default(unique),
  89. uuid(accb770c-c9d5-11d1-9ff2-00c04fa37348)
  90. ]
  91. interface IMailMsgBindATQ : IMailMsgBind
  92. {
  93. //@method HRESULT | IMailMsgBindATQ | BindToStore | Bind a mail message to a store, with ATQ info.
  94. // This method will associate the content file with ATQ, and return the ATQ context. It increments
  95. // the usage count on the ATQ handle, so the caller must call ReleaseATQHandle at some point after
  96. // making this call in order to release that reference.
  97. //@parm IMailMsgPropertyStream * | pStream | [in] Specifies the property stream.
  98. //@parm IMailMsgStoreDriver * | pStore | [in] Specifies the store driver.
  99. //@parm PFIO_CONTEXT | hContentFile | [in] Specifies the content file.
  100. //@parm void * | pvClientContext | [in] Specifies the client context. This parameter is passed as
  101. // the ClientContext parameter to AtqAddAsyncHandle if the message object needs to re-associate the
  102. // content handle with the ATQ.
  103. //@parm ATQ_COMPLETION | pfnCompletion | [in] Specifies the completion function. This parameter is
  104. // passed as the pfnCompletion parameter to AtqAddAsyncHandle if the message object needs to
  105. // re-associate the content handle with the ATQ.
  106. //@parm DWORD | dwTimeout | [in] Specifies the i/o timeout. This parameter is passed as the TimeOut
  107. // parameter to AtqAddAsyncHandle if the message object needs to re-associate the conent handle with
  108. // the ATQ.
  109. //@parm struct _ATQ_CONTEXT_PUBLIC ** | ppATQContext | [out] Receives the ATQ context.
  110. //@parm PFNAtqAddAsyncHandle | pfnAtqAddAsyncHandle | [in] Function to call to add an async handle.
  111. //@parm PFNAtqFreeContext | pfnAtqFreeContext | [in] Function to call to free an async context.
  112. //@rvalue S_OK | Success.
  113. HRESULT BindToStore([in] IMailMsgPropertyStream *pStream,
  114. [in] IMailMsgStoreDriver *pStore,
  115. [in] PFIO_CONTEXT hContentFile,
  116. [in] void *pvClientContext,
  117. [in] ATQ_COMPLETION pfnCompletion,
  118. [in] DWORD dwTimeout,
  119. [out] struct _ATQ_CONTEXT_PUBLIC **ppATQContext,
  120. [in] PFNAtqAddAsyncHandle pfnAtqAddAsyncHandle,
  121. [in] PFNAtqFreeContext pfnAtqFreeContext);
  122. //@method HRESULT | IMailMsgBindATQ | GetATQInfo | Get the ATQ binding (with async completion). This
  123. // method increments the usage count on the ATQ binding, preventing the content handle from being
  124. // closed. The IMailMsgBindATQ::ReleaseATQHandle method must be called to decrement the usage count
  125. // once operations on the handle are complete.
  126. //@parm struct _ATQ_CONTEXT_PUBLIC ** | ppATQContext | [out] Receives the ATQ context.
  127. //@parm PFIO_CONTEXT * | phAsyncIO | [out] Receives the file handle.
  128. //@parm IMailMsgNotify * | pNotify | [in,unique] Interface to notify for async completion. If this
  129. // value is NULL, then the method will complete synchronously. Even if this value is non-NULL, the
  130. // method may still complete synchronously (i.e. it may return S_OK instead of MAILMSG_S_PENDING).
  131. //@rvalue S_OK | Success. The operation completed synchronously.
  132. //@rvalue MAILMSG_S_PENDING | Success. The operation is pending, and pNotify->Notify will be called
  133. // with the result of the operation when it completes.
  134. //@xref <i IMailMsgNotify> <om IMailMsgNotify.Notify> <om IMailMsgBindATQ.ReleaseATQHandle>
  135. [helpstring("Get the ATQ binding (with async completion).")]
  136. HRESULT GetATQInfo([out] struct _ATQ_CONTEXT_PUBLIC **ppATQContext,
  137. [out] PFIO_CONTEXT *phAsyncIO,
  138. [in,unique] IMailMsgNotify *pNotify);
  139. //@method HRESULT | IMailMsgBindATQ | ReleaseATQHandle | Decrement the reference count on the ATQ
  140. // binding.
  141. //@rvalue S_OK | Success.
  142. //@xref <om IMailMsgBindATQ.GetATQInfo>
  143. [helpstring("Decrement the reference count on the ATQ binding.")]
  144. HRESULT ReleaseATQHandle();
  145. };
  146. #endif
  147. /*
  148. @interface IMailMsgPushContent | Interface for pushing content into a mail message.
  149. @meth HRESULT | Push | Push content into a mail message.
  150. @meth HRESULT | Complete | Signal that all of the content has been pushed into the mail message.
  151. @meth HRESULT | GetTotalHeaderSize | Get the total size of all of the headers.
  152. @meth HRESULT | GetHeaders | Get the headers into a buffer.
  153. @meth HRESULT | Write Headers | Write the headers to the content file (with async completion).
  154. @meth HRESULT | ReleaseContent | Signal that all operations on the headers are complete, and that the
  155. input blocks are to be released.
  156. */
  157. [
  158. helpstring("Interface for pushing content into a mail message."),
  159. local,
  160. object,
  161. pointer_default(unique),
  162. uuid(7c5b895e-c9df-11d1-9ff2-00c04fa37348)
  163. ]
  164. interface IMailMsgPushContent : IUnknown
  165. {
  166. //@method HRESULT | IMailMsgPushContent | Push | Push content into a mail message.
  167. //@parm DWORD | dwLength | [in] Specifies the length of the block of content.
  168. //@parm BYTE * | pbData | [in] Specifies the block of content. The caller must not change this block
  169. // of memory until after calling IMailMsgPustContent::ReleaseContent.
  170. //@parm DWORD * | pdwBodyOffset | [out] Receives the offset of the start of the body. This parameter
  171. // is only set when the method returns S_OK. This parameter may be NULL.
  172. //@rvalue S_OK | Success. All of the headers have been pushed, and header manipulation through
  173. // the MIMEOLE interface may be done. The pdwOffset parameter is set with the offset of the start
  174. // of the body. Even when all of the content has been pushed, this method might not return S_OK -
  175. // if, after the last block has been pushed an S_OK has not been returned, the caller must call
  176. // IMailMsgPustContent::Complete.
  177. //@rvalue S_FALSE | Success. Not all of the headers have been pushed.
  178. //@xref <om IMailMsgPustContent.ReleaseContent> <om IMailMsgPustContent::Complete>
  179. [helpstring("Push content into a mail message.")]
  180. HRESULT Push([in] DWORD dwLength,
  181. [in,size_is(dwLength)] BYTE *pbData,
  182. [out] DWORD *pdwBodyOffset);
  183. //@method HRESULT | IMailMsgPushContent | Complete | Signal that all of the content has been pushed
  184. // into the mail message.
  185. //@parm DWORD * | pdwBodyOffset | [out] Receives the offset of the start of the body. This parameter
  186. // may be NULL.
  187. //@rvalue S_OK | Success.
  188. //@rvalue E_INVALIDARG | Failure. The content is malformed.
  189. [helpstring("Signal that all of the content has been pushed into the mail message.")]
  190. HRESULT Complete([out] DWORD *pdwBodyOffset);
  191. //@method HRESULT | IMailMsgPushContent | GetTotalHeaderSize | Get the total size of all of the
  192. // headers. This method can only be called once header manipulation through MIMEOLE is complete.
  193. //@parm DWORD * | pdwHeaderSize | [out] Receives the result.
  194. //@rvalue S_OK | Success.
  195. [helpstring("Get the total size of all of the headers.")]
  196. HRESULT GetTotalHeaderSize([out] DWORD *pdwHeaderSize);
  197. //@method HRESULT | IMailMsgPushContent | GetHeaders | Get the headers into a buffer. This method can
  198. // only be called once header manipulation through MIMEOLE is complete.
  199. //@parm DWORD | dwLength | [in] Specifies the length of the buffer.
  200. //@parm BYTE * | pbData | [out] Specifies the buffer.
  201. //@rvalue S_OK | Success.
  202. [helpstring("Get the headers into a buffer.")]
  203. HRESULT GetHeaders([in] DWORD dwLength,
  204. [out,unique,size_is(dwLength)] BYTE *pbData);
  205. //@method HRESULT | IMailMsgPushContent | WriteHeaders | Write the headers (with async completion).
  206. // The content file must have been set using IMailMsgBind::BindToStore. This method can only be
  207. // called once header manipulation through MIMEOLE is complete. The method performs its i/o through
  208. // an OVERLAPPED operation - the client may safely perform concurrent i/o on the content file before
  209. // this method completes.
  210. //@parm IMailMsgNotify * | pNotify | [in,unique] Interface to notify for async completion. If this
  211. // value is NULL, then the method will complete synchronously. Even if this value is non-NULL, the
  212. // method may still complete synchronously (i.e. it may return S_OK instead of MAILMSG_S_PENDING).
  213. //@rvalue S_OK | Success. The operation completed synchronously.
  214. //@rvalue MAILMSG_S_PENDING | Success. The operation is pending, and pNotify->Notify will be called
  215. // with the result of the operation when it completes.
  216. //@xref <i IMailMsgNotify> <om IMailMsgNotify.Notify> <om IMailMsgBind.BindToStore>
  217. [helpstring("Write the headers to the content file (with async completion).")]
  218. HRESULT WriteHeaders([in,unique] IMailMsgNotify *pNotify);
  219. //@method HRESULT | IMailMsgPushContent | ReleaseContent | Signal that all operations on the headers
  220. // are complete, and that the input blocks are to be released.
  221. //@rvalue S_OK | Success.
  222. //@xref <om IMailMsgPushContent.Push>
  223. [helpstring("Signal that all operations on the headers are complete, and that the input blocks are to be released.")]
  224. HRESULT ReleaseContent();
  225. };
  226. /*
  227. @interface IMailMsgAQueueListEntry | Interface to allow AQ to get a pointer to our list entry.
  228. @meth HRESULT | GetListEntry | Get the list entry pointer
  229. */
  230. [
  231. helpstring("Internal interface to allow AQueue to access list entry."),
  232. local,
  233. object,
  234. pointer_default(unique),
  235. uuid(a83bf034-a988-11d2-94e8-00c04fa379f1)
  236. ]
  237. interface IMailMsgAQueueListEntry : IUnknown
  238. {
  239. //@method HRESULT | IMailMsgAQueueListEntry | GetListEntry | Get a pointer
  240. // to a LIST_ENTRY for use by AQueue.
  241. //@parm void ** | pple | [in] A pointer to receive the pointer to
  242. // the list entry. The LIST_ENTRY should be immediately followed by a
  243. // PVOID. All three of these pointers are owned by the transport
  244. // implementation.
  245. //@rvalue S_OK | Success. This method cannot fail.
  246. [helpstring("GetListEntry method")]
  247. HRESULT GetListEntry([in] void **pple);
  248. };
  249. [
  250. helpstring("Mail Message Internal 1.0 Type Library"),
  251. uuid(8e73c9a8-c9d5-11d1-9ff2-00c04fa37348),
  252. version(1.0)
  253. ]
  254. library MailMsgILib
  255. {
  256. importlib("stdole2.tlb");
  257. interface IMailMsgNotify;
  258. interface IMailMsgPropertyStream;
  259. interface IMailMsgRecipientsBase;
  260. interface IMailMsgRecipientsAdd;
  261. interface IMailMsgRecipients;
  262. interface IMailMsgProperties;
  263. interface IMailMsgPropertyManagement;
  264. interface IMailMsgEnumMessages;
  265. interface IMailMsgStoreDriver;
  266. interface IMailMsgBind;
  267. // interface IMailMsgBindATQ;
  268. interface IMailMsgAQueueListEntry;
  269. [
  270. helpstring("Mail Message Class"),
  271. uuid(39b16f50-a8ba-11d1-aa91-00aa006bc80b)
  272. ]
  273. coclass MsgImp
  274. {
  275. [default] interface IMailMsgProperties;
  276. interface IMailMsgPropertyManagement;
  277. interface IMailMsgRecipients;
  278. interface IMailMsgBind;
  279. // interface IMailMsgBindATQ;
  280. };
  281. [
  282. helpstring("SMTP Server Class"),
  283. uuid(0be449d4-ec28-11d1-aa65-00c04fa35b82)
  284. ]
  285. coclass CSMTPServer
  286. {
  287. [default] interface ISMTPServer;
  288. interface ISMTPServerEx;
  289. };
  290. };