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.

230 lines
7.3 KiB

  1. //+------------------------------------------------------------
  2. //
  3. // Copyright (C) 1998, Microsoft Corporation
  4. //
  5. // File: smtpseo.h
  6. //
  7. // Contents:
  8. // Common types definitions needed across projects for SMTP's seo
  9. // dispatcher
  10. //
  11. // Classes:
  12. //
  13. // Functions:
  14. //
  15. // History:
  16. // jstamerj 980608 12:29:40: Created.
  17. //
  18. //-------------------------------------------------------------
  19. #ifndef __SMTPSEO_H__
  20. #define __SMTPSEO_H__
  21. #include <mailmsg.h>
  22. #include <smtpevent.h>
  23. //+------------------------------------------------------------
  24. //
  25. // Function: SMTP SEO completion function
  26. //
  27. // Synopsis:
  28. //
  29. // Arguments:
  30. //
  31. // Returns:
  32. // S_OK: Success
  33. //
  34. // History:
  35. // jstamerj 980610 16:13:28: Created.
  36. //
  37. //-------------------------------------------------------------
  38. typedef HRESULT (*PFN_SMTPEVENT_CALLBACK)(HRESULT hrStatus,
  39. PVOID pvContext);
  40. typedef enum _SMTP_DISPATCH_EVENT_TYPE
  41. {
  42. SMTP_EVENT_NONE = 0,
  43. SMTP_MAIL_DROP_EVENT,
  44. SMTP_STOREDRV_DELIVERY_EVENT,
  45. SMTP_STOREDRV_ALLOC_EVENT,
  46. SMTP_STOREDRV_STARTUP_EVENT,
  47. SMTP_STOREDRV_PREPSHUTDOWN_EVENT,
  48. SMTP_STOREDRV_SHUTDOWN_EVENT,
  49. SMTP_MAILTRANSPORT_SUBMISSION_EVENT,
  50. SMTP_MAILTRANSPORT_CATEGORIZE_REGISTER_EVENT,
  51. SMTP_MAILTRANSPORT_CATEGORIZE_BEGIN_EVENT,
  52. SMTP_MAILTRANSPORT_CATEGORIZE_END_EVENT,
  53. SMTP_MAILTRANSPORT_CATEGORIZE_BUILDQUERY_EVENT,
  54. SMTP_MAILTRANSPORT_CATEGORIZE_BUILDQUERIES_EVENT,
  55. SMTP_MAILTRANSPORT_CATEGORIZE_SENDQUERY_EVENT,
  56. SMTP_MAILTRANSPORT_CATEGORIZE_SORTQUERYRESULT_EVENT,
  57. SMTP_MAILTRANSPORT_CATEGORIZE_PROCESSITEM_EVENT,
  58. SMTP_MAILTRANSPORT_CATEGORIZE_EXPANDITEM_EVENT,
  59. SMTP_MAILTRANSPORT_CATEGORIZE_COMPLETEITEM_EVENT,
  60. SMTP_MAILTRANSPORT_POSTCATEGORIZE_EVENT,
  61. SMTP_MAILTRANSPORT_GET_ROUTER_FOR_MESSAGE_EVENT,
  62. SMTP_STOREDRV_ENUMMESS_EVENT,
  63. SMTP_MAILTRANSPORT_PRECATEGORIZE_EVENT,
  64. SMTP_MSGTRACKLOG_EVENT,
  65. SMTP_DNSRESOLVERRECORDSINK_EVENT,
  66. SMTP_MAXMSGSIZE_EVENT,
  67. SMTP_LOG_EVENT,
  68. SMTP_GET_AUX_DOMAIN_INFO_FLAGS_EVENT
  69. } SMTP_DISPATCH_EVENT_TYPE;
  70. typedef struct _EVENTPARAMS_SUBMISSION {
  71. IMailMsgProperties *pIMailMsgProperties;
  72. PFN_SMTPEVENT_CALLBACK pfnCompletion;
  73. PVOID pCCatMsgQueue;
  74. } EVENTPARAMS_SUBMISSION, *PEVENTPARAMS_SUBMISSION;
  75. typedef struct _EVENTPARAMS_PRECATEGORIZE {
  76. IMailMsgProperties *pIMailMsgProperties;
  77. PFN_SMTPEVENT_CALLBACK pfnCompletion;
  78. PVOID pCCatMsgQueue;
  79. } EVENTPARAMS_PRECATEGORIZE, *PEVENTPARAMS_PRECATEGORIZE;
  80. typedef struct _EVENTPARAMS_POSTCATEGORIZE {
  81. IMailMsgProperties *pIMailMsgProperties;
  82. PFN_SMTPEVENT_CALLBACK pfnCompletion;
  83. PVOID pCCatMsgQueue;
  84. } EVENTPARAMS_POSTCATEGORIZE, *PEVENTPARAMS_POSTCATEGORIZE;
  85. typedef struct _EVENTPARAMS_CATREGISTER {
  86. ICategorizerParameters *pICatParams;
  87. PFN_SMTPEVENT_CALLBACK pfnDefault;
  88. LPSTR pszSourceLine;
  89. LPVOID pvCCategorizer;
  90. HRESULT hrSinkStatus;
  91. } EVENTPARAMS_CATREGISTER, *PEVENTPARAMS_CATREGISTER;
  92. typedef struct _EVENTPARAMS_CATBEGIN {
  93. ICategorizerMailMsgs *pICatMailMsgs;
  94. } EVENTPARAMS_CATBEGIN, *PEVENTPARAMS_CATBEGIN;
  95. typedef struct _EVENTPARAMS_CATEND {
  96. ICategorizerMailMsgs *pICatMailMsgs;
  97. HRESULT hrStatus;
  98. } EVENTPARAMS_CATEND, *PEVENTPARAMS_CATEND;
  99. typedef struct _EVENTPARAMS_CATBUILDQUERY {
  100. ICategorizerParameters *pICatParams;
  101. ICategorizerItem *pICatItem;
  102. PFN_SMTPEVENT_CALLBACK pfnDefault;
  103. PVOID pCCatAddr;
  104. } EVENTPARAMS_CATBUILDQUERY, *PEVENTPARAMS_CATBUILDQUERY;
  105. typedef struct _EVENTPARAMS_CATBUILDQUERIES {
  106. ICategorizerParameters *pICatParams;
  107. DWORD dwcAddresses;
  108. ICategorizerItem **rgpICatItems;
  109. ICategorizerQueries *pICatQueries;
  110. PFN_SMTPEVENT_CALLBACK pfnDefault;
  111. PVOID pblk;
  112. } EVENTPARAMS_CATBUILDQUERIES, *PEVENTPARAMS_CATBUILDQUERIES;
  113. typedef struct _EVENTPARAMS_CATSENDQUERY {
  114. //
  115. // Params needed to call real sinks
  116. //
  117. ICategorizerParameters *pICatParams;
  118. ICategorizerQueries *pICatQueries;
  119. ICategorizerAsyncContext *pICatAsyncContext;
  120. //
  121. // Params needed by our implementation of ICategorizerAsyncContext
  122. //
  123. IMailTransportNotify *pIMailTransportNotify;
  124. PVOID pvNotifyContext;
  125. HRESULT hrResolutionStatus;
  126. PVOID pblk;
  127. //
  128. // Default/completion processing functions
  129. //
  130. PFN_SMTPEVENT_CALLBACK pfnDefault;
  131. PFN_SMTPEVENT_CALLBACK pfnCompletion;
  132. } EVENTPARAMS_CATSENDQUERY, *PEVENTPARAMS_CATSENDQUERY;
  133. typedef struct _EVENTPARAMS_CATSORTQUERYRESULT {
  134. ICategorizerParameters *pICatParams;
  135. HRESULT hrResolutionStatus;
  136. DWORD dwcAddresses;
  137. ICategorizerItem **rgpICatItems;
  138. DWORD dwcResults;
  139. ICategorizerItemAttributes **rgpICatItemAttributes;
  140. PFN_SMTPEVENT_CALLBACK pfnDefault;
  141. PVOID pblk;
  142. } EVENTPARAMS_CATSORTQUERYRESULT, *PEVENTPARAMS_CATSORTQUERYRESULT;
  143. typedef struct _EVENTPARAMS_CATPROCESSITEM {
  144. ICategorizerParameters *pICatParams;
  145. ICategorizerItem *pICatItem;
  146. PFN_SMTPEVENT_CALLBACK pfnDefault;
  147. PVOID pCCatAddr;
  148. } EVENTPARAMS_CATPROCESSITEM, *PEVENTPARAMS_CATPROCESSITEM;
  149. typedef struct _EVENTPARAMS_CATEXPANDITEM {
  150. ICategorizerParameters *pICatParams;
  151. ICategorizerItem *pICatItem;
  152. PFN_SMTPEVENT_CALLBACK pfnDefault;
  153. PFN_SMTPEVENT_CALLBACK pfnCompletion;
  154. PVOID pCCatAddr;
  155. IMailTransportNotify *pIMailTransportNotify;
  156. PVOID pvNotifyContext;
  157. } EVENTPARAMS_CATEXPANDITEM, *PEVENTPARAMS_CATEXPANDITEM;
  158. typedef struct _EVENTPARAMS_CATCOMPLETEITEM {
  159. ICategorizerParameters *pICatParams;
  160. ICategorizerItem *pICatItem;
  161. PFN_SMTPEVENT_CALLBACK pfnDefault;
  162. PVOID pCCatAddr;
  163. } EVENTPARAMS_CATCOMPLETEITEM, *PEVENTPARAMS_CATCOMPLETEITEM;
  164. typedef struct _EVENTPARAMS_ROUTER {
  165. DWORD dwVirtualServerID;
  166. IMailMsgProperties *pIMailMsgProperties;
  167. IMessageRouter *pIMessageRouter;
  168. IMailTransportRouterReset *pIRouterReset;
  169. IMailTransportRoutingEngine *pIRoutingEngineDefault;
  170. } EVENTPARAMS_ROUTER, *PEVENTPARAMS_ROUTER;
  171. typedef struct _EVENTPARAMS_MSGTRACKLOG
  172. {
  173. IUnknown *pIServer;
  174. IMailMsgProperties *pIMailMsgProperties;
  175. LPMSG_TRACK_INFO pMsgTrackInfo;
  176. } EVENTPARAMS_MSGTRACKLOG, *PEVENTPARAMS_MSGTRACKLOG;
  177. typedef struct _EVENTPARAMS_DNSRESOLVERRECORD {
  178. LPSTR pszHostName;
  179. LPSTR pszFQDN;
  180. DWORD dwVirtualServerId;
  181. DNS_SERVER_INFO **ppDnsServerInfo;
  182. IDnsResolverRecord **ppIDnsResolverRecord;
  183. } EVENTPARAMS_DNSRESOLVERRECORD, *PEVENTPARAMS_DNSRESOLVERRECORD;
  184. typedef struct _EVENTPARAMS_MAXMSGSIZE
  185. {
  186. IUnknown *pIUnknown;
  187. IMailMsgProperties *pIMailMsg;
  188. BOOL *pfShouldImposeLimit;
  189. } EVENTPARAMS_MAXMSGSIZE, *PEVENTPARAMS_MAXMSGSIZE;
  190. typedef struct _EVENTPARAMS_LOG
  191. {
  192. LPSMTP_LOG_EVENT_INFO pSmtpEventLogInfo;
  193. PVOID pDefaultEventLogHandler;
  194. DWORD iSelectedDebugLevel;
  195. } EVENTPARAMS_LOG, *PEVENTPARAMS_LOG;
  196. typedef struct _EVENTPARAMS_GET_AUX_DOMAIN_INFO_FLAGS
  197. {
  198. IUnknown *pIServer;
  199. LPCSTR pszDomainName;
  200. DWORD *pdwDomainInfoFlags;
  201. } EVENTPARAMS_GET_AUX_DOMAIN_INFO_FLAGS, *PEVENTPARAMS_GET_AUX_DOMAIN_INFO_FLAGS;
  202. #endif //__SMTPSEO_H__