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.

141 lines
4.3 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. faxroute.h
  5. Abstract:
  6. This file contains the prototypes, etc for the
  7. FAX routing extension API.
  8. --*/
  9. #include <commctrl.h>
  10. #ifndef _FAXROUTE_
  11. #define _FAXROUTE_
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //
  19. // microsoft routing guids
  20. //
  21. #define MS_FAXROUTE_PRINTING_GUID TEXT("{aec1b37c-9af2-11d0-abf7-00c04fd91a4e}")
  22. #define MS_FAXROUTE_FOLDER_GUID TEXT("{92041a90-9af2-11d0-abf7-00c04fd91a4e}")
  23. #define MS_FAXROUTE_EMAIL_GUID TEXT("{6bbf7bfe-9af2-11d0-abf7-00c04fd91a4e}")
  24. //
  25. // callback routines
  26. //
  27. typedef LONG (WINAPI *PFAXROUTEADDFILE)(DWORD JobId, LPCWSTR FileName, GUID *Guid);
  28. typedef LONG (WINAPI *PFAXROUTEDELETEFILE)(DWORD JobId, LPCWSTR FileName);
  29. typedef BOOL (WINAPI *PFAXROUTEGETFILE)(DWORD JobId, DWORD Index, LPWSTR FileNameBuffer, LPDWORD RequiredSize);
  30. typedef BOOL (WINAPI *PFAXROUTEENUMFILE)(DWORD JobId, GUID *GuidOwner, GUID *GuidCaller, LPCWSTR FileName, PVOID Context);
  31. typedef BOOL (WINAPI *PFAXROUTEENUMFILES)(DWORD JobId, GUID *Guid,PFAXROUTEENUMFILE FileEnumerator, PVOID Context);
  32. typedef BOOL (WINAPI *PFAXROUTEMODIFYROUTINGDATA)(DWORD JobId, LPCWSTR RoutingGuid, LPBYTE RoutingData, DWORD RoutingDataSize );
  33. typedef struct _FAX_ROUTE_CALLBACKROUTINES {
  34. DWORD SizeOfStruct; // size of the struct set by the fax service
  35. PFAXROUTEADDFILE FaxRouteAddFile;
  36. PFAXROUTEDELETEFILE FaxRouteDeleteFile;
  37. PFAXROUTEGETFILE FaxRouteGetFile;
  38. PFAXROUTEENUMFILES FaxRouteEnumFiles;
  39. PFAXROUTEMODIFYROUTINGDATA FaxRouteModifyRoutingData;
  40. } FAX_ROUTE_CALLBACKROUTINES, *PFAX_ROUTE_CALLBACKROUTINES;
  41. //
  42. // routing data structure
  43. //
  44. typedef struct _FAX_ROUTE {
  45. DWORD SizeOfStruct; // size of the struct set by the fax service
  46. DWORD JobId; // Fax job identifier
  47. DWORDLONG ElapsedTime; // Elapsed time for whole fax job in Coordinated Universal Time (UTC)
  48. DWORDLONG ReceiveTime; // Starting time for fax job in Coordinated Universal Time (UTC)
  49. DWORD PageCount; // Number of pages received
  50. LPCWSTR Csid; // Called station identifier
  51. LPCWSTR Tsid; // Transmitting station identifier
  52. LPCWSTR CallerId; // Caller id
  53. LPCWSTR RoutingInfo; // Routing info such as DID, T.30-subaddress, etc.
  54. LPCWSTR ReceiverName; // Receiver's name
  55. LPCWSTR ReceiverNumber; // Receiver's fax number
  56. LPCWSTR DeviceName; // Device name for the line that received the fax
  57. DWORD DeviceId; // Permenant line identifier for the receiving device
  58. LPBYTE RoutingInfoData; // Routing infor data to override configured info
  59. DWORD RoutingInfoDataSize;// Size of routing info data
  60. } FAX_ROUTE, *PFAX_ROUTE;
  61. enum FAXROUTE_ENABLE {
  62. QUERY_STATUS = -1,
  63. STATUS_DISABLE = 0,
  64. STATUS_ENABLE = 1
  65. };
  66. //
  67. // prototypes
  68. //
  69. BOOL WINAPI
  70. FaxRouteInitialize(
  71. IN HANDLE HeapHandle,
  72. IN PFAX_ROUTE_CALLBACKROUTINES FaxRouteCallbackRoutines
  73. );
  74. BOOL WINAPI
  75. FaxRouteDeviceEnable(
  76. IN LPCWSTR RoutingGuid,
  77. IN DWORD DeviceId,
  78. IN LONG Enabled
  79. );
  80. BOOL WINAPI
  81. FaxRouteDeviceChangeNotification(
  82. IN DWORD DeviceId,
  83. IN BOOL NewDevice
  84. );
  85. BOOL WINAPI
  86. FaxRouteGetRoutingInfo(
  87. IN LPCWSTR RoutingGuid,
  88. IN DWORD DeviceId,
  89. IN LPBYTE RoutingInfo,
  90. OUT LPDWORD RoutingInfoSize
  91. );
  92. BOOL WINAPI
  93. FaxRouteSetRoutingInfo(
  94. IN LPCWSTR RoutingGuid,
  95. IN DWORD DeviceId,
  96. IN const BYTE *RoutingInfo,
  97. IN DWORD RoutingInfoSize
  98. );
  99. typedef BOOL (WINAPI *PFAXROUTEINITIALIZE) (HANDLE,PFAX_ROUTE_CALLBACKROUTINES);
  100. typedef BOOL (WINAPI *PFAXROUTEMETHOD) (const FAX_ROUTE*,PVOID*,LPDWORD);
  101. typedef BOOL (WINAPI *PFAXROUTEDEVICEENABLE) (LPCWSTR,DWORD,LONG);
  102. typedef BOOL (WINAPI *PFAXROUTEDEVICECHANGENOTIFICATION) (DWORD,BOOL);
  103. typedef BOOL (WINAPI *PFAXROUTEGETROUTINGINFO) (LPCWSTR,DWORD,LPBYTE,LPDWORD);
  104. typedef BOOL (WINAPI *PFAXROUTESETROUTINGINFO) (LPCWSTR,DWORD,const BYTE*,DWORD);
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108. #endif