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.

237 lines
5.4 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. faxqueue.h
  5. Abstract:
  6. This module contains the definitions for faxqueue.cpp
  7. Environment:
  8. WIN32 User Mode
  9. Author:
  10. Wesley Witt (wesw) 9-june-1997
  11. Steven Kehrli (steveke) 30-oct-1998 - major rewrite
  12. --*/
  13. #ifndef _FAXQUEUE_H
  14. #define _FAXQUEUE_H
  15. #include <windows.h>
  16. #include <tchar.h>
  17. #include <commctrl.h>
  18. #include <winspool.h>
  19. #include <shellapi.h>
  20. #include <stdlib.h>
  21. #include <search.h>
  22. #include <winfax.h>
  23. #include "resource.h"
  24. #include "faxreg.h"
  25. #include "faxhelp.h"
  26. #include "faxutil.h"
  27. // The following enum is used to identify the columns in the list view
  28. enum eListViewColumnIndex
  29. {
  30. eDocumentName = 0,
  31. eJobType,
  32. eStatus,
  33. eOwner,
  34. ePages,
  35. eSize,
  36. eScheduledTime,
  37. ePort,
  38. eIllegalColumnIndex // Indicates that the column index is illegal
  39. };
  40. typedef struct _WINPOSINFO {
  41. #ifdef DEBUG
  42. BOOL bDebug;
  43. #endif // DEBUG
  44. #ifdef TOOLBAR_ENABLED
  45. BOOL bToolbarVisible;
  46. #endif // TOOLBAR_ENABLED
  47. BOOL bStatusBarVisible;
  48. DWORD ColumnWidth[eIllegalColumnIndex];
  49. WINDOWPLACEMENT WindowPlacement;
  50. } WINPOSINFO, *PWINPOSINFO;
  51. #ifdef TOOLBAR_ENABLED
  52. typedef struct _TOOLBAR_MENU_STATE {
  53. DWORD CommandId;
  54. BOOL Enabled;
  55. BOOL Toolbar;
  56. } TOOLBAR_MENU_STATE, *PTOOLBAR_MENU_STATE;
  57. #endif // TOOLBAR_ENABLED
  58. typedef struct _PROCESS_INFO_ITEM {
  59. LIST_ENTRY ListEntry;
  60. LPTSTR szPrinterName;
  61. HANDLE hProcess;
  62. HWND hWnd;
  63. } PROCESS_INFO_ITEM, *PPROCESS_INFO_ITEM;
  64. typedef struct _JOB_ID_ITEM {
  65. LIST_ENTRY ListEntry;
  66. DWORD dwJobId;
  67. } JOB_ID_ITEM, *PJOB_ID_ITEM;
  68. typedef struct _PORT_JOB_INFO_ITEM {
  69. LIST_ENTRY ListEntry;
  70. DWORD dwDeviceId;
  71. LPTSTR szDeviceName;
  72. DWORD dwJobId;
  73. } PORT_JOB_INFO_ITEM, *PPORT_JOB_INFO_ITEM;
  74. #ifdef WIN95
  75. #define FAX_DRIVER_NAME TEXT("Windows NT Fax Driver")
  76. #else
  77. #define FAX_DRIVER_NAME TEXT("Windows NT Fax Driver")
  78. #endif // WIN95
  79. #define FAXQUEUE_WINCLASS TEXT("FaxQueueWinClass")
  80. #define RESOURCE_STRING_LEN 256
  81. #define UM_SELECT_FAX_PRINTER (WM_USER + 1)
  82. #define ITEM_SEND_MASK 0x100
  83. #define ITEM_IDLE_MASK 0x200
  84. #define ITEM_PAUSED_MASK 0x400
  85. #define ITEM_USEROWNSJOB_MASK 0x800
  86. extern HINSTANCE g_hInstance; // g_hInstance is the handle to the instance
  87. extern HWND g_hWndMain; // g_hWndMain is the handle to the parent window
  88. extern HWND g_hWndListView; // g_hWndListView is the handle to the list view window
  89. extern HWND g_hWndToolbar; // g_hWndToolbar is the handle to the toolbar
  90. extern LPTSTR g_szTitleConnected; // g_szTitleConnected is the window title when connected
  91. extern LPTSTR g_szTitleNotConnected; // g_szTitleNotConnected is the window title when not connected
  92. extern LPTSTR g_szTitleConnecting; // g_szTitleConnecting is the window title when connecting
  93. extern LPTSTR g_szTitleRefreshing; // g_szTitleRefreshing is the window title when refreshing
  94. extern LPTSTR g_szTitlePaused; // g_szTitlePaused is the window title when paused
  95. extern LPTSTR g_szCurrentUserName; // g_szCurrentUserName is the name of the current user
  96. extern HANDLE g_hStartEvent; // g_hStartEvent is the handle to an event indicating the fax event queue exists
  97. extern HANDLE g_hExitEvent; // g_hExitEvent is the handle to an event indicating the application is exiting
  98. extern LPTSTR g_szMachineName; // g_szMachineName is the machine to connect to
  99. extern HANDLE g_hFaxSvcMutex; // g_hFaxSvcMutex is an object to synchronize access to the fax service routines
  100. extern HANDLE g_hFaxSvcHandle; // g_hFaxSvcHandle is the handle to the fax service
  101. extern LONG g_nNumConnections; // g_nNumConnections is the number of connections to the fax service
  102. extern HANDLE g_hCompletionPort; // g_hCompletionPort is the handle to the completion port
  103. extern WINPOSINFO WinPosInfo;
  104. extern DWORD DocumentPropertiesHelpIDs[];
  105. // Function definitions:
  106. VOID
  107. GetFaxQueueRegistryData(
  108. PWINPOSINFO pWinPosInfo
  109. );
  110. VOID
  111. SetFaxQueueRegistryData(
  112. #ifdef TOOLBAR_ENABLED
  113. BOOL bToolbarVisible,
  114. #endif // TOOLBAR_ENABLED
  115. BOOL bStatusBarVisible,
  116. HWND hWndList,
  117. HWND hWnd
  118. );
  119. VOID
  120. GetColumnHeaderText(
  121. eListViewColumnIndex eColumnIndex,
  122. LPTSTR szColumnHeader
  123. );
  124. LPVOID
  125. GetFaxPrinters(
  126. LPDWORD pdwNumFaxPrinters
  127. );
  128. LPTSTR
  129. GetDefaultPrinterName(
  130. );
  131. VOID
  132. SetDefaultPrinterName(
  133. LPTSTR szPrinterName
  134. );
  135. PLIST_ENTRY
  136. InsertListEntry(
  137. PLIST_ENTRY pList,
  138. PLIST_ENTRY pListEntry
  139. );
  140. PLIST_ENTRY
  141. RemoveListEntry(
  142. PLIST_ENTRY pListEntry
  143. );
  144. PLIST_ENTRY
  145. FreeList(
  146. PLIST_ENTRY pList
  147. );
  148. VOID
  149. Disconnect(
  150. );
  151. BOOL
  152. Connect(
  153. );
  154. LPTSTR
  155. GetColumnItemText(
  156. eListViewColumnIndex eColumnIndex,
  157. PFAX_JOB_ENTRY pFaxJobEntry,
  158. LPTSTR szDeviceName
  159. );
  160. VOID
  161. SetColumnItem(
  162. HWND hWndListView,
  163. BOOL bInsert,
  164. INT iItem,
  165. INT iSubItem,
  166. LPTSTR szColumnItem,
  167. UINT uState,
  168. PFAX_JOB_ENTRY pFaxJobEntry
  169. );
  170. #ifdef TOOLBAR_ENABLED
  171. VOID
  172. EnableToolbarMenuState(
  173. HWND hWndToolbar,
  174. DWORD dwCommand,
  175. BOOL bEnable
  176. );
  177. HWND
  178. CreateToolbar(
  179. HWND hWnd
  180. );
  181. HWND
  182. CreateToolTips(
  183. HWND hWnd
  184. );
  185. #endif // TOOLBAR_ENABLED
  186. #endif