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.

341 lines
6.9 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. faxreg.h
  5. Abstract:
  6. This header defines all of the fax service
  7. registry data structures and access functions.
  8. Author:
  9. Wesley Witt (wesw) 9-June-1996
  10. Revision History:
  11. --*/
  12. #ifndef _FAXREG_
  13. #define _FAXREG_
  14. typedef struct _REG_DEVICE_PROVIDER {
  15. LPTSTR FriendlyName;
  16. LPTSTR ImageName;
  17. LPTSTR ProviderName;
  18. } REG_DEVICE_PROVIDER, *PREG_DEVICE_PROVIDER;
  19. typedef struct _REG_ROUTING_METHOD {
  20. LPTSTR FriendlyName;
  21. LPTSTR FunctionName;
  22. LPTSTR Guid;
  23. LPTSTR InternalName;
  24. DWORD Priority;
  25. } REG_ROUTING_METHOD, *PREG_ROUTING_METHOD;
  26. typedef struct _REG_ROUTING_EXTENSION {
  27. LPTSTR FriendlyName;
  28. LPTSTR ImageName;
  29. LPTSTR InternalName;
  30. DWORD RoutingMethodsCount;
  31. PREG_ROUTING_METHOD RoutingMethods;
  32. } REG_ROUTING_EXTENSION, *PREG_ROUTING_EXTENSION;
  33. typedef struct _REG_DEVICE {
  34. DWORD PermanentLineID;
  35. LPTSTR Name;
  36. LPTSTR Provider;
  37. DWORD Priority;
  38. DWORD Flags;
  39. DWORD Rings;
  40. LPTSTR Csid;
  41. LPTSTR Tsid;
  42. BOOL DeviceInstalled; // this is not stored, but is used to validate currently
  43. // installed tapi devices with the devices in the registry
  44. } REG_DEVICE, *PREG_DEVICE;
  45. typedef struct _REG_DEVICE_CACHE {
  46. DWORD PermanentLineID;
  47. LPTSTR Name;
  48. LPTSTR Provider;
  49. //DWORD Priority;
  50. DWORD Flags;
  51. DWORD Rings;
  52. LPTSTR Csid;
  53. LPTSTR Tsid;
  54. DWORD RoutingMask;
  55. LPTSTR Printer;
  56. LPTSTR Profile;
  57. LPTSTR StoreDir;
  58. } REG_DEVICE_CACHE, *PREG_DEVICE_CACHE;
  59. typedef struct _REG_ROUTING_INFO {
  60. DWORD RoutingMask;
  61. LPTSTR Printer;
  62. LPTSTR Profile;
  63. LPTSTR StoreDir;
  64. } REG_ROUTING_INFO, *PREG_ROUTING_INFO;
  65. typedef struct _REG_CATEGORY {
  66. LPTSTR CategoryName;
  67. DWORD Number;
  68. DWORD Level;
  69. } REG_CATEGORY, *PREG_CATEGORY;
  70. typedef struct _REG_SETUP {
  71. DWORD Installed;
  72. DWORD InstallType;
  73. DWORD InstalledPlatforms;
  74. LPTSTR Csid;
  75. LPTSTR Tsid;
  76. LPTSTR Printer;
  77. LPTSTR StoreDir;
  78. LPTSTR Profile;
  79. DWORD Mask;
  80. DWORD Rings;
  81. } REG_SETUP, *PREG_SETUP;
  82. typedef struct _REG_FAX_SERVICE {
  83. DWORD Retries;
  84. DWORD RetryDelay;
  85. DWORD DirtyDays;
  86. BOOL QueuePaused;
  87. BOOL NextJobNumber;
  88. BOOL Branding;
  89. BOOL UseDeviceTsid;
  90. BOOL ServerCp;
  91. BOOL ForceReceive;
  92. DWORD TerminationDelay;
  93. FAX_TIME StartCheapTime;
  94. FAX_TIME StopCheapTime;
  95. BOOL ArchiveOutgoingFaxes;
  96. LPTSTR ArchiveDirectory;
  97. LPTSTR InboundProfile;
  98. PREG_DEVICE_PROVIDER DeviceProviders;
  99. DWORD DeviceProviderCount;
  100. PREG_ROUTING_EXTENSION RoutingExtensions;
  101. DWORD RoutingExtensionsCount;
  102. PREG_DEVICE Devices;
  103. DWORD DeviceCount;
  104. PREG_DEVICE_CACHE DevicesCache;
  105. DWORD DeviceCacheCount;
  106. PREG_CATEGORY Logging;
  107. DWORD LoggingCount;
  108. } REG_FAX_SERVICE, *PREG_FAX_SERVICE;
  109. typedef struct _REG_FAX_DEVICES {
  110. DWORD DeviceCount;
  111. PREG_DEVICE Devices;
  112. } REG_FAX_DEVICES, *PREG_FAX_DEVICES;
  113. typedef struct _REG_FAX_DEVICES_CACHE {
  114. DWORD DeviceCount;
  115. PREG_DEVICE_CACHE Devices;
  116. } REG_FAX_DEVICES_CACHE, *PREG_FAX_DEVICES_CACHE;
  117. typedef struct _REG_FAX_LOGGING {
  118. DWORD LoggingCount;
  119. PREG_CATEGORY Logging;
  120. } REG_FAX_LOGGING, *PREG_FAX_LOGGING;
  121. //
  122. // function prototypes
  123. //
  124. PREG_FAX_SERVICE
  125. GetFaxRegistry(
  126. VOID
  127. );
  128. VOID
  129. FreeFaxRegistry(
  130. PREG_FAX_SERVICE FaxReg
  131. );
  132. BOOL
  133. CreateFaxEventSource(
  134. PREG_FAX_SERVICE FaxReg,
  135. PFAX_LOG_CATEGORY DefaultCategories,
  136. int DefaultCategoryCount
  137. );
  138. BOOL
  139. SetFaxRegistry(
  140. PREG_FAX_SERVICE FaxReg
  141. );
  142. PREG_FAX_DEVICES
  143. GetFaxDevicesRegistry(
  144. VOID
  145. );
  146. PREG_FAX_DEVICES_CACHE
  147. GetFaxDevicesCacheRegistry(
  148. VOID
  149. );
  150. PREG_ROUTING_INFO
  151. RegGetRoutingInfo(
  152. DWORD PermanentLineID
  153. );
  154. VOID
  155. FreeRegRoutingInfo(
  156. PREG_ROUTING_INFO RoutingInfo
  157. );
  158. BOOL
  159. SetFaxRoutingInfo(
  160. LPTSTR ExtensionName,
  161. LPTSTR MethodName,
  162. LPTSTR Guid,
  163. DWORD Priority,
  164. LPTSTR FunctionName,
  165. LPTSTR FriendlyName
  166. ) ;
  167. VOID
  168. FreeFaxDevicesRegistry(
  169. PREG_FAX_DEVICES FaxReg
  170. );
  171. VOID
  172. FreeFaxDevicesCacheRegistry(
  173. PREG_FAX_DEVICES_CACHE FaxReg
  174. );
  175. BOOL
  176. SetFaxDeviceFlags(
  177. DWORD PermanentLineID,
  178. DWORD Flags
  179. );
  180. BOOL
  181. DeleteFaxDevice(
  182. DWORD PermanentLineID
  183. );
  184. BOOL
  185. DeleteCachedFaxDevice(
  186. LPTSTR DeviceName
  187. );
  188. BOOL
  189. GetInstallationInfo(
  190. LPDWORD Installed,
  191. LPDWORD InstallType,
  192. LPDWORD InstalledPlatforms,
  193. LPDWORD ProductType
  194. );
  195. BOOL
  196. IsModemClass1(
  197. LPSTR SubKey,
  198. LPBOOL Class1Fax
  199. );
  200. BOOL
  201. SaveModemClass(
  202. LPSTR SubKey,
  203. BOOL Class1Fax
  204. );
  205. DWORD
  206. RegAddNewFaxDevice(
  207. LPTSTR DeviceName,
  208. LPTSTR ProviderName,
  209. LPTSTR Csid,
  210. LPTSTR Tsid,
  211. DWORD Priority,
  212. DWORD PermanentLineID,
  213. DWORD Flags,
  214. DWORD Rings,
  215. LONG RoutingMask, // -1 means don't set routing
  216. LPTSTR RoutePrinterName,
  217. LPTSTR RouteDir,
  218. LPTSTR RouteProfile
  219. );
  220. BOOL
  221. RegAddNewFaxDeviceCache(
  222. LPTSTR DeviceName,
  223. LPTSTR ProviderName,
  224. LPTSTR Csid,
  225. LPTSTR Tsid,
  226. DWORD PermanentLineID,
  227. DWORD Flags,
  228. DWORD Rings,
  229. DWORD RoutingMask,
  230. LPTSTR RoutePrinterName,
  231. LPTSTR RouteDir,
  232. LPTSTR RouteProfile
  233. ) ;
  234. BOOL
  235. GetOrigSetupData(
  236. PREG_SETUP RegSetup
  237. );
  238. VOID
  239. FreeOrigSetupData(
  240. PREG_SETUP RegSetup
  241. );
  242. BOOL
  243. SetFaxGlobalsRegistry(
  244. PFAX_CONFIGURATION FaxConfig
  245. );
  246. BOOL
  247. GetLoggingCategoriesRegistry(
  248. PREG_FAX_LOGGING FaxRegLogging
  249. );
  250. BOOL
  251. SetLoggingCategoriesRegistry(
  252. PREG_FAX_LOGGING FaxRegLogging
  253. );
  254. BOOL
  255. SetFaxJobNumberRegistry(
  256. DWORD NextJobNumber
  257. );
  258. #endif