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.

122 lines
3.3 KiB

  1. // sessions.h : Declaration of the CNntpAdminSessions
  2. typedef struct _NNTP_SESSION_INFO * LPNNTP_SESSION_INFO;
  3. /////////////////////////////////////////////////////////////////////////////
  4. // nntpadm
  5. class CNntpAdminSessions :
  6. public INntpAdminSessions,
  7. public IPrivateUnknown,
  8. public IPrivateDispatch,
  9. public IADsExtension,
  10. public INonDelegatingUnknown,
  11. public ISupportErrorInfo,
  12. public CComObjectRoot,
  13. public CComCoClass<CNntpAdminSessions,&CLSID_CNntpAdminSessions>
  14. {
  15. public:
  16. CNntpAdminSessions();
  17. virtual ~CNntpAdminSessions ();
  18. BEGIN_COM_MAP(CNntpAdminSessions)
  19. COM_INTERFACE_ENTRY(IDispatch)
  20. COM_INTERFACE_ENTRY(IADs)
  21. COM_INTERFACE_ENTRY(INntpAdminSessions)
  22. COM_INTERFACE_ENTRY(IADsExtension)
  23. COM_INTERFACE_ENTRY(IPrivateUnknown)
  24. COM_INTERFACE_ENTRY(IPrivateDispatch)
  25. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  26. END_COM_MAP()
  27. //DECLARE_NOT_AGGREGATABLE(CNntpAdminSessions)
  28. // Remove the comment from the line above if you don't want your object to
  29. // support aggregation. The default is to support it
  30. DECLARE_REGISTRY(CNntpAdminSessions, _T("Nntpadm.Sessions.1"), _T("Nntpadm.Sessions"), IDS_NNTPADMINSESSIONS_DESC, THREADFLAGS_BOTH)
  31. // ISupportsErrorInfo
  32. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  33. //
  34. // This declares methods for the following:
  35. // IADsExtension
  36. // IUnknown
  37. // IDispatch
  38. // IPrivateUnknown
  39. // IPrivateDispatch
  40. //
  41. #define THIS_LIBID LIBID_NNTPADMLib
  42. #define THIS_IID IID_INntpAdminSessions
  43. #include "adsimp.inl"
  44. #undef THIS_LIBID
  45. #undef THIS_IID
  46. // INntpAdminSessions
  47. public:
  48. //
  49. // IADs methods:
  50. //
  51. DECLARE_IADS_METHODS()
  52. //////////////////////////////////////////////////////////////////////
  53. // Properties:
  54. //////////////////////////////////////////////////////////////////////
  55. // Which service to configure:
  56. STDMETHODIMP get_Server ( BSTR * pstrServer );
  57. STDMETHODIMP put_Server ( BSTR strServer );
  58. STDMETHODIMP get_ServiceInstance ( long * plServiceInstance );
  59. STDMETHODIMP put_ServiceInstance ( long lServiceInstance );
  60. STDMETHODIMP get_Count ( long * plCount );
  61. STDMETHODIMP get_Username ( BSTR * pstrUsername );
  62. STDMETHODIMP put_Username ( BSTR strUsername );
  63. STDMETHODIMP get_IpAddress ( BSTR * pstrIpAddress );
  64. STDMETHODIMP put_IpAddress ( BSTR strIpAddress );
  65. STDMETHODIMP get_IntegerIpAddress ( long * plIpAddress );
  66. STDMETHODIMP put_IntegerIpAddress ( long lIpAddress );
  67. STDMETHODIMP get_Port ( long * plPort );
  68. STDMETHODIMP get_AuthenticationType ( long * plAuthenticationType );
  69. STDMETHODIMP get_IsAnonymous ( BOOL * pfAnonymous );
  70. STDMETHODIMP get_StartTime ( DATE * pdateStart );
  71. //////////////////////////////////////////////////////////////////////
  72. // Methods:
  73. //////////////////////////////////////////////////////////////////////
  74. STDMETHODIMP Enumerate ( );
  75. STDMETHODIMP GetNth ( long lIndex );
  76. STDMETHODIMP Terminate ( );
  77. STDMETHODIMP TerminateAll ( );
  78. //////////////////////////////////////////////////////////////////////
  79. // Data:
  80. //////////////////////////////////////////////////////////////////////
  81. private:
  82. // Property variables:
  83. CIADsImpl m_iadsImpl;
  84. DWORD m_cCount;
  85. CComBSTR m_strUsername;
  86. CComBSTR m_strIpAddress;
  87. DWORD m_dwIpAddress;
  88. DWORD m_dwPort;
  89. DWORD m_dwAuthenticationType;
  90. BOOL m_fIsAnonymous;
  91. DATE m_dateStartTime;
  92. // Service variables:
  93. BOOL m_fSetCursor;
  94. LPNNTP_SESSION_INFO m_pSessionInfo;
  95. };