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.

131 lines
3.6 KiB

  1. // user.h : Declaration of the CSmtpAdminUser
  2. #include "resource.h" // main symbols
  3. #include "smtptype.h"
  4. #include "smtpapi.h"
  5. /////////////////////////////////////////////////////////////////////////////
  6. // smtpadm
  7. class CSmtpAdminUser :
  8. public ISmtpAdminUser,
  9. public IPrivateUnknown,
  10. public IPrivateDispatch,
  11. public IADsExtension,
  12. public INonDelegatingUnknown,
  13. public ISupportErrorInfo,
  14. public CComObjectRoot,
  15. public CComCoClass<CSmtpAdminUser,&CLSID_CSmtpAdminUser>
  16. {
  17. public:
  18. CSmtpAdminUser();
  19. virtual ~CSmtpAdminUser();
  20. BEGIN_COM_MAP(CSmtpAdminUser)
  21. COM_INTERFACE_ENTRY(IDispatch)
  22. COM_INTERFACE_ENTRY(IADs)
  23. COM_INTERFACE_ENTRY(ISmtpAdminUser)
  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(CSmtpAdminUser)
  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(CSmtpAdminUser, _T("Smtpadm.User.1"), _T("Smtpadm.User"), IDS_SMTPADMIN_USER_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_ISmtpAdminUser
  45. #include "adsimp.inl"
  46. #undef THIS_LIBID
  47. #undef THIS_IID
  48. // ISmtpAdminUser
  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. // User Properties:
  63. STDMETHODIMP get_EmailId ( BSTR * pstrEmailId );
  64. STDMETHODIMP put_EmailId ( BSTR strEmailId );
  65. STDMETHODIMP get_Domain ( BSTR * pstrDomain );
  66. STDMETHODIMP put_Domain ( BSTR strDomain );
  67. STDMETHODIMP get_MailRoot ( BSTR * pstrMailRoot );
  68. STDMETHODIMP put_MailRoot ( BSTR strMailRoot );
  69. STDMETHODIMP get_InboxSizeInMemory ( long * plInboxSizeInMemory );
  70. STDMETHODIMP put_InboxSizeInMemory ( long lInboxSizeInMemory );
  71. STDMETHODIMP get_InboxSizeInMsgNumber( long * plInboxSizeInMsgNumber );
  72. STDMETHODIMP put_InboxSizeInMsgNumber( long lInboxSizeInMsgNumber );
  73. STDMETHODIMP get_AutoForward ( BOOL * pfAutoForward );
  74. STDMETHODIMP put_AutoForward ( BOOL fAutoForward );
  75. STDMETHODIMP get_ForwardEmail ( BSTR * pstrForwardEmail );
  76. STDMETHODIMP put_ForwardEmail ( BSTR strForwardEmail );
  77. //////////////////////////////////////////////////////////////////////
  78. // Methods:
  79. //////////////////////////////////////////////////////////////////////
  80. STDMETHODIMP Default ( );
  81. STDMETHODIMP Create ( );
  82. STDMETHODIMP Delete ( );
  83. STDMETHODIMP Get ( );
  84. STDMETHODIMP Set ( );
  85. //////////////////////////////////////////////////////////////////////
  86. // Data:
  87. //////////////////////////////////////////////////////////////////////
  88. private:
  89. CIADsImpl m_iadsImpl;
  90. BOOL m_fLocal;
  91. CComBSTR m_strEmailId;
  92. CComBSTR m_strDomain;
  93. CComBSTR m_strMailRoot;
  94. long m_lInboxSizeInMemory;
  95. long m_lInboxSizeInMsgNumber;
  96. BOOL m_fAutoForward;
  97. CComBSTR m_strForwardEmail;
  98. };