SmtpEvent.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:61k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+------------------------------------------------------------
  2. //
  3. // Copyright (C) 1999, Microsoft Corporation
  4. //
  5. // File: smtpevent.idl
  6. //
  7. // Contents: SMTP Server Event interfaces
  8. //
  9. // Description: This file contains the interface definitions for the
  10. //              SMTP Server Events.
  11. //
  12. //-------------------------------------------------------------
  13. cpp_quote("#ifndef __SMTPEVENT_H__")
  14. cpp_quote("#define __SMTPEVENT_H__")
  15. import "unknwn.idl";
  16. import "wtypes.idl";
  17. import "ocidl.idl";
  18. import "mailmsg.idl";
  19. //+------------------------------------------------------------
  20. //
  21. // The SMTP Protocol events interfaces:
  22. //
  23. //-------------------------------------------------------------
  24. cpp_quote("//")
  25. cpp_quote("// Define sink return codes")
  26. cpp_quote("//")
  27. cpp_quote("#define EXPE_S_CONSUMED              0x00000002")
  28. cpp_quote("//")
  29. cpp_quote("// Define well-known status codes")
  30. cpp_quote("//")
  31. cpp_quote("#define EXPE_SUCCESS                 0x00000000")
  32. cpp_quote("#define EXPE_NOT_PIPELINED           0x00000000")
  33. cpp_quote("#define EXPE_PIPELINED               0x00000001")
  34. cpp_quote("#define EXPE_REPEAT_COMMAND          0x00000002")
  35. cpp_quote("#define EXPE_BLOB_READY              0x00000004")
  36. cpp_quote("#define EXPE_BLOB_DONE               0x00000008")
  37. cpp_quote("#define EXPE_DROP_SESSION            0x00010000")
  38. cpp_quote("#define EXPE_CHANGE_STATE            0x00020000")
  39. cpp_quote("#define EXPE_TRANSIENT_FAILURE       0x00040000")
  40. cpp_quote("#define EXPE_COMPLETE_FAILURE        0x00080000")
  41. cpp_quote("#define EXPE_UNHANDLED                       0xffffffff")
  42. cpp_quote("//")
  43. cpp_quote("// Define constants for next states")
  44. cpp_quote("//")
  45. cpp_quote("typedef enum _PE_STATES")
  46. cpp_quote("{")
  47. cpp_quote("     PE_STATE_DEFAULT = 0,")
  48. cpp_quote("     PE_STATE_SESSION_START,")
  49. cpp_quote("     PE_STATE_MESSAGE_START,")
  50. cpp_quote("     PE_STATE_PER_RECIPIENT,")
  51. cpp_quote("     PE_STATE_DATA_OR_BDAT,")
  52. cpp_quote("     PE_STATE_SESSION_END,")
  53. cpp_quote("     PE_STATE_MAX_STATES = PE_STATE_SESSION_END")
  54. cpp_quote("")
  55. cpp_quote("} PE_STATES;")
  56. cpp_quote("//")
  57. cpp_quote("// Define macros for checking SMTP return code classes")
  58. cpp_quote("//")
  59. cpp_quote("#define IsSmtpPreliminarySuccess(x)          ((((x) % 100) == 1)?TRUE:FALSE)")
  60. cpp_quote("#define IsSmtpCompleteSuccess(x)                     ((((x) % 100) == 2)?TRUE:FALSE)")
  61. cpp_quote("#define IsSmtpIntermediateSuccess(x)         ((((x) % 100) == 3)?TRUE:FALSE)")
  62. cpp_quote("#define IsSmtpTransientFailure(x)            ((((x) % 100) == 4)?TRUE:FALSE)")
  63. cpp_quote("#define IsSmtpCompleteFailure(x)                     ((((x) % 100) == 5)?TRUE:FALSE)")
  64. cpp_quote("//")
  65. cpp_quote("// Define well known IServer property IDs")
  66. cpp_quote("//")
  67. cpp_quote("#define PE_ISERVID_DW_INSTANCE               0")
  68. cpp_quote("#define PE_ISERVID_SZ_DEFAULTDOMAIN          1")
  69. cpp_quote("#define PE_ISERVID_DW_CATENABLE              2")
  70. cpp_quote("#define PE_ISERVID_DW_CATFLAGS               3")
  71. cpp_quote("#define PE_ISERVID_DW_CATPORT                4")
  72. cpp_quote("#define PE_ISERVID_SZ_CATUSER                5")
  73. cpp_quote("#define PE_ISERVID_SZ_CATSCHEMA              6")
  74. cpp_quote("#define PE_ISERVID_SZ_CATBINDTYPE            7")
  75. cpp_quote("#define PE_ISERVID_SZ_CATPASSWORD            8")
  76. cpp_quote("#define PE_ISERVID_SZ_CATDOMAIN              9")
  77. cpp_quote("#define PE_ISERVID_SZ_CATNAMINGCONTEXT      10")
  78. cpp_quote("#define PE_ISERVID_SZ_CATDSTYPE             11")
  79. cpp_quote("#define PE_ISERVID_SZ_CATDSHOST             12")
  80. cpp_quote("//")
  81. cpp_quote("// Define well known ISession property IDs")
  82. cpp_quote("//")
  83. cpp_quote("#define ISESSION_PID_IS_SESSION_AUTHENTICATED 0")
  84. cpp_quote("#define ISESSION_PID_AUTHENTICATED_USERNAME   1")
  85. cpp_quote("#define ISESSION_PID_REMOTE_SERVER_NAME       2")
  86. interface ISmtpInCallbackSink;
  87. [
  88.                 object,
  89.                 local,
  90.                 uuid(5F15C533-E90E-11D1-8852-00C04FA35B86),
  91.                 helpstring("ISmtpInCommandContext Interface"),
  92.                 pointer_default(unique)
  93. ]
  94. interface ISmtpInCommandContext : IUnknown
  95. {
  96.         // Query methods
  97.         HRESULT QueryCommand(
  98.                                 [out,size_is(*pdwSize)] LPSTR   pszCommand,
  99.                                 [in,out]                                DWORD   *pdwSize
  100.                                 );
  101.         HRESULT QueryCommandKeyword(
  102.                                 [out,size_is(*pdwSize)] LPSTR   pszKeyword,
  103.                                 [in,out]                                DWORD   *pdwSize
  104.                                 );
  105.         HRESULT QueryNativeResponse(
  106.                                 [out,size_is(*pdwSize)] LPSTR   pszNativeResponse,
  107.                                 [in,out]                                DWORD   *pdwSize
  108.                                 );
  109.         HRESULT QueryResponse(
  110.                                 [out,size_is(*pdwSize)] LPSTR   pszResponse,
  111.                                 [in,out]                                DWORD   *pdwSize
  112.                                 );
  113.         HRESULT QueryCommandSize(
  114.                                 [out] DWORD     *pdwSize
  115.                                 );
  116.         HRESULT QueryCommandKeywordSize(
  117.                                 [out] DWORD     *pdwSize
  118.                                 );
  119.         HRESULT QueryNativeResponseSize(
  120.                                 [out] DWORD     *pdwSize
  121.                                 );
  122.         HRESULT QueryResponseSize(
  123.                                 [out] DWORD     *pdwSize
  124.                                 );
  125.         HRESULT QueryCommandStatus(
  126.                                 [out] DWORD     *pdwCommandStatus
  127.                                 );
  128.         HRESULT QuerySmtpStatusCode(
  129.                                 [out] DWORD     *pdwSmtpStatus
  130.                                 );
  131.         HRESULT QueryProtocolErrorFlag(
  132.                                 [out] BOOL      *pfProtocolError
  133.                                 );
  134.         // Set methods
  135.         HRESULT SetResponse(
  136.                                 [in,string] LPSTR       pszResponse,
  137.                                 [in]            DWORD   dwSize
  138.                                 );
  139.         HRESULT AppendResponse(
  140.                                 [in,string] LPSTR       pszResponse,
  141.                                 [in]            DWORD   dwSize
  142.                                 );
  143.         HRESULT SetNativeResponse(
  144.                                 [in,string] LPSTR       pszNativeResponse,
  145.                                 [in]            DWORD   dwSize
  146.                                 );
  147.         HRESULT AppendNativeResponse(
  148.                                 [in,string] LPSTR       pszNativeResponse,
  149.                                 [in]            DWORD   dwSize
  150.                                 );
  151.         HRESULT SetCommandStatus(
  152.                                 [in] DWORD      dwCommandStatus
  153.                                 );
  154.         HRESULT SetSmtpStatusCode(
  155.                                 [in] DWORD      dwSmtpStatus
  156.                                 );
  157.         HRESULT SetProtocolErrorFlag(
  158.                                 [in] BOOL       fProtocolError
  159.                                 );
  160.         // Async completion callback
  161.         HRESULT NotifyAsyncCompletion(
  162.                                 [in] HRESULT    hrResult
  163.                                 );
  164.         HRESULT SetCallback(
  165.                                 [in] ISmtpInCallbackSink * pICallback
  166.                                 );
  167. };
  168. [
  169.                 object,
  170.                 local,
  171.                 uuid(5e4fc9da-3e3b-11d3-88f1-00c04fa35b86),
  172.                 helpstring("ISmtpInCallbackContext Interface"),
  173.                 pointer_default(unique)
  174. ]
  175. interface ISmtpInCallbackContext : IUnknown
  176. {
  177.         // Query methods
  178.         HRESULT QueryBlob(
  179.                                 [out]           BYTE    **ppbBlob,
  180.                                 [in,out]        DWORD   *pdwSize
  181.                                 );
  182.         HRESULT QueryBlobSize(
  183.                                 [out] DWORD     *pdwSize
  184.                                 );
  185.         // Set methods
  186.         HRESULT SetResponse(
  187.                                 [in,string] LPSTR       pszResponse,
  188.                                 [in]            DWORD   dwSize
  189.                                 );
  190.         HRESULT AppendResponse(
  191.                                 [in,string] LPSTR       pszResponse,
  192.                                 [in]            DWORD   dwSize
  193.                                 );
  194.         HRESULT SetCommandStatus(
  195.                                 [in] DWORD      dwCommandStatus
  196.                                 );
  197.         HRESULT SetSmtpStatusCode(
  198.                                 [in] DWORD      dwSmtpStatus
  199.                                 );
  200. };
  201. [
  202.                 object,
  203.                 local,
  204.                 uuid(c849b5f2-0a80-11d2-aa67-00c04fa35b82),
  205.                 helpstring("ISmtpOutCommandContext Interface"),
  206.                 pointer_default(unique)
  207. ]
  208. interface ISmtpOutCommandContext : IUnknown
  209. {
  210.         // Query methods
  211.         HRESULT QueryCommand(
  212.                                 [out,size_is(*pdwSize)] LPSTR   pszCommand,
  213.                                 [in,out]                                DWORD   *pdwSize
  214.                                 );
  215.         HRESULT QueryCommandKeyword(
  216.                                 [out,size_is(*pdwSize)] LPSTR   pszKeyword,
  217.                                 [in,out]                                DWORD   *pdwSize
  218.                                 );
  219.         HRESULT QueryNativeCommand(
  220.                                 [out,size_is(*pdwSize)] LPSTR   pszNativeCommand,
  221.                                 [in,out]                                DWORD   *pdwSize
  222.                                 );
  223.         HRESULT QueryCommandSize(
  224.                                 [out] DWORD     *pdwSize
  225.                                 );
  226.         HRESULT QueryCommandKeywordSize(
  227.                                 [out] DWORD     *pdwSize
  228.                                 );
  229.         HRESULT QueryNativeCommandSize(
  230.                                 [out] DWORD     *pdwSize
  231.                                 );
  232.         HRESULT QueryCurrentRecipientIndex(
  233.                                 [out] DWORD     *pdwRecipientIndex
  234.                                 );
  235.         HRESULT QueryCommandStatus(
  236.                                 [out] DWORD     *pdwCommandStatus
  237.                                 );
  238.         // Set methods
  239.         HRESULT SetCommand(
  240.                                 [in,string] LPSTR       szCommand,
  241.                                 [in]            DWORD   dwSize
  242.                                 );
  243.         HRESULT AppendCommand(
  244.                                 [in,string] LPSTR       szCommand,
  245.                                 [in]            DWORD   dwSize
  246.                                 );
  247.         HRESULT SetCommandStatus(
  248.                                 [in] DWORD      dwCommandStatus
  249.                                 );
  250.         // Async completion callback
  251.         HRESULT NotifyAsyncCompletion(
  252.                                 [in] HRESULT    hrResult
  253.                                 );
  254.         HRESULT SetBlob(
  255.                                 [in]            BYTE    *pbBlob,
  256.                                 [in]            DWORD   dwSize
  257.                                 );
  258. };
  259. [
  260.                 object,
  261.                 local,
  262.                 uuid(e38f9ad2-0a82-11d2-aa67-00c04fa35b82),
  263.                 helpstring("ISmtpServerResponseContext Interface"),
  264.                 pointer_default(unique)
  265. ]
  266. interface ISmtpServerResponseContext : IUnknown
  267. {
  268.         // Query methods
  269.         HRESULT QueryCommand(
  270.                                 [out,size_is(*pdwSize)] LPSTR   pszCommand,
  271.                                 [in,out]                                DWORD   *pdwSize
  272.                                 );
  273.         HRESULT QueryCommandKeyword(
  274.                                 [out,size_is(*pdwSize)] LPSTR   pszKeyword,
  275.                                 [in,out]                                DWORD   *pdwSize
  276.                                 );
  277.         HRESULT QueryResponse(
  278.                                 [out,size_is(*pdwSize)] LPSTR   pszResponse,
  279.                                 [in,out]                                DWORD   *pdwSize
  280.                                 );
  281.         HRESULT QueryCommandSize(
  282.                                 [out] DWORD     *pdwSize
  283.                                 );
  284.         HRESULT QueryCommandKeywordSize(
  285.                                 [out] DWORD     *pdwSize
  286.                                 );
  287.         HRESULT QueryResponseSize(
  288.                                 [out] DWORD     *pdwSize
  289.                                 );
  290.         HRESULT QuerySmtpStatusCode(
  291.                                 [out] DWORD     *pdwSmtpStatus
  292.                                 );
  293.         HRESULT QueryResponseStatus(
  294.                                 [out] DWORD     *pdwResponseStatus
  295.                                 );
  296.         HRESULT QueryPipelinedFlag(
  297.                                 [out] BOOL      *pfResponseIsPipelined
  298.                                 );
  299.         HRESULT QueryNextEventState(
  300.                                 [out] DWORD     *pdwNextState
  301.                                 );
  302.         // Set methods
  303.         HRESULT SetResponseStatus(
  304.                                 [in] DWORD      dwResponseStatus
  305.                                 );
  306.         HRESULT SetNextEventState(
  307.                                 [in] DWORD      dwNextState
  308.                                 );
  309.         // Async completion callback
  310.         HRESULT NotifyAsyncCompletion(
  311.                                 [in] HRESULT    hrResult
  312.                                 );
  313. };
  314. // =============================================================
  315. //
  316. // Inbound Protocol Event Sink Shape
  317. //
  318. [
  319.         object,
  320.         uuid(b2d42a0e-0d5f-11d2-aa68-00c04fa35b82),
  321.         helpstring("ISmtpInCommandSink Interface"),
  322.         pointer_default(unique)
  323. ]
  324. interface ISmtpInCommandSink : IUnknown
  325. {
  326.         [helpstring("OnSmtpInCommand method")]
  327.         HRESULT OnSmtpInCommand(
  328.                                 [in] IUnknown                           *pServer,
  329.                                 [in] IUnknown                           *pSession,
  330.                                 [in] IMailMsgProperties         *pMsg,
  331.                                 [in] ISmtpInCommandContext      *pContext
  332.                                 );
  333. };
  334. // =============================================================
  335. //
  336. // Outbound Command Generation Protocol Event Sink Shape
  337. //
  338. [
  339.         object,
  340.         uuid(cfdbb9b0-0ca0-11d2-aa68-00c04fa35b82),
  341.         helpstring("ISmtpOutCommandSink Interface"),
  342.         pointer_default(unique)
  343. ]
  344. interface ISmtpOutCommandSink : IUnknown
  345. {
  346.         [helpstring("OnSmtpOutCommand method")]
  347.         HRESULT OnSmtpOutCommand(
  348.                                 [in] IUnknown                           *pServer,
  349.                                 [in] IUnknown                           *pSession,
  350.                                 [in] IMailMsgProperties         *pMsg,
  351.                                 [in] ISmtpOutCommandContext *pContext
  352.                                 );
  353. };
  354. // =============================================================
  355. //
  356. // Server Response Protocol Event Sink Shape
  357. //
  358. [
  359.         object,
  360.         uuid(d7e10222-0ca1-11d2-aa68-00c04fa35b82),
  361.         helpstring("ISmtpServerResponseSink Interface"),
  362.         pointer_default(unique)
  363. ]
  364. interface ISmtpServerResponseSink : IUnknown
  365. {
  366.         [helpstring("OnSmtpServerResponse method")]
  367.         HRESULT OnSmtpServerResponse(
  368.                                 [in] IUnknown                                   *pServer,
  369.                                 [in] IUnknown                                   *pSession,
  370.                                 [in] IMailMsgProperties                 *pMsg,
  371.                                 [in] ISmtpServerResponseContext *pContext
  372.                                 );
  373. };
  374. // =============================================================
  375. //
  376. // Inbound Protocol Event Callback Sink Shape
  377. //
  378. [
  379.         object,
  380.         uuid(0012b624-3e3c-11d3-88f1-00c04fa35b86),
  381.         helpstring("ISmtpInCallbackSink Interface"),
  382.         pointer_default(unique)
  383. ]
  384. interface ISmtpInCallbackSink : IUnknown
  385. {
  386.         [helpstring("OnSmtpInCallback method")]
  387.         HRESULT OnSmtpInCallback(
  388.                                 [in] IUnknown                           *pServer,
  389.                                 [in] IUnknown                           *pSession,
  390.                                 [in] IMailMsgProperties         *pMsg,
  391.                                 [in] ISmtpInCallbackContext     *pContext
  392.                                 );
  393. };
  394. //+------------------------------------------------------------
  395. //
  396. // The SMTP Mail Transport interfaces:
  397. //
  398. //-------------------------------------------------------------
  399. //
  400. // The default processing priority of the transport events:
  401. //
  402. cpp_quote("#define SMTP_TRANSPORT_DEFAULT_PRIORITY 16384")
  403. //+------------------------------------------------------------
  404. //
  405. // Interface: IMailTransportNotify
  406. //
  407. // Synopsis: Used for async events
  408. //
  409. //
  410. //-------------------------------------------------------------
  411. [
  412.     object,
  413.     uuid(6E1CAA77-FCD4-11d1-9DF9-00C04FA322BA),
  414.     helpstring("IMailTransportNotify Interface"),
  415.     pointer_default(unique)
  416. ]
  417. interface IMailTransportNotify : IUnknown
  418. {
  419.     [local]
  420.     HRESULT Notify(
  421.         [in] HRESULT hrCompletion,
  422.         [in] PVOID pvContext);
  423. };
  424. //+------------------------------------------------------------
  425. //
  426. // Interface: IMailTransportSubmission
  427. //
  428. // Synopsis: Used for the SMTP_MAILTRANSPORT_ONMESSAGESUBMISSION event
  429. //
  430. //
  431. //-------------------------------------------------------------
  432. [
  433.     object,
  434.     uuid(CE681916-FF14-11d1-9DFB-00C04FA322BA),
  435.     helpstring("IMailTransportSubmission Interface"),
  436.     pointer_default(unique)
  437. ]
  438. interface IMailTransportSubmission : IUnknown
  439. {
  440.     [local]
  441.     HRESULT OnMessageSubmission(
  442.         [in] IMailMsgProperties     *pIMailMsg,
  443.         [in] IMailTransportNotify   *pINotify,
  444.         [in] PVOID                   pvNotifyContext);
  445. };
  446. //+------------------------------------------------------------
  447. //
  448. // Interface: IMailTransportOnPreCategorize
  449. //
  450. // Synopsis: Used for the SMTP_MAILTRANSPORT_PRECATEGORIZE event
  451. //
  452. //
  453. //-------------------------------------------------------------
  454. [
  455.     object,
  456.     uuid(A3ACFB0E-83FF-11d2-9E14-00C04FA322BA),
  457.     helpstring("IMailTransportOnPreCategorize Interface"),
  458.     pointer_default(unique)
  459. ]
  460. interface IMailTransportOnPreCategorize : IUnknown
  461. {
  462.     [local]
  463.     HRESULT OnSyncMessagePreCategorize(
  464.         [in] IMailMsgProperties     *pIMailMsg,
  465.         [in] IMailTransportNotify   *pINotify,
  466.         [in] PVOID                   pvNotifyContext);
  467. };
  468. //+------------------------------------------------------------
  469. //
  470. // Interface: IMailTransportOnPostCategorize
  471. //
  472. // Synopsis: Used for the SMTP_MAILTRANSPORT_POSTCATEGORIZE event
  473. //
  474. //
  475. //-------------------------------------------------------------
  476. [
  477.     object,
  478.     uuid(76719653-05A6-11d2-9DFD-00C04FA322BA),
  479.     helpstring("IMailTransportOnPostCategorize Interface"),
  480.     pointer_default(unique)
  481. ]
  482. interface IMailTransportOnPostCategorize : IUnknown
  483. {
  484.     [local]
  485.     HRESULT OnMessagePostCategorize(
  486.         [in] IMailMsgProperties     *pIMailMsg,
  487.         [in] IMailTransportNotify   *pINotify,
  488.         [in] PVOID                   pvNotifyContext);
  489. };
  490. cpp_quote("#define RESET_NEXT_HOPS         0")
  491. cpp_quote("#define RESET_MESSAGE_TYPES     1")
  492. //+------------------------------------------------------------
  493. //
  494. // Interface: IMailTransportRouterReset
  495. //
  496. // Synopsis: System implemented interface for resetting routes
  497. //
  498. //
  499. //-------------------------------------------------------------
  500. [
  501.     object,
  502.     uuid(A928AD12-1610-11d2-9E02-00C04FA322BA),
  503.     helpstring("IMailTransportRouterReset Interface"),
  504.     pointer_default(unique)
  505. ]
  506. interface IMailTransportRouterReset : IUnknown
  507. {
  508.     HRESULT ResetRoutes(
  509.         [in] DWORD                   dwResetType);
  510. };
  511. //+------------------------------------------------------------
  512. //
  513. // Interface: IMailTransportSetRouterReset
  514. //
  515. // Synopsis: Used for the SMTP_MAILTRANSPORT_ON_SET_ROUTER_RESET event
  516. //
  517. //
  518. //-------------------------------------------------------------
  519. [
  520.     object,
  521.     uuid(A928AD11-1610-11d2-9E02-00C04FA322BA),
  522.     helpstring("IMailTransportSetRouterReset Interface"),
  523.     pointer_default(unique)
  524. ]
  525. interface IMailTransportSetRouterReset : IUnknown
  526. {
  527.     HRESULT RegisterResetInterface(
  528.         [in] DWORD                      dwVirtualServerID,
  529.         [in] IMailTransportRouterReset *pIRouterReset);
  530. };
  531. //+------------------------------------------------------------
  532. //
  533. // Interface: IMessageRouter
  534. //
  535. // Synopsis: Sink supplied interface
  536. //
  537. //
  538. //-------------------------------------------------------------
  539. [
  540.     object,
  541.     uuid(A928AD14-1610-11d2-9E02-00C04FA322BA),
  542.     helpstring("IMessageRouter Interface"),
  543.     pointer_default(unique)
  544. ]
  545. interface IMessageRouter : IUnknown
  546. {
  547.     [local]
  548.     GUID GetTransportSinkID();
  549.     HRESULT GetMessageType(
  550.         [in]  IMailMsgProperties        *pIMailMsg,
  551.         [out] DWORD                     *pdwMessageType);
  552.     HRESULT ReleaseMessageType(
  553.         [in]  DWORD                     dwMessageType,
  554.         [in]  DWORD                     dwReleaseCount);
  555.     [local]
  556.     HRESULT GetNextHop(
  557.         [in]  LPSTR                     pszDestinationAddressType,
  558.         [in]  LPSTR                     pszDestinationAddress,
  559.         [in]  DWORD                     dwMessageType,
  560.         [out] LPSTR                     *ppszRouteAddressType,
  561.         [out] LPSTR                     *ppszRouteAddress,
  562.         [out] DWORD                     *pdwScheduleID,
  563.         [out] LPSTR                     *ppszRouteAddressClass,
  564.         [out] LPSTR                     *ppszConnectorName,
  565.         [out] DWORD                     *pdwNextHopType);
  566.     [local]
  567.     HRESULT GetNextHopFree(
  568.         [in]  LPSTR                     pszDestinationAddressType,
  569.         [in]  LPSTR                     pszDestinationAddress,
  570.         [in]  LPSTR                     pszConnectorName,
  571.         [in]  LPSTR                     pszRouteAddressType,
  572.         [in]  LPSTR                     pszRouteAddress,
  573.         [in]  LPSTR                     pszRouteAddressClass);
  574.     HRESULT ConnectionFailed(
  575.         [in, string]  LPSTR             pszConnectorName);
  576. };
  577. //Some standard RouteAddressTypes that might be returned by GetNextHop
  578. const LPCSTR MTI_ROUTING_ADDRESS_TYPE_NULL      = NULL;
  579. const LPCSTR MTI_ROUTING_ADDRESS_TYPE_SMTP      = "SMTP";
  580. const LPCSTR MTI_ROUTING_ADDRESS_TYPE_X400      = "X400";
  581. const LPCSTR MTI_ROUTING_ADDRESS_TYPE_X500      = "X500";
  582. //---[ NEXT_HOP_TYPE ]---------------------------------------------------------
  583. //
  584. //
  585. //  Description:
  586. //      Enum for the possible next hop types
  587. //
  588. //-----------------------------------------------------------------------------
  589. typedef [v1_enum] enum {
  590.     MTI_NEXT_HOP_TYPE_SAME_VIRTUAL_SERVER,
  591.     MTI_NEXT_HOP_TYPE_PEER_SMTP1_BYPASS_CONFIG_LOOKUP,
  592.     MTI_NEXT_HOP_TYPE_EXTERNAL_SMTP,
  593.     MTI_NEXT_HOP_TYPE_UNREACHABLE,
  594.     MTI_NEXT_HOP_TYPE_CURRENTLY_UNREACHABLE,
  595.     MTI_NEXT_HOP_TYPE_PEER_SMTP2_BYPASS_CONFIG_LOOKUP
  596. } MTI_NEXT_HOP_TYPE, *PMTI_NEXT_HOP_TYPE;
  597. // #defines for old names for these values
  598. #define MTI_NEXT_HOP_TYPE_REMOTE 
  599.     (MTI_NEXT_HOP_TYPE_PEER_SMTP1_BYPASS_CONFIG_LOOKUP)
  600. #define MTI_NEXT_HOP_TYPE_RESERVED  
  601.     (MTI_NEXT_HOP_TYPE_EXTERNAL_SMTP)
  602. //+------------------------------------------------------------
  603. //
  604. // Interface: IMailTransportRouterSetLinkState
  605. //
  606. // Synopsis: System implemented interface for allowing a
  607. //  routing sink to update the link state for features such
  608. //  as:
  609. //    - Scheduled Connections
  610. //    - Scheduled Commands
  611. //
  612. //  If LINK_STATE_SCHED_ENABLED is being unset... a next
  613. //  scheduled connection time should be returned.
  614. //
  615. //
  616. //-------------------------------------------------------------
  617. [
  618.     object,
  619.     uuid(B870CE28-A755-11d2-A6A9-00C04FA3490A),
  620.     helpstring("IMailTransportRouterSetLinkState Interface"),
  621.     pointer_default(unique)
  622. ]
  623. interface IMailTransportRouterSetLinkState : IUnknown
  624. {
  625.     HRESULT SetLinkState(
  626.         [in] LPSTR                   szLinkDomainName,
  627.         [in] GUID                    guidRouterGUID,
  628.         [in] DWORD                   dwScheduleID,
  629.         [in] LPSTR                   szConnectorName,
  630.         [in] DWORD                   dwSetLinkState,
  631.         [in] DWORD                   dwUnsetLinkState,
  632.         [in] FILETIME               *pftNextScheduled,
  633.                 [in] IMessageRouter                     *pMessageRouter);
  634. };
  635. //+------------------------------------------------------------
  636. //
  637. // Interface: IMessageRouterLinkStateNotification
  638. //
  639. // Synopsis: Sink supplied interface that is used for notifying
  640. //  the routing sink of link state on connection acks.
  641. //
  642. //  If LINK_STATE_SCHED_ENABLED is being unset... a next
  643. //  scheduled connection time should be returned.
  644. //
  645. //
  646. //-------------------------------------------------------------
  647. [
  648.     object,
  649.     uuid(B870CE29-A755-11d2-A6A9-00C04FA3490A),
  650.     helpstring("IMessageRouterLinkStateNotification Interface"),
  651.     pointer_default(unique)
  652. ]
  653. interface IMessageRouterLinkStateNotification : IUnknown
  654. {
  655.     HRESULT LinkStateNotify(
  656.         [in] LPSTR                   szLinkDomainName,
  657.         [in] GUID                    guidRouterGUID,
  658.         [in] DWORD                   dwScheduleID,
  659.         [in] LPSTR                   szConnectorName,
  660.         [in] DWORD                   dwLinkState,
  661.         [in] DWORD                   cConsecutiveFailures,
  662.         [in, out] FILETIME           *pftNextScheduled,
  663.         [out] DWORD                 *pdwSetLinkState,
  664.         [out] DWORD                 *pdwUnsetLinkState);
  665. };
  666. //---[ eLinkInfoFlags ]--------------------------------------------------------
  667. //
  668. //
  669. //      Description: Flags used to describe boolean per *link* state.  Used to
  670. //  decide if it is an appropriate time to make a connection.  Event sinks
  671. //  can set and unset these flags to influence the connection manager.
  672. //
  673. //-----------------------------------------------------------------------------
  674. typedef [v1_enum] enum
  675. {
  676.     LINK_STATE_NO_ACTION            = 0x00000000, //NULL op... setting/unsetting this has no effect on link state
  677.     LINK_STATE_RETRY_ENABLED        = 0x00000001, //If NOT set, link is pending retry
  678.     LINK_STATE_SCHED_ENABLED        = 0x00000002, //If NOT set, link is pending scheduled connection
  679.     LINK_STATE_CMD_ENABLED          = 0x00000004, //If set, link should be activated to send a command
  680.     LINK_STATE_ADMIN_HALT           = 0x00000008, //If set, admin has request no connections be made
  681.     LINK_STATE_ADMIN_FORCE_CONN     = 0x00000010, //Admin has requested that a connection be made now
  682.     LINK_STATE_CONNECT_IF_NO_MSGS   = 0x00000020, //Connect even if there are no messages. Link will not be deleted while this is set.
  683.     LINK_STATE_DO_NOT_DELETE        = 0x00000040, //Routing is interested in this link... it should not be deleted by the transport.
  684.     LINK_STATE_CREATE_IF_NECESSARY  = 0x00000080, //Create a new link if one doesn't exist
  685.     LINK_STATE_LINK_NO_LONGER_USED  = 0x00000100, //Set when SMTP is done with link
  686.     LINK_STATE_TYPE_INTERNAL_SMTP   = 0x00000200,
  687.     LINK_STATE_TYPE_EXTERNAL_SMTP   = 0x00000400,
  688.     LINK_STATE_DO_NOT_DELETE_UNTIL_NEXT_NOTIFY = 0x00000800,
  689.     LINK_STATE_RESERVED             = 0xFFFF0000, //Reserved for internal use
  690. } eLinkStateFlags;
  691. //+------------------------------------------------------------
  692. //
  693. // Interface: IMailTransportRoutingEngine
  694. //
  695. // Synopsis: Used for the SMTP_MAILTRANSPORT_ON_GET_ROUTER_FOR_MESSAGE event
  696. //
  697. //
  698. //-------------------------------------------------------------
  699. //
  700. // Specific error code(s) that can be returned from GetMessageRouter
  701. //
  702. cpp_quote("#define ROUTER_E_NOTINTERESTED   MAKE_HRESULT(SEVERITY_ERROR,FACILITY_ITF,0x1000)")
  703. [
  704.     object,
  705.     uuid(A928AD13-1610-11d2-9E02-00C04FA322BA),
  706.     helpstring("IMailTransportRoutingEngine Interface"),
  707.     pointer_default(unique)
  708. ]
  709. interface IMailTransportRoutingEngine : IUnknown
  710. {
  711.     [local]
  712.     HRESULT GetMessageRouter(
  713.         [in]  IMailMsgProperties        *pIMailMsg,
  714.         [in]  IMessageRouter            *pICurrentMessageRouter,
  715.         [out] IMessageRouter          **ppIMessageRouter);
  716. };
  717. cpp_quote("#define MTE_QUEUED_OUTBOUND         1010")
  718. cpp_quote("#define MTE_TRANSFERRED_OUTBOUND    1011")
  719. cpp_quote("#define MTE_RECEIVED_INBOUND        1012")
  720. cpp_quote("#define MTE_TRANSFERRED_INBOUND     1013")
  721. cpp_quote("#define MTE_MESSAGE_REROUTED        1014")
  722. cpp_quote("#define MTE_REPORT_TRANSFERRED_IN   1015")
  723. cpp_quote("#define MTE_REPORT_TRANSFERRED_OUT  1016")
  724. cpp_quote("#define MTE_REPORT_GENERATED        1017")
  725. cpp_quote("#define MTE_REPORT_ABSORBED         1018")
  726. cpp_quote("#define MTE_SUBMIT_MESSAGE_TO_AQ    1019")
  727. cpp_quote("#define MTE_BEGIN_OUTBOUND_TRANSFER 1020")
  728. cpp_quote("#define MTE_BADMAIL                 1021")
  729. cpp_quote("#define MTE_AQ_FAILURE              1022")
  730. cpp_quote("#define MTE_LOCAL_DELIVERY          1023")
  731. cpp_quote("#define MTE_SUBMIT_MESSAGE_TO_CAT   1024")
  732. cpp_quote("#define MTE_BEGIN_SUBMIT_MESSAGE    1025")
  733. cpp_quote("#define MTE_AQ_FAILED_MESSAGE       1026")
  734. cpp_quote("#define MTE_NDR_ALL                 1030")
  735. cpp_quote("#define MTE_END_OUTBOUND_TRANSFER   1031")
  736. [
  737.     helpstring("Interface For Message Tracking."),
  738.     local,
  739.     object,
  740.     pointer_default(unique),
  741.     uuid(1bc3580e-7e4f-11d2-94f4-00C04f79f1d6)
  742. ]
  743. interface IMsgTrackLog : IUnknown
  744. {
  745.     HRESULT OnSyncLogMsgTrackInfo(
  746.                 [in] IUnknown *pIServer,
  747.                 [in] IMailMsgProperties *pIMailMsgProp,
  748.                 [in] LPMSG_TRACK_INFO pMsgTrackInfo);
  749. };
  750. [
  751.     helpstring("Interface For Enumerating Resolver Records."),
  752.     local,
  753.     object,
  754.     pointer_default(unique),
  755.     uuid(e5b89c52-8e0b-11d2-94f6-00C04f79f1d6)
  756. ]
  757. interface IDnsResolverRecord : IUnknown
  758. {
  759.     HRESULT GetItem( [in] ULONG cIndex, [out] LPSTR *ppszHostName, [out] DWORD *pAddr );
  760.     HRESULT Count( [out] DWORD *pcRecords );
  761. };
  762. [
  763.     helpstring("Interface For Getting Resolver Records."),
  764.     local,
  765.     object,
  766.     pointer_default(unique),
  767.     uuid(d95a4d0c-8e06-11d2-94f6-00C04f79f1d6)
  768. ]
  769. interface IDnsResolverRecordSink : IUnknown
  770. {
  771.     HRESULT OnSyncGetResolverRecord( [in] LPSTR pszHostName,
  772.                                      [in] LPSTR pszInstanceFQDN,
  773.                                      [in] DWORD dwVirtualServerId,
  774.                                      [out] IDnsResolverRecord **ppDnsResolverRecord);
  775. };
  776. [
  777.     helpstring("MaxMsgSize Exceeded event interface."),
  778.     local,
  779.     object,
  780.     pointer_default(unique),
  781.     uuid(b997f192-a67d-11d2-94f7-00C04f79f1d6)
  782. ]
  783. interface ISmtpMaxMsgSize : IUnknown
  784. {
  785.     HRESULT OnSyncMaxMsgSize( [in]  IUnknown            *pIUnknown,
  786.                               [in]  IMailMsgProperties  *pIMailMsgProp,
  787.                               [out] BOOL                *pfShouldImposeLimit );
  788. };
  789. [
  790.     helpstring("Log event interface."),
  791.     local,
  792.     object,
  793.     pointer_default(unique),
  794.     uuid(35bc9ad7-7aa5-43ee-a0ab-94e1d6be99e5)
  795. ]
  796. interface ISmtpLog : IUnknown
  797. {
  798.     HRESULT OnSyncLog(
  799.                 [in] LPSMTP_LOG_EVENT_INFO pLogEventInfo);
  800. };
  801. [
  802.     helpstring("Get Aux Domain Info Flags event interface."),
  803.     local,
  804.     object,
  805.     pointer_default(unique),
  806.     uuid(d038c9da-4977-491d-8b0e-97f2e546c35a)
  807. ]
  808. interface ISmtpGetAuxDomainInfoFlags : IUnknown
  809. {
  810.     HRESULT OnGetAuxDomainInfoFlags(
  811.                 [in]    IUnknown               *pIServer,
  812.                 [in]    LPCSTR                  pszDomainName,
  813.                 [out]   DWORD                  *pdwDomainInfoFlags );
  814. };
  815. //+------------------------------------------------------------
  816. //
  817. // The Categorizer event interfaces:
  818. //
  819. //-------------------------------------------------------------
  820. interface ICategorizerListResolve;
  821. interface ICategorizerItemAttributes;
  822. interface ICategorizerMailMsgs;
  823. interface ICategorizerItem;
  824. interface ICategorizerDomainInfo;
  825. interface ISMTPCategorizer;
  826. interface ISMTPCategorizerCompletion;
  827. interface ISMTPCategorizerDLCompletion;
  828. //
  829. // A structure and definitions to handle the configuration of
  830. // a virtual server (for categorizer)
  831. //
  832. typedef [v1_enum] enum
  833. {
  834.     CCAT_CONFIG_INFO_FLAGS                      = 0x0001,
  835.     CCAT_CONFIG_INFO_ROUTINGTYPE                = 0x0002,
  836.     CCAT_CONFIG_INFO_BINDDOMAIN                 = 0x0004,
  837.     CCAT_CONFIG_INFO_USER                       = 0x0008,
  838.     CCAT_CONFIG_INFO_PASSWORD                   = 0x0010,
  839.     CCAT_CONFIG_INFO_BINDTYPE                   = 0x0020,
  840.     CCAT_CONFIG_INFO_SCHEMATYPE                 = 0x0040,
  841.     CCAT_CONFIG_INFO_HOST                       = 0x0080,
  842.     CCAT_CONFIG_INFO_NAMINGCONTEXT              = 0x0100,
  843.     CCAT_CONFIG_INFO_DEFAULTDOMAIN              = 0x0200,
  844.     CCAT_CONFIG_INFO_PORT                       = 0x0400,
  845.     CCAT_CONFIG_INFO_ISMTPSERVER                = 0x0800,
  846.     CCAT_CONFIG_INFO_IDOMAININFO                = 0x1000,
  847.     CCAT_CONFIG_INFO_ENABLE                     = 0x2000,
  848.     CCAT_CONFIG_INFO_DEFAULT                    = 0x4000,
  849.     CCAT_CONFIG_INFO_VSID                       = 0x8000,
  850.     CCAT_CONFIG_INFO_ALL                        = 0xFFFF
  851. } eCatConfigInfoFlags;
  852. typedef struct _tagCCatConfigInfo {
  853.     DWORD dwCCatConfigInfoFlags;    //Flags describing which fields
  854.                                     //are valid
  855.     DWORD dwEnable;
  856.     DWORD dwCatFlags;
  857.     LPSTR pszRoutingType;
  858.     LPSTR pszBindDomain;
  859.     LPSTR pszUser;
  860.     LPSTR pszPassword;
  861.     LPSTR pszBindType;
  862.     LPSTR pszSchemaType;
  863.     LPSTR pszHost;
  864.     LPSTR pszNamingContext;
  865.     LPSTR pszDefaultDomain;
  866.     DWORD dwPort;
  867.     ISMTPServer *pISMTPServer;
  868.     ICategorizerDomainInfo *pIDomainInfo;
  869.     DWORD dwVirtualServerID;
  870. } CCATCONFIGINFO, *PCCATCONFIGINFO;
  871. typedef [v1_enum] enum _CAT_ADDRESS_TYPE {
  872.     CAT_SMTP            = 0, // SMTP address type
  873.     CAT_X500            = 1, // X500 address type (ex: "/DC=blah/dc=...")
  874.     CAT_X400            = 2, // X400 address type
  875.     CAT_DN              = 3, // Distinguished Name
  876.     CAT_LEGACYEXDN      = 4, // LegacyExchangeDN attribute
  877.     CAT_CUSTOMTYPE      = 5, // Foreign address type
  878.     CAT_UNKNOWNTYPE     = 6, // Not a valid input value
  879. } CAT_ADDRESS_TYPE;
  880. //+------------------------------------------------------------
  881. //
  882. // Interface: ICategorizerProperties
  883. //
  884. // Synopsis: Property setting/retrieval interface
  885. //
  886. //
  887. //-------------------------------------------------------------
  888. [
  889.     local,
  890.     object,
  891.     uuid(96BF3199-79D8-11d2-9E11-00C04FA322BA),
  892.     helpstring("ICategorizerProperties Interface"),
  893.     pointer_default(unique)
  894. ]
  895. interface ICategorizerProperties : IUnknown
  896. {
  897.     HRESULT GetStringA(
  898.         [in]  DWORD dwPropId,
  899.         [in]  DWORD dwcchValue,
  900.         [out, size_is(dwcchValue)] LPSTR pszValue);
  901.     HRESULT PutStringA(
  902.         [in]  DWORD dwPropId,
  903.         [in, unique] LPSTR pszValue);
  904.     HRESULT GetDWORD(
  905.         [in]  DWORD dwPropId,
  906.         [out] DWORD *pdwValue);
  907.     HRESULT PutDWORD(
  908.         [in]  DWORD dwPropId,
  909.         [in]  DWORD dwValue);
  910.     HRESULT GetHRESULT(
  911.         [in]  DWORD dwPropId,
  912.         [out] HRESULT *phrValue);
  913.     HRESULT PutHRESULT(
  914.         [in]  DWORD dwPropId,
  915.         [in]  HRESULT hrValue);
  916.     HRESULT GetBool(
  917.         [in]  DWORD dwPropId,
  918.         [out] BOOL  *pfValue);
  919.     HRESULT PutBool(
  920.         [in]  DWORD dwPropId,
  921.         [in]  BOOL  fValue);
  922.     HRESULT GetPVoid(
  923.         [in]  DWORD dwPropId,
  924.         [out] PVOID *pvValue);
  925.     HRESULT PutPVoid(
  926.         [in]  DWORD dwPropId,
  927.         [in]  PVOID pvValue);
  928.     HRESULT GetIUnknown(
  929.         [in]  DWORD dwPropId,
  930.         [out] IUnknown **pUnknown);
  931.     HRESULT PutIUnknown(
  932.         [in]  DWORD dwPropId,
  933.         [in]  IUnknown *pUnknown);
  934.     HRESULT GetIMailMsgProperties(
  935.         [in]  DWORD dwPropId,
  936.         [out] IMailMsgProperties **ppIMsg);
  937.     HRESULT PutIMailMsgProperties(
  938.         [in]  DWORD dwPropId,
  939.         [in]  IMailMsgProperties *pIMsg);
  940.     HRESULT GetIMailMsgRecipientsAdd(
  941.         [in]  DWORD dwPropId,
  942.         [out] IMailMsgRecipientsAdd **ppIMsgRecipientsAdd);
  943.     HRESULT PutIMailMsgRecipientsAdd(
  944.         [in]  DWORD dwPropId,
  945.         [in]  IMailMsgRecipientsAdd *pIMsgRecipientsAdd);
  946.     HRESULT GetICategorizerItemAttributes(
  947.         [in]  DWORD dwPropId,
  948.         [out] ICategorizerItemAttributes **ppICategorizerItemAttributes);
  949.     HRESULT PutICategorizerItemAttributes(
  950.         [in]  DWORD dwPropId,
  951.         [in]  ICategorizerItemAttributes *pICategorizerItemAttributes);
  952.     HRESULT GetICategorizerListResolve(
  953.         [in]  DWORD dwPropId,
  954.         [out] ICategorizerListResolve **ppICategorizerListResolve);
  955.     HRESULT PutICategorizerListResolve(
  956.         [in]  DWORD dwPropId,
  957.         [in]  ICategorizerListResolve *pICategorizerListResolve);
  958.     HRESULT GetICategorizerMailMsgs(
  959.         [in]  DWORD dwPropId,
  960.         [out] ICategorizerMailMsgs **ppICategorizerMailMsgs);
  961.     HRESULT PutICategorizerMailMsgs(
  962.         [in]  DWORD dwPropId,
  963.         [in]  ICategorizerMailMsgs *pICategorizerMailMsgs);
  964.     HRESULT GetICategorizerItem(
  965.         [in]  DWORD dwPropId,
  966.         [out] ICategorizerItem **ppICategorizerItem);
  967.     HRESULT PutICategorizerItem(
  968.         [in]  DWORD dwPropId,
  969.         [in]  ICategorizerItem *pICategorizerItem);
  970.     HRESULT UnSetPropId(
  971.         [in]  DWORD dwPropId);
  972. };
  973. //+------------------------------------------------------------
  974. //
  975. // Interface: ICategorizerParameters
  976. //
  977. // Synopsis: Holds data concerning attribute names for the schema in use
  978. //
  979. //
  980. //-------------------------------------------------------------
  981. typedef [v1_enum] enum
  982. {
  983.     DSPARAMETER_LDAPHOST = 0,
  984.     DSPARAMETER_LDAPBINDTYPE,
  985.     DSPARAMETER_LDAPDOMAIN,
  986.     DSPARAMETER_LDAPACCOUNT,
  987.     DSPARAMETER_LDAPPASSWORD,
  988.     DSPARAMETER_LDAPNAMINGCONTEXT,
  989.     DSPARAMETER_LDAPPORT,
  990.     DSPARAMETER_BATCHINGLIMIT,
  991.     DSPARAMETER_SEARCHATTRIBUTE_SMTP,
  992.     DSPARAMETER_SEARCHFILTER_SMTP,
  993.     DSPARAMETER_SEARCHATTRIBUTE_X500,
  994.     DSPARAMETER_SEARCHFILTER_X500,
  995.     DSPARAMETER_SEARCHATTRIBUTE_X400,
  996.     DSPARAMETER_SEARCHFILTER_X400,
  997.     DSPARAMETER_SEARCHATTRIBUTE_LEGACYEXDN,
  998.     DSPARAMETER_SEARCHFILTER_LEGACYEXDN,
  999.     DSPARAMETER_SEARCHATTRIBUTE_RDN,
  1000.     DSPARAMETER_SEARCHFILTER_RDN,
  1001.     DSPARAMETER_SEARCHATTRIBUTE_DN,
  1002.     DSPARAMETER_SEARCHFILTER_DN,
  1003.     DSPARAMETER_SEARCHATTRIBUTE_FOREIGNADDRESS,
  1004.     DSPARAMETER_SEARCHFILTER_FOREIGNADDRESS,
  1005.     DSPARAMETER_ATTRIBUTE_OBJECTCLASS,
  1006.     DSPARAMETER_ATTRIBUTE_DEFAULT_SMTP,
  1007.     DSPARAMETER_ATTRIBUTE_DEFAULT_X500,
  1008.     DSPARAMETER_ATTRIBUTE_DEFAULT_X400,
  1009.     DSPARAMETER_ATTRIBUTE_DEFAULT_DN,
  1010.     DSPARAMETER_ATTRIBUTE_DEFAULT_LEGACYEXDN,
  1011.     DSPARAMETER_ATTRIBUTE_FORWARD_SMTP,
  1012.     DSPARAMETER_ATTRIBUTE_DL_MEMBERS,
  1013.     DSPARAMETER_ATTRIBUTE_DL_DYNAMICFILTER,
  1014.     DSPARAMETER_ATTRIBUTE_DL_DYNAMICBASEDN,
  1015.     DSPARAMETER_OBJECTCLASS_USER,
  1016.     DSPARAMETER_OBJECTCLASS_DL_X500,
  1017.     DSPARAMETER_OBJECTCLASS_DL_SMTP,
  1018.     DSPARAMETER_OBJECTCLASS_DL_DYNAMIC,
  1019.     DSPARAMETER_ENDENUMMESS,
  1020.     DSPARAMETER_INVALID
  1021. } eDSPARAMETER;
  1022. [
  1023.     object,
  1024.     local,
  1025.     uuid(86F9DA7B-EB6E-11d1-9DF3-00C04FA322BA),
  1026.     helpstring("ICategorizerParameters Interface"),
  1027.     pointer_default(unique)
  1028. ]
  1029. interface ICategorizerParameters : IUnknown
  1030. {
  1031.     HRESULT GetDSParameterA(
  1032.         [in]  DWORD dwDSParameter,
  1033.         [out] LPSTR *ppszValue);
  1034.     HRESULT SetDSParameterA(
  1035.         [in] DWORD dwDSParameter,
  1036.         [in, unique] LPCSTR pszValue);
  1037.     HRESULT RequestAttributeA(
  1038.         [in, unique] LPCSTR pszName);
  1039.     HRESULT GetAllAttributes(
  1040.         [out] LPSTR **prgszAllAttributes);
  1041.     HRESULT ReserveICatItemPropIds(
  1042.         [in]  DWORD   dwNumPropIdsRequested,
  1043.         [out] DWORD   *pdwBeginningPropId);
  1044.     HRESULT ReserveICatListResolvePropIds(
  1045.         [in]  DWORD   dwNumPropIdsRequested,
  1046.         [out] DWORD   *pdwBeginningPropId);
  1047.     HRESULT GetCCatConfigInfo(
  1048.         [out] PCCATCONFIGINFO *ppCCatConfigInfo);
  1049. };
  1050. //+------------------------------------------------------------
  1051. //
  1052. // Interface: ICategorizerQueries
  1053. //
  1054. // Synopsis: Interface to an object that holds query strings
  1055. //
  1056. //
  1057. //-------------------------------------------------------------
  1058. [
  1059.     object,
  1060.     uuid(86F9DA7D-EB6E-11d1-9DF3-00C04FA322BA),
  1061.     helpstring("ICategorizerQueries Interface"),
  1062.     pointer_default(unique)
  1063. ]
  1064. interface ICategorizerQueries : IUnknown
  1065. {
  1066.     HRESULT SetQueryString(
  1067.         [in, unique] LPSTR pszQueryString);
  1068.     HRESULT GetQueryString(
  1069.         [out] LPSTR *ppszQueryString);
  1070. };
  1071. //+------------------------------------------------------------
  1072. //
  1073. // Interface: ICategorizerMailMsgs
  1074. //
  1075. // Synopsis: Interface to hold all MailMsgs associated with a message
  1076. //           categorization
  1077. //
  1078. //-------------------------------------------------------------
  1079. //
  1080. // The structure used for mailmsg enumeration
  1081. //
  1082. typedef PVOID CATMAILMSG_ENUMERATOR, *PCATMAILMSG_ENUMERATOR;
  1083. [
  1084.     object,
  1085.     local,
  1086.     uuid(86F9DA80-EB6E-11d1-9DF3-00C04FA322BA),
  1087.     helpstring("ICategorizerMailMsgs Interface"),
  1088.     pointer_default(unique)
  1089. ]
  1090. interface ICategorizerMailMsgs : IUnknown
  1091. {
  1092.     HRESULT GetMailMsg(
  1093.         [in]  DWORD dwFlags,
  1094.         [out] IMailMsgProperties **ppIMailMsgProperties,
  1095.         [out] IMailMsgRecipientsAdd **ppIMailMsgRecipientsAdd,
  1096.         [out] BOOL *pfCreated);
  1097.     HRESULT ReBindMailMsg(
  1098.         [in]  DWORD dwFlags,
  1099.         [in]  IUnknown *pStoreDriver);
  1100.     //
  1101.     // Functions to enumerate all created mailmsg
  1102.     //
  1103.     HRESULT BeginMailMsgEnumeration(
  1104.         [in]  PCATMAILMSG_ENUMERATOR penumerator);
  1105.     HRESULT GetNextMailMsg(
  1106.         [in]  PCATMAILMSG_ENUMERATOR penumerator,
  1107.         [out] DWORD *pdwFlags,
  1108.         [out] IMailMsgProperties **ppIMailMsgProperties,
  1109.         [out] IMailMsgRecipientsAdd **ppIMailMsgRecipientsAdd);
  1110.     HRESULT EndMailMsgEnumeration(
  1111.         [in]  PCATMAILMSG_ENUMERATOR penumerator);
  1112. }
  1113. //+------------------------------------------------------------
  1114. //
  1115. // Interface: ICategorizerItemAttributes
  1116. //
  1117. // Synopsis: Sink supplied interface with methods to get at object attributes
  1118. //
  1119. //
  1120. //-------------------------------------------------------------
  1121. //
  1122. // The structure used for attribute enumeration
  1123. //
  1124. typedef struct _tagAttributeEnumerator {
  1125.     PVOID pvBase;
  1126.     PVOID pvCurrent;
  1127.     PVOID pvContext;
  1128. } ATTRIBUTE_ENUMERATOR, *PATTRIBUTE_ENUMERATOR;
  1129. [
  1130.     object,
  1131.     uuid(86F9DA7F-EB6E-11d1-9DF3-00C04FA322BA),
  1132.     helpstring("ICategorizerItemAttributes Interface"),
  1133.     pointer_default(unique)
  1134. ]
  1135. interface ICategorizerItemAttributes : IUnknown
  1136. {
  1137.     //
  1138.     // Functions to enumerate through a specified attribute value
  1139.     //
  1140.     [local] HRESULT BeginAttributeEnumeration(
  1141.         [in, unique] LPCSTR pszAttributeName,
  1142.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1143.     [local] HRESULT GetNextAttributeValue(
  1144.         [in] PATTRIBUTE_ENUMERATOR penumerator,
  1145.         [out] LPSTR *ppszAttributeValue);
  1146.     [local] HRESULT RewindAttributeEnumeration(
  1147.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1148.     [local] HRESULT EndAttributeEnumeration(
  1149.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1150.     //
  1151.     // Functions to enumerate through the available attribute names
  1152.     //
  1153.     [local] HRESULT BeginAttributeNameEnumeration(
  1154.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1155.     [local] HRESULT GetNextAttributeName(
  1156.         [in] PATTRIBUTE_ENUMERATOR penumerator,
  1157.         [out] LPSTR *ppszAttributeName);
  1158.     [local] HRESULT EndAttributeNameEnumeration(
  1159.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1160.     [local] GUID GetTransportSinkID();
  1161.     [local] HRESULT AggregateAttributes(
  1162.         [in] ICategorizerItemAttributes *pICatItemAttr);
  1163.     //
  1164.     // Support to retrieve all attributes at the same time.
  1165.     //
  1166.     [local] HRESULT GetAllAttributeValues(
  1167.         [in, unique] LPCSTR pszAttributeName,
  1168.         [in] PATTRIBUTE_ENUMERATOR penumerator,
  1169.         [out] LPSTR **prgpszAttributeValues);
  1170.     [local] HRESULT ReleaseAllAttributeValues(
  1171.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1172.     //
  1173.     // Count the attribute values before enumeating
  1174.     //
  1175.     [local] HRESULT CountAttributeValues(
  1176.         [in]  PATTRIBUTE_ENUMERATOR penumerator,
  1177.         [out] DWORD *pdwCount);
  1178. }
  1179. //+------------------------------------------------------------
  1180. //
  1181. // Interface: ICategorizerItemRawAttributes
  1182. //
  1183. // Synopsis: Sink supplied interface with methods to get at raw object attributes
  1184. //
  1185. //
  1186. //-------------------------------------------------------------
  1187. [
  1188.     object,
  1189.     uuid(34C3D389-8FA7-11d2-9E16-00C04FA322BA),
  1190.     helpstring("ICategorizerItemRawAttributes Interface"),
  1191.     pointer_default(unique)
  1192. ]
  1193. interface ICategorizerItemRawAttributes : IUnknown
  1194. {
  1195.     //
  1196.     // Functions to enumerate through a specified attribute value
  1197.     //
  1198.     [local] HRESULT BeginRawAttributeEnumeration(
  1199.         [in, unique] LPCSTR pszAttributeName,
  1200.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1201.     [local] HRESULT GetNextRawAttributeValue(
  1202.         [in] PATTRIBUTE_ENUMERATOR penumerator,
  1203.         [out] DWORD *pdwcb,
  1204.         [out] LPVOID *pvAttributeValue);
  1205.     [local] HRESULT RewindRawAttributeEnumeration(
  1206.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1207.     [local] HRESULT EndRawAttributeEnumeration(
  1208.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1209.     //
  1210.     // Count the attribute values before enumeating
  1211.     //
  1212.     [local] HRESULT CountRawAttributeValues(
  1213.         [in]  PATTRIBUTE_ENUMERATOR penumerator,
  1214.         [out] DWORD *pdwCount);
  1215. }
  1216. //+------------------------------------------------------------
  1217. //
  1218. // Interface: ICategorizerItem
  1219. //
  1220. // Synopsis: A property interface with a number of well known propIDs
  1221. //           (below)
  1222. //
  1223. //
  1224. //-------------------------------------------------------------
  1225. typedef [v1_enum] enum
  1226. {
  1227.     ICATEGORIZERITEM_SOURCETYPE = 0,
  1228.     ICATEGORIZERITEM_LDAPQUERYSTRING,
  1229.     ICATEGORIZERITEM_DISTINGUISHINGATTRIBUTE,
  1230.     ICATEGORIZERITEM_DISTINGUISHINGATTRIBUTEVALUE,
  1231.     ICATEGORIZERITEM_IMAILMSGPROPERTIES,
  1232.     ICATEGORIZERITEM_IMAILMSGRECIPIENTSADD,
  1233.     ICATEGORIZERITEM_IMAILMSGRECIPIENTSADDINDEX,
  1234.     ICATEGORIZERITEM_FPRIMARY,
  1235.     ICATEGORIZERITEM_PARENT,
  1236.     ICATEGORIZERITEM_ICATEGORIZERITEMATTRIBUTES,
  1237.     ICATEGORIZERITEM_HRSTATUS,
  1238.     ICATEGORIZERITEM_ICATEGORIZERLISTRESOLVE,
  1239.     ICATEGORIZERITEM_ICATEGORIZERMAILMSGS,
  1240.     ICATEGORIZERITEM_HRNDRREASON,
  1241.     ICATEGORIZERITEM_DWLEVEL,
  1242.     ICATEGORIZERITEM_ENDENUMMESS
  1243. } eICATEGORIZERITEMPROPID;
  1244. typedef [v1_enum] enum
  1245. {
  1246.     SOURCE_SENDER,
  1247.     SOURCE_RECIPIENT,
  1248.     SOURCE_VERIFY
  1249. } eSourceType;
  1250. [
  1251.     local,
  1252.     object,
  1253.     uuid(86F9DA7C-EB6E-11d1-9DF3-00C04FA322BA),
  1254.     helpstring("ICategorizerItem Interface"),
  1255.     pointer_default(unique)
  1256. ]
  1257. interface ICategorizerItem : ICategorizerProperties {};
  1258. //+------------------------------------------------------------
  1259. //
  1260. // Interface: ICategorizerAsyncContext
  1261. //
  1262. // Synopsis: Interface handed out to sinks containing async context methods
  1263. //
  1264. //
  1265. //-------------------------------------------------------------
  1266. [
  1267.     object,
  1268.     uuid(86F9DA7E-EB6E-11d1-9DF3-00C04FA322BA),
  1269.     helpstring("ICategorizerAsyncCompletion Interface"),
  1270.     pointer_default(unique)
  1271. ]
  1272. interface ICategorizerAsyncContext : IUnknown
  1273. {
  1274.     [local] HRESULT CompleteQuery(
  1275.         [in] PVOID pvQueryContext,
  1276.         [in] HRESULT hrResolutionStatus,
  1277.         [in] DWORD dwcResults,
  1278.         [in, size_is(dwcResults)] ICategorizerItemAttributes **rgpItemAttributes,
  1279.         [in] BOOL fFinalCompletion);
  1280. }
  1281. //+------------------------------------------------------------
  1282. //
  1283. // Interface: ICategorizerListResolve
  1284. //
  1285. // Synopsis: Interface handed out to sinks that can spin off further resolves
  1286. //
  1287. //
  1288. //-------------------------------------------------------------
  1289. [
  1290.     object,
  1291.     uuid(960252A4-0A3A-11d2-9E00-00C04FA322BA),
  1292.     helpstring("ICategorizerListResolve Interface"),
  1293.     pointer_default(unique)
  1294. ]
  1295. interface ICategorizerListResolve : IUnknown
  1296. {
  1297.     [local] HRESULT AllocICategorizerItem(
  1298.         [in]  eSourceType SourceType,
  1299.         [out] ICategorizerItem **ppICatItem);
  1300.     [local] HRESULT ResolveICategorizerItem(
  1301.         [in] ICategorizerItem *pICatItem);
  1302.     [local] HRESULT SetListResolveStatus(
  1303.         [in] HRESULT hrStatus);
  1304.     [local] HRESULT GetListResolveStatus(
  1305.         [out] HRESULT *phrStatus);
  1306. }
  1307. //+------------------------------------------------------------
  1308. //
  1309. // Interface: IMailTransportCategorize
  1310. //
  1311. // Synopsis: Interface a sink must implement in order to handle
  1312. //           categorizer events
  1313. //
  1314. //
  1315. //-------------------------------------------------------------
  1316. [
  1317.     object,
  1318.     uuid(86F9DA7A-EB6E-11d1-9DF3-00C04FA322BA),
  1319.     helpstring("IMailTransportCategorize Interface"),
  1320.     pointer_default(unique)
  1321. ]
  1322. interface IMailTransportCategorize : IUnknown
  1323. {
  1324.     HRESULT Register(
  1325.         [in]  ICategorizerParameters *);
  1326.     [local] HRESULT BeginMessageCategorization(
  1327.         [in]  ICategorizerMailMsgs *);
  1328.     [local] HRESULT EndMessageCategorization(
  1329.         [in]  ICategorizerMailMsgs *,
  1330.         [in]  HRESULT hrCatStatus);
  1331.     [local] HRESULT BuildQuery(
  1332.         [in]  ICategorizerParameters *,
  1333.         [in]  ICategorizerItem *);
  1334.     [local] HRESULT BuildQueries(
  1335.         [in]  ICategorizerParameters *,
  1336.         [in]  DWORD dwcAddresses,
  1337.         [in, size_is(dwcAddresses)] ICategorizerItem **rgpICategorizerItems,
  1338.         [in]  ICategorizerQueries *);
  1339.     [local] HRESULT SendQuery(
  1340.         [in]  ICategorizerParameters *,
  1341.         [in]  ICategorizerQueries *,
  1342.         [in]  ICategorizerAsyncContext *,
  1343.         [in]  PVOID pvQueryContext);
  1344.     [local] HRESULT SortQueryResult(
  1345.         [in]  ICategorizerParameters *,
  1346.         [in]  HRESULT hrResolutionStatus,
  1347.         [in]  DWORD dwcAddresses,
  1348.         [in, size_is(dwcAddresses)] ICategorizerItem **rgpICategorizerItems,
  1349.         [in]  DWORD dwcResults,
  1350.         [in, size_is(dwcResults)] ICategorizerItemAttributes **rgpICategorizerItemAttributes);
  1351.     [local] HRESULT ProcessItem(
  1352.         [in]  ICategorizerParameters *,
  1353.         [in]  ICategorizerItem *);
  1354.     [local] HRESULT ExpandItem(
  1355.         [in]  ICategorizerParameters *,
  1356.         [in]  ICategorizerItem *,
  1357.         [in]  IMailTransportNotify *,
  1358.         [in]  PVOID);
  1359.     [local] HRESULT CompleteItem(
  1360.         [in]  ICategorizerParameters *,
  1361.         [in]  ICategorizerItem *);
  1362. };
  1363. //
  1364. // See smtpguid.h for the CLSID and Program ID of the CoCreateable
  1365. // Categorizer
  1366. //
  1367. //+------------------------------------------------------------
  1368. //
  1369. // Interface: ISMTPCategorizer
  1370. //
  1371. // Synopsis: Interface to the SMTP categorizer
  1372. //
  1373. //
  1374. //-------------------------------------------------------------
  1375. [
  1376.     object,
  1377.     local,
  1378.     uuid(B23C35B8-9219-11d2-9E17-00C04FA322BA),
  1379.     helpstring("ISMTPCategorizer Interface"),
  1380.     pointer_default(unique)
  1381. ]
  1382. interface ISMTPCategorizer : IUnknown
  1383. {
  1384.     HRESULT ChangeConfig(
  1385.         [in]  PCCATCONFIGINFO pConfigInfo);
  1386.     HRESULT CatMsg(
  1387.         [in]  IUnknown *pMsg,
  1388.         [in]  ISMTPCategorizerCompletion *pICompletion,
  1389.         [in]  LPVOID pContext);
  1390.     HRESULT CatDLMsg(
  1391.         [in]  IUnknown *pMsg,
  1392.         [in]  ISMTPCategorizerDLCompletion *pICompletion,
  1393.         [in]  LPVOID pContext,
  1394.         [in]  BOOL fMatchOnly,
  1395.         [in]  CAT_ADDRESS_TYPE CAType,
  1396.         [in]  LPSTR pszAddress);
  1397.     HRESULT CatCancel();
  1398. };
  1399. //+------------------------------------------------------------
  1400. //
  1401. // Interface: ISMTPCategorizerCompletion
  1402. //
  1403. // Synopsis: Async completion interface
  1404. //
  1405. //
  1406. //-------------------------------------------------------------
  1407. [
  1408.     object,
  1409.     local,
  1410.     uuid(B23C35B9-9219-11d2-9E17-00C04FA322BA),
  1411.     helpstring("ISMTPCategorizerCompletion Interface"),
  1412.     pointer_default(unique)
  1413. ]
  1414. interface ISMTPCategorizerCompletion : IUnknown
  1415. {
  1416.     HRESULT CatCompletion(
  1417.         HRESULT hr,
  1418.         PVOID pContext,
  1419.         IUnknown *pImsg,
  1420.         IUnknown **rgpImsg);
  1421. };
  1422. //+------------------------------------------------------------
  1423. //
  1424. // Interface: ISMTPCategorizerDLCompletion
  1425. //
  1426. // Synopsis: Async completion interface
  1427. //
  1428. //
  1429. //-------------------------------------------------------------
  1430. [
  1431.     object,
  1432.     local,
  1433.     uuid(B23C35BA-9219-11d2-9E17-00C04FA322BA),
  1434.     helpstring("ISMTPCategorizerDLCompletion Interface"),
  1435.     pointer_default(unique)
  1436. ]
  1437. interface ISMTPCategorizerDLCompletion : IUnknown
  1438. {
  1439.     HRESULT CatDLCompletion(
  1440.         HRESULT hr,
  1441.         PVOID pContext,
  1442.         IUnknown *pImsg,
  1443.         BOOL fMatch);
  1444. };
  1445. //---[ eDomainInfoFlags ]------------------------------------------------------
  1446. //
  1447. //
  1448. //      Description: Flags used to describe boolean per domain properties
  1449. //
  1450. //-----------------------------------------------------------------------------
  1451. typedef [v1_enum] enum
  1452. {
  1453.     //Outbound protocol property flags
  1454.     DOMAIN_INFO_REMOTE              = 0x00000000, //Default setting
  1455.     DOMAIN_INFO_USE_SSL             = 0x00000001, //Use SSL on outbound connections
  1456.     DOMAIN_INFO_SEND_TURN           = 0x00000002, //Send TURN on outbound connections
  1457.     DOMAIN_INFO_SEND_ETRN           = 0x00000004, //Send ETRN on outbound connections
  1458.     DOMAIN_INFO_USE_NTLM            = 0x00000008, //Use NTLM auth on outbound
  1459.     DOMAIN_INFO_USE_PLAINTEXT       = 0x00000010, //Use plaintext auth on outbound
  1460.     DOMAIN_INFO_USE_DPA             = 0x00000020, //Use DPA auth on outbound
  1461.     DOMAIN_INFO_USE_KERBEROS        = 0x00000040, //Use Kerberos auth on outbound
  1462.     DOMAIN_INFO_USE_CHUNKING        = 0x00000080, //Require binary chunking on outbound
  1463.     DOMAIN_INFO_DISABLE_CHUNKING    = 0x00000100, //For this specific domain disaalow CHUNKING
  1464.     DOMAIN_INFO_DISABLE_BMIME       = 0x00000200, //For this specific domain disallow BMIME
  1465.     DOMAIN_INFO_DISABLE_DSN         = 0x00000400, //For this specific domain disallow DSN
  1466.     DOMAIN_INFO_DISABLE_PIPELINE    = 0x00000800, //For this specific domain disallow PIPElineing
  1467.     DOMAIN_INFO_USE_HELO            = 0x00001000, //Send HELO instead of EHLO
  1468.     //Queueing/Routing flags
  1469.     DOMAIN_INFO_TURN_ONLY           = 0x00010000, //Create connection only when asked (uses GetNamedConnection)
  1470.     DOMAIN_INFO_ETRN_ONLY           = 0x00020000, //Do no create connections until told to (uses GetNextConnection)
  1471.     DOMAIN_INFO_LOCAL_DROP          = 0x00040000, //Local drop domain
  1472.     DOMAIN_INFO_LOCAL_MAILBOX       = 0x00080000, //Local domain (no drop directory)
  1473.     DOMAIN_INFO_REMOTE_SMARTHOST    = 0x00100000, //Remote domain with smart host
  1474.     DOMAIN_INFO_IP_RELAY            = 0x00200000, //Allow Relay based on IP address
  1475.     DOMAIN_INFO_AUTH_RELAY          = 0x00400000, //Allow Relay based on authentication
  1476.     DOMAIN_INFO_DOMAIN_RELAY        = 0x00800000, //Allow Relay based on domain name
  1477.     DOMAIN_INFO_ALIAS               = 0x01000000, //Local alias domain
  1478.     DOMAIN_INFO_TURN_ON_EMPTY       = 0x02000000, //TURN works on empty conns
  1479.     DOMAIN_INFO_INVALID             = 0x80000000, //Used for returning "invalid" or "not found" info
  1480. } eDomainInfoFlags ;
  1481. //+------------------------------------------------------------
  1482. //
  1483. // Interface: ICategorizerDomainInfo
  1484. //
  1485. // Synopsis: An interface to retrieve above domain info flags
  1486. //           describing a given SMTP domain
  1487. //
  1488. //-------------------------------------------------------------
  1489. [
  1490.     object,
  1491.     local,
  1492.     uuid(E210EDC6-F27D-481f-9DFC-1CA840905FD9),
  1493.     helpstring("ICategorizerDomainInfo Interface"),
  1494.     pointer_default(unique)
  1495. ]
  1496. interface ICategorizerDomainInfo : IUnknown
  1497. {
  1498.     HRESULT GetDomainInfoFlags(
  1499.         [in, string] LPSTR szDomainName,
  1500.         [out]        DWORD *pdwDomainInfoFlags);
  1501. }
  1502. //+------------------------------------------------------------
  1503. //
  1504. // Interfaces pulled in from catintrnl.idl
  1505. //
  1506. interface ICategorizerRequestedAttributes;
  1507. interface ICategorizerLdapConfig;
  1508. interface IServersListInfo;
  1509. //+------------------------------------------------------------
  1510. //
  1511. // Interface: ICategorizerParametersEx
  1512. //
  1513. // Synopsis: ICategorizerParameters plus new methods to retrieve
  1514. //  requested attributes, register an interface which may be called
  1515. //  to get the list of GCs from dsaccess. Also a "Get" function for
  1516. //  the aforementioned interface.
  1517. //
  1518. // History:
  1519. // jstamerj 1999/07/08 14:24:56: Created
  1520. //
  1521. //-------------------------------------------------------------
  1522. [
  1523.     object,
  1524.     local,
  1525.     uuid(E962BA1F-3FB9-11d3-80D7-00C04FA322BA),
  1526.     helpstring("ICategorizerParametersEx Interface"),
  1527.     pointer_default(unique)
  1528. ]
  1529. interface ICategorizerParametersEx : ICategorizerParameters
  1530. {
  1531.     HRESULT GetDSParameterW(
  1532.         [in]  DWORD  dwDSParameter,
  1533.         [out] LPWSTR *ppszValue);
  1534.     HRESULT GetRequestedAttributes(
  1535.         [out] ICategorizerRequestedAttributes **ppIRequestedAttributes);
  1536.     HRESULT RegisterCatLdapConfigInterface(
  1537.         [out] ICategorizerLdapConfig *pICategorizerLdapConfig);
  1538.     HRESULT GetLdapConfigInterface(
  1539.         [out] ICategorizerLdapConfig **ppICatLdapConfigInfo);
  1540. };
  1541. //+------------------------------------------------------------
  1542. //
  1543. // Interface: ICategorizerRequestedAttributes
  1544. //
  1545. // Synopsis: Contains a read-only method to retrieve all the requested
  1546. //           attributes
  1547. //
  1548. // History:
  1549. // jstamerj 1999/07/08 14:24:56: Created
  1550. //
  1551. //-------------------------------------------------------------
  1552. [
  1553.     object,
  1554.     local,
  1555.     uuid(CB0924E0-357B-11d3-8328-00C04FA322BA),
  1556.     helpstring("ICategorizerRequestedAttributes Interface"),
  1557.     pointer_default(unique)
  1558. ]
  1559. interface ICategorizerRequestedAttributes : IUnknown
  1560. {
  1561.     HRESULT GetAllAttributes(
  1562.         [out] LPSTR **prgszAllAttributes);
  1563.     HRESULT GetAllAttributesW(
  1564.         [out] LPWSTR **prgszAllAttributes);
  1565. };
  1566. //+------------------------------------------------------------
  1567. //
  1568. // Interface: ICategorizerUTF8Attributes
  1569. //
  1570. // Synopsis: Methods to retrieve attributes as UTF8 strings
  1571. //
  1572. // History:
  1573. // jstamerj 1999/07/08 14:24:56: Created
  1574. //
  1575. //-------------------------------------------------------------
  1576. [
  1577.     object,
  1578.     local,
  1579.     uuid(BEBF931D-17E0-4ec8-BC1C-CC3286D72CB7),
  1580.     helpstring("ICategorizerUTF8Attributes Interface"),
  1581.     pointer_default(unique)
  1582. ]
  1583. interface ICategorizerUTF8Attributes : IUnknown
  1584. {
  1585.     [local] HRESULT BeginUTF8AttributeEnumeration(
  1586.         [in, unique] LPCSTR pszAttributeName,
  1587.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1588.     [local] HRESULT GetNextUTF8AttributeValue(
  1589.         [in] PATTRIBUTE_ENUMERATOR penumerator,
  1590.         [out] LPSTR *ppszAttributeValue);
  1591.     [local] HRESULT RewindUTF8AttributeEnumeration(
  1592.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1593.     [local] HRESULT EndUTF8AttributeEnumeration(
  1594.         [in] PATTRIBUTE_ENUMERATOR penumerator);
  1595.     [local] HRESULT CountUTF8AttributeValues(
  1596.         [in] PATTRIBUTE_ENUMERATOR penumerator,
  1597.         [out] DWORD *pdwCount);
  1598. };
  1599. //+------------------------------------------------------------
  1600. //
  1601. // Interface: ICategorizerLdapConfig
  1602. //
  1603. // Synopsis: Contains a function that may be queried for the GCs
  1604. //  on the machine as discovered by dsaccess (or as read from the
  1605. //  registry by dsaccess).
  1606. //
  1607. // History:
  1608. // gpulla created
  1609. //
  1610. //-------------------------------------------------------------
  1611. [
  1612.     object,
  1613.     local,
  1614.     uuid(27C1B2D3-1A28-4b90-BC0A-E52057D30712),
  1615.     helpstring("ICategorizerLdapConfig Interface"),
  1616.     pointer_default(unique)
  1617. ]
  1618. interface ICategorizerLdapConfig : IUnknown
  1619. {
  1620. HRESULT GetGCServers(
  1621. [out] IServersListInfo **pIServersListInfo);
  1622. };
  1623. //+------------------------------------------------------------
  1624. //
  1625. // Interface: IServersListInfo
  1626. //
  1627. // Synopsis: Interface to an object encapsulating the list of
  1628. //  GCs described above. Functions allow querying the number of
  1629. //  GCs and enumerating through the GCs.
  1630. //
  1631. // History:
  1632. // gpulla created
  1633. //
  1634. //-------------------------------------------------------------
  1635. [
  1636.     object,
  1637.     local,
  1638.     uuid(C54CEA94-E501-4f34-8704-F5881EA5CBF4),
  1639.     helpstring("IServersListInfo Interface"),
  1640.     pointer_default(unique)
  1641. ]
  1642. interface IServersListInfo : IUnknown
  1643. {
  1644. HRESULT GetNumGC(
  1645. [out] DWORD *dwGC);
  1646. HRESULT GetItem(
  1647. [in]  DWORD dwIdx,
  1648. [out] DWORD *dwPort,
  1649. [out] LPSTR *pszServerName);
  1650. };
  1651. cpp_quote("#endif //__SMTPEVENT_H__")