jwafaxroute.pas 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. {******************************************************************************}
  2. { }
  3. { Fax Routing Extension API interface unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: faxroute.h, released November 2001. The original Pascal}
  9. { code is: FaxRoute.pas, released April 2002. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. // $Id: JwaFaxRoute.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
  43. unit JwaFaxRoute;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "faxroute.h"'}
  47. {$HPPEMIT ''}
  48. {$I jediapilib.inc}
  49. interface
  50. uses
  51. JwaWindows;
  52. //
  53. // microsoft routing guids
  54. //
  55. const
  56. MS_FAXROUTE_PRINTING_GUID = TEXT('{aec1b37c-9af2-11d0-abf7-00c04fd91a4e}');
  57. {$EXTERNALSYM MS_FAXROUTE_PRINTING_GUID}
  58. MS_FAXROUTE_FOLDER_GUID = TEXT('{92041a90-9af2-11d0-abf7-00c04fd91a4e}');
  59. {$EXTERNALSYM MS_FAXROUTE_FOLDER_GUID}
  60. MS_FAXROUTE_EMAIL_GUID = TEXT('{6bbf7bfe-9af2-11d0-abf7-00c04fd91a4e}');
  61. {$EXTERNALSYM MS_FAXROUTE_EMAIL_GUID}
  62. //
  63. // callback routines
  64. //
  65. type
  66. PFAXROUTEADDFILE = function(JobId: DWORD; FileName: LPCWSTR; Guid: LPGUID): LONG; stdcall;
  67. {$EXTERNALSYM PFAXROUTEADDFILE}
  68. PFAXROUTEDELETEFILE = function(JobId: DWORD; FileName: LPCWSTR): LONG; stdcall;
  69. {$EXTERNALSYM PFAXROUTEDELETEFILE}
  70. PFAXROUTEGETFILE = function(JobId, Index: DWORD; FileNameBuffer: LPWSTR; RequiredSize: LPDWORD): BOOL; stdcall;
  71. {$EXTERNALSYM PFAXROUTEGETFILE}
  72. PFAXROUTEENUMFILE = function(JobId: DWORD; GuidOwner, GuidCaller: LPGUID; FileName: LPCWSTR; Context: PVOID): BOOL; stdcall;
  73. {$EXTERNALSYM PFAXROUTEENUMFILE}
  74. PFAXROUTEENUMFILES = function(JobId: DWORD; Guid: LPGUID; FileEnumerator: PFAXROUTEENUMFILE; Context: PVOID): BOOL; stdcall;
  75. {$EXTERNALSYM PFAXROUTEENUMFILES}
  76. PFAXROUTEMODIFYROUTINGDATA = function(JobId: DWORD; RoutingGuid: LPCWSTR; RoutingData: LPBYTE; RoutingDataSize: DWORD): BOOL; stdcall;
  77. {$EXTERNALSYM PFAXROUTEMODIFYROUTINGDATA}
  78. PFAX_ROUTE_CALLBACKROUTINES = ^FAX_ROUTE_CALLBACKROUTINES;
  79. {$EXTERNALSYM PFAX_ROUTE_CALLBACKROUTINES}
  80. _FAX_ROUTE_CALLBACKROUTINES = record
  81. SizeOfStruct: DWORD; // size of the struct set by the fax service
  82. FaxRouteAddFile: PFAXROUTEADDFILE;
  83. FaxRouteDeleteFile: PFAXROUTEDELETEFILE;
  84. FaxRouteGetFile: PFAXROUTEGETFILE;
  85. FaxRouteEnumFiles: PFAXROUTEENUMFILES;
  86. FaxRouteModifyRoutingData: PFAXROUTEMODIFYROUTINGDATA;
  87. end;
  88. {$EXTERNALSYM _FAX_ROUTE_CALLBACKROUTINES}
  89. FAX_ROUTE_CALLBACKROUTINES = _FAX_ROUTE_CALLBACKROUTINES;
  90. {$EXTERNALSYM FAX_ROUTE_CALLBACKROUTINES}
  91. TFaxRouteCallbackRoutines = FAX_ROUTE_CALLBACKROUTINES;
  92. PFaxRouteCallbackRoutines = PFAX_ROUTE_CALLBACKROUTINES;
  93. //
  94. // routing data structure
  95. //
  96. PFAX_ROUTE = ^FAX_ROUTE;
  97. {$EXTERNALSYM PFAX_ROUTE}
  98. _FAX_ROUTE = record
  99. SizeOfStruct: DWORD; // size of the struct set by the fax service
  100. JobId: DWORD; // Fax job identifier
  101. ElapsedTime: DWORDLONG; // Elapsed time for whole fax job in Coordinated Universal Time (UTC)
  102. ReceiveTime: DWORDLONG; // Starting time for fax job in Coordinated Universal Time (UTC)
  103. PageCount: DWORD; // Number of pages received
  104. Csid: LPCWSTR; // Called station identifier
  105. Tsid: LPCWSTR; // Transmitting station identifier
  106. CallerId: LPCWSTR; // Caller id
  107. RoutingInfo: LPCWSTR; // Routing info such as DID, T.30-subaddress, etc.
  108. ReceiverName: LPCWSTR; // Receiver's name
  109. ReceiverNumber: LPCWSTR; // Receiver's fax number
  110. DeviceName: LPCWSTR; // Device name for the line that received the fax
  111. DeviceId: DWORD; // Permenant line identifier for the receiving device
  112. RoutingInfoData: LPBYTE; // Routing infor data to override configured info
  113. RoutingInfoDataSize: DWORD; // Size of routing info data
  114. end;
  115. {$EXTERNALSYM _FAX_ROUTE}
  116. FAX_ROUTE = _FAX_ROUTE;
  117. {$EXTERNALSYM FAX_ROUTE}
  118. TFaxRoute = FAX_ROUTE;
  119. PFaxRoute = PFAX_ROUTE;
  120. FAXROUTE_ENABLE = DWORD;
  121. {$EXTERNALSYM FAXROUTE_ENABLE}
  122. TFaxRouteEnabl = FAXROUTE_ENABLE;
  123. const
  124. QUERY_STATUS = DWORD(-1);
  125. {$EXTERNALSYM QUERY_STATUS}
  126. STATUS_DISABLE = 0;
  127. {$EXTERNALSYM STATUS_DISABLE}
  128. STATUS_ENABLE = 1;
  129. {$EXTERNALSYM STATUS_ENABLE}
  130. //
  131. // prototypes
  132. //
  133. type
  134. PFAXROUTEINITIALIZE = function(HeapHandle: HANDLE; FaxRouteCallbackRoutines: PFAX_ROUTE_CALLBACKROUTINES): BOOL; stdcall;
  135. {$EXTERNALSYM PFAXROUTEINITIALIZE}
  136. PFAXROUTEMETHOD = function(FaxRoute: PFAX_ROUTE; P: PVOID; D: LPDWORD): BOOL; stdcall;
  137. {$EXTERNALSYM PFAXROUTEMETHOD}
  138. PFAXROUTEDEVICEENABLE = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; Enabled: LONG): BOOL; stdcall;
  139. {$EXTERNALSYM PFAXROUTEDEVICEENABLE}
  140. PFAXROUTEDEVICECHANGENOTIFICATION = function(DeviceId: DWORD; NewDevice: BOOL): BOOL; stdcall;
  141. {$EXTERNALSYM PFAXROUTEDEVICECHANGENOTIFICATION}
  142. PFAXROUTEGETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: LPDWORD): BOOL; stdcall;
  143. {$EXTERNALSYM PFAXROUTEGETROUTINGINFO}
  144. PFAXROUTESETROUTINGINFO = function(RoutingGuid: LPCWSTR; DeviceId: DWORD; RoutingInfo: LPBYTE; RoutingInfoSize: DWORD): BOOL; stdcall;
  145. {$EXTERNALSYM PFAXROUTESETROUTINGINFO}
  146. implementation
  147. end.