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.

75 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxActivity.h
  5. Abstract:
  6. Declaration of the CFaxActivity Class.
  7. Author:
  8. Iv Garber (IvG) Jun, 2000
  9. Revision History:
  10. --*/
  11. #ifndef __FAXACTIVITY_H_
  12. #define __FAXACTIVITY_H_
  13. #include "resource.h" // main symbols
  14. #include "FaxCommon.h"
  15. //
  16. //==================== ACTIVITY ==========================================
  17. //
  18. class ATL_NO_VTABLE CFaxActivity :
  19. public CComObjectRootEx<CComSingleThreadModel>,
  20. public ISupportErrorInfo,
  21. public IDispatchImpl<IFaxActivity, &IID_IFaxActivity, &LIBID_FAXCOMEXLib>,
  22. public CFaxInitInner
  23. {
  24. public:
  25. CFaxActivity() : CFaxInitInner(_T("FAX ACTIVITY")),
  26. m_bInited(false)
  27. {
  28. m_ServerActivity.dwSizeOfStruct = sizeof(FAX_SERVER_ACTIVITY);
  29. }
  30. DECLARE_REGISTRY_RESOURCEID(IDR_FAXACTIVITY)
  31. DECLARE_NOT_AGGREGATABLE(CFaxActivity)
  32. DECLARE_PROTECT_FINAL_CONSTRUCT()
  33. BEGIN_COM_MAP(CFaxActivity)
  34. COM_INTERFACE_ENTRY(IFaxActivity)
  35. COM_INTERFACE_ENTRY(IDispatch)
  36. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  37. COM_INTERFACE_ENTRY(IFaxInitInner)
  38. END_COM_MAP()
  39. // Interfaces
  40. STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);
  41. STDMETHOD(Refresh)();
  42. STDMETHOD(get_QueuedMessages)(/*[out, retval]*/ long *plQueuedMessages);
  43. STDMETHOD(get_RoutingMessages)(/*[out, retval]*/ long *plRoutingMessages);
  44. STDMETHOD(get_IncomingMessages)(/*[out, retval]*/ long *plIncomingMessages);
  45. STDMETHOD(get_OutgoingMessages)(/*[out, retval]*/ long *plOutgoingMessages);
  46. private:
  47. typedef enum MSG_TYPE { mtINCOMING, mtROUTING, mtOUTGOING, mtQUEUED } MSG_TYPE;
  48. bool m_bInited;
  49. FAX_SERVER_ACTIVITY m_ServerActivity;
  50. STDMETHOD(GetNumberOfMessages)(MSG_TYPE msgType, long *plNumber);
  51. };
  52. #endif //__FAXACTIVITY_H_