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.

99 lines
3.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : FaxServer.h //
  3. // //
  4. // DESCRIPTION : Header file for CFaxServer that contains the //
  5. // Connect / Disconnect functionality to the Fax Server //
  6. // //
  7. // //
  8. // AUTHOR : yossg //
  9. // //
  10. // HISTORY : //
  11. // Nov 25 1999 yossg Init . //
  12. // Aug 3 2000 yossg Add notification window //
  13. // //
  14. // Copyright (C) 1999 - 2000 Microsoft Corporation All Rights Reserved //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #ifndef H_MMCFAXSERVER_H
  17. #define H_MMCFAXSERVER_H
  18. class CFaxDevicesNode;
  19. class CFaxGeneralNotifyWnd;
  20. class CFaxServer
  21. {
  22. public:
  23. //
  24. // Constructor
  25. //
  26. CFaxServer (LPTSTR lptstrServerName):
  27. m_hFaxHandle(NULL),
  28. m_bstrServerName(lptstrServerName),
  29. m_pDevicesNode(NULL),
  30. m_pNotifyWin(NULL),
  31. m_hDevicesStatusNotification(NULL),
  32. m_dwServerAPIVersion(CURRENT_FAX_API_VERSION),
  33. m_bDesktopSKUConnection(FALSE)
  34. {}
  35. //
  36. // Destructor
  37. //
  38. ~CFaxServer ()
  39. {
  40. Disconnect();
  41. DestroyNotifyWindow();
  42. }
  43. HANDLE GetFaxServerHandle();
  44. HRESULT Disconnect();
  45. STDMETHOD (SetServerName)(BSTR bstrServerName);
  46. const CComBSTR& GetServerName();
  47. BOOL IsServerRunningFaxService ();
  48. BOOL IsServerFaxServiceStopped ();
  49. HRESULT RegisterForDeviceNotifications(CFaxDevicesNode * pDevices);
  50. HRESULT OnNewEvent(PFAX_EVENT_EX pFaxEvent);
  51. DWORD GetServerAPIVersion() { return m_dwServerAPIVersion; }
  52. BOOL IsDesktopSKUConnection() {return m_bDesktopSKUConnection; }
  53. private:
  54. HRESULT Connect();
  55. HRESULT InternalRegisterForDeviceNotifications();
  56. DWORD CreateNotifyWindow();
  57. DWORD RegisterForNotifications();
  58. HRESULT UnRegisterForNotifications();
  59. VOID DestroyNotifyWindow();
  60. //
  61. // members
  62. //
  63. HANDLE m_hFaxHandle;
  64. CComBSTR m_bstrServerName;
  65. CFaxDevicesNode * m_pDevicesNode;
  66. CFaxGeneralNotifyWnd* m_pNotifyWin;
  67. //
  68. // Notification registration handle
  69. //
  70. HANDLE m_hDevicesStatusNotification;
  71. //
  72. // Server API Version info
  73. //
  74. DWORD m_dwServerAPIVersion;
  75. BOOL m_bDesktopSKUConnection;
  76. };
  77. #endif //H_MMCFAXSERVER_H