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.

138 lines
3.3 KiB

  1. // dl.h : Declaration of the CSmtpAdminDL
  2. #include "resource.h" // main symbols
  3. #include "smtptype.h"
  4. #include "smtpapi.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // smtpadm
  7. class CSmtpAdminDL :
  8. public ISmtpAdminDL,
  9. public IPrivateUnknown,
  10. public IPrivateDispatch,
  11. public IADsExtension,
  12. public INonDelegatingUnknown,
  13. public ISupportErrorInfo,
  14. public CComObjectRoot,
  15. public CComCoClass<CSmtpAdminDL,&CLSID_CSmtpAdminDL>
  16. {
  17. public:
  18. CSmtpAdminDL();
  19. virtual ~CSmtpAdminDL();
  20. BEGIN_COM_MAP(CSmtpAdminDL)
  21. COM_INTERFACE_ENTRY(IDispatch)
  22. COM_INTERFACE_ENTRY(IADs)
  23. COM_INTERFACE_ENTRY(ISmtpAdminDL)
  24. COM_INTERFACE_ENTRY(IADsExtension)
  25. COM_INTERFACE_ENTRY(IPrivateUnknown)
  26. COM_INTERFACE_ENTRY(IPrivateDispatch)
  27. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  28. END_COM_MAP()
  29. //DECLARE_NOT_AGGREGATABLE(CSmtpAdminDL)
  30. // Remove the comment from the line above if you don't want your object to
  31. // support aggregation. The default is to support it
  32. DECLARE_REGISTRY(CSmtpAdminDL, _T("Smtpadm.DL.1"), _T("Smtpadm.DL"), IDS_SMTPADMIN_DL_DESC, THREADFLAGS_BOTH)
  33. // ISupportsErrorInfo
  34. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  35. //
  36. // This declares methods for the following:
  37. // IADsExtension
  38. // IUnknown
  39. // IDispatch
  40. // IPrivateUnknown
  41. // IPrivateDispatch
  42. //
  43. #define THIS_LIBID LIBID_SMTPADMLib
  44. #define THIS_IID IID_ISmtpAdminDL
  45. #include "adsimp.inl"
  46. #undef THIS_LIBID
  47. #undef THIS_IID
  48. // ISmtpAdminDL
  49. public:
  50. //////////////////////////////////////////////////////////////////////
  51. // Properties:
  52. //////////////////////////////////////////////////////////////////////
  53. //
  54. // IADs methods:
  55. //
  56. DECLARE_IADS_METHODS()
  57. // Which service to configure:
  58. STDMETHODIMP get_Server ( BSTR * pstrServer );
  59. STDMETHODIMP put_Server ( BSTR strServer );
  60. STDMETHODIMP get_ServiceInstance ( long * plServiceInstance );
  61. STDMETHODIMP put_ServiceInstance ( long lServiceInstance );
  62. // DL Properties:
  63. STDMETHODIMP get_DLName ( BSTR * pstrDLName );
  64. STDMETHODIMP put_DLName ( BSTR strDLName );
  65. STDMETHODIMP get_Domain ( BSTR * pstrDomain );
  66. STDMETHODIMP put_Domain ( BSTR strDomain );
  67. STDMETHODIMP get_Type ( long * plType );
  68. STDMETHODIMP put_Type ( long lType );
  69. STDMETHODIMP get_MemberName ( BSTR * pstrMemberName );
  70. STDMETHODIMP put_MemberName ( BSTR strMemberName );
  71. STDMETHODIMP get_MemberDomain ( BSTR * pstrMemberDomain );
  72. STDMETHODIMP put_MemberDomain ( BSTR strMemberDomain );
  73. STDMETHODIMP get_MemberType ( long * plMemberType );
  74. // enumeration
  75. STDMETHODIMP get_Count ( long* plCount );
  76. //////////////////////////////////////////////////////////////////////
  77. // Methods:
  78. //////////////////////////////////////////////////////////////////////
  79. STDMETHODIMP Create ( );
  80. STDMETHODIMP Delete ( );
  81. STDMETHODIMP AddMember ( );
  82. STDMETHODIMP RemoveMember ( );
  83. STDMETHODIMP FindMembers ( BSTR strWildmat,
  84. long cMaxResults
  85. );
  86. STDMETHODIMP GetNthMember ( long lIndex );
  87. //////////////////////////////////////////////////////////////////////
  88. // Data:
  89. //////////////////////////////////////////////////////////////////////
  90. private:
  91. CIADsImpl m_iadsImpl;
  92. CComBSTR m_strDLName;
  93. CComBSTR m_strDomain;
  94. long m_lType;
  95. CComBSTR m_strMemberName;
  96. CComBSTR m_strMemberDomain;
  97. long m_lMemberType;
  98. LONG m_lCount;
  99. // list of members
  100. LPSMTP_NAME_LIST m_pSmtpNameList;
  101. };