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.

119 lines
2.9 KiB

  1. #ifndef _INC_FAX_MONITOR_
  2. #define _INC_FAX_MONITOR_
  3. #include <windows.h>
  4. //
  5. // Fax Monitor dialog states
  6. //
  7. enum DeviceState {FAX_IDLE, FAX_RINGING, FAX_SENDING, FAX_RECEIVING};
  8. //
  9. // Status monitor log icons
  10. //
  11. enum eIconType
  12. {
  13. LIST_IMAGE_NONE = 0,
  14. LIST_IMAGE_WARNING,
  15. LIST_IMAGE_ERROR,
  16. LIST_IMAGE_SUCCESS
  17. };
  18. //
  19. // monitor.cpp
  20. //
  21. DWORD
  22. LoadAndFormatString (
  23. IN DWORD dwStringResourceId,
  24. OUT LPTSTR lptstrFormattedString,
  25. IN DWORD dwOutStrSize,
  26. IN LPCTSTR lpctstrAdditionalParam = NULL
  27. );
  28. //
  29. // Add string to the monitor dialog's events log
  30. //
  31. DWORD
  32. AddStatusMonitorLogEvent (
  33. IN eIconType eIcon,
  34. IN DWORD dwStringResourceId,
  35. IN LPCTSTR lpctstrAdditionalParam = NULL,
  36. OUT LPTSTR lptstrFormattedEvent = NULL,
  37. IN DWORD dwOutStrSize = 0
  38. );
  39. DWORD
  40. AddStatusMonitorLogEvent (
  41. eIconType eIcon,
  42. LPCTSTR lpctstrString
  43. );
  44. void
  45. FreeMonitorDialogData (BOOL bShutdown = FALSE);
  46. //
  47. // Open the monitor dialog
  48. //
  49. DWORD OpenFaxMonitor(VOID);
  50. DWORD UpdateMonitorData(HWND hDlg);
  51. int FaxMessageBox(HWND hWnd, DWORD dwTextID, UINT uType);
  52. //
  53. // Change state of the monitor dialog
  54. //
  55. void SetStatusMonitorDeviceState(DeviceState devState);
  56. //
  57. // fxsst.cpp
  58. //
  59. //
  60. // configuration structure
  61. //
  62. struct CONFIG_OPTIONS
  63. {
  64. DWORD dwMonitorDeviceId; // Device ID to monitor
  65. BOOL bSend; // Is monitored device configured to send faxes
  66. BOOL bReceive; // Is monitored device configured to receive faxes
  67. DWORD dwManualAnswerDeviceId; // Manual answer device ID
  68. DWORD dwAccessRights; // User access rights
  69. DWORD bNotifyProgress; // Show notification icon during send/receive
  70. DWORD bNotifyInCompletion; // Show notification icon and baloons upon incoming job completion
  71. DWORD bNotifyOutCompletion; // Show notification icon and baloons upon outgoing job completion
  72. DWORD bMonitorOnSend; // Open monitor dialog upon outgoing job start
  73. DWORD bMonitorOnReceive; // Open monitor dialog upon incoming job start
  74. DWORD bSoundOnRing; // Play sound when manual answer line is ringing
  75. DWORD bSoundOnReceive; // Play sound when fax is received
  76. DWORD bSoundOnSent; // Play sound when fax is sent
  77. DWORD bSoundOnError; // Play sound when upon error
  78. };
  79. //
  80. // connect to the fax server
  81. //
  82. BOOL Connect();
  83. //
  84. // Answer the incoming call
  85. //
  86. VOID AnswerTheCall();
  87. DWORD CheckAnswerNowCapability (BOOL bForceReconnect, LPDWORD lpdwDeviceId = NULL);
  88. //
  89. // Abort current transmission
  90. //
  91. void OnDisconnect();
  92. //
  93. // Window handle to the status monitor dialog
  94. //
  95. extern HWND g_hMonitorDlg;
  96. extern DeviceState g_devState;
  97. extern TCHAR g_tszLastEvent[];
  98. #endif // _INC_FAX_MONITOR_