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.

145 lines
4.7 KiB

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