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.

754 lines
34 KiB

  1. /***************************************************************************
  2. Name :
  3. Comment :
  4. Revision Log
  5. Date Name Description
  6. -------- ----- ---------------------------------------------------------
  7. ??? arulm created
  8. 3/17/94 josephj Modified to handle AWG3 format, tapi and other device ids.
  9. Specifically, changed prototypes for FileT30Init,
  10. and FileT30ModemClasses, and added #defines for LINEID_*
  11. ***************************************************************************/
  12. #ifndef _FILET30_
  13. #define _FILET30_
  14. #include <ifaxos.h>
  15. #include <t30fail.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. // Types of LineId's
  20. #define LINEID_NONE (0x0)
  21. #define LINEID_COMM_PORTNUM (0x1)
  22. #define LINEID_COMM_HANDLE (0x2)
  23. #define LINEID_TAPI_DEVICEID (0x3)
  24. #define LINEID_TAPI_PERMANENT_DEVICEID (0x4)
  25. #define LINEID_NETFAX_DEVICE (0x10)
  26. USHORT FileT30Init(
  27. DWORD dwLineID, USHORT usLineIDType,
  28. DWORD dwProfileID, LPSTR lpszSection,
  29. USHORT uClass,
  30. // LPSTR szSpoolDir, LPSTR szId,
  31. // LPSTR szDefRecipAddress, LPSTR szDefRecipName,
  32. USHORT uAutoAnswer, HWND hwndListen
  33. );
  34. // dwLineID, usLineIDType:
  35. // If usLineIDType==LINEID_COMM_PORTNUM:
  36. // dwLineID = COMM port# -- 1 to 4 for COM ports, 0 for CAS
  37. // If usLineIDType==LINEID_COMM_HANDLE:
  38. // dwLineID = Handle to open comm port.
  39. // If usLineIDType==LINEID_TAPI_DEVICEID:
  40. // dwLineID = TAPI DeviceID
  41. // If usLineIDType==LINEID_TAPI_PERMANENT_DEVICEID:
  42. // dwLineID = TAPI Permanent DeviceID.
  43. //
  44. // uClass: exactly one of the FAXCLASS??? #defines from below
  45. //
  46. // dwProfileID and lpszSection point to the registry/inifile that
  47. // contain configuration information for the particular line.
  48. //
  49. // WIN16: dwProfileID is ignored (should be 0), and we look in efaxpump.ini
  50. // lpszSection should point to the section where per-line
  51. // configuration information is stored. The following entries
  52. // are mandatory:
  53. // - SpoolDir --> path to spool directory for recvd files
  54. // acquires modem etc. Returns one of values below
  55. // - LocalId: ID to be used in DIS/CIG
  56. // - DefRecipAddr: Recip address to be used for
  57. // incoming G3 faxes
  58. // - DefRecipName: Recip name to be used for incoming G3 faxes.
  59. // WIN32: dwProfileID should point to a system registry key handle (such as
  60. // HKEY_CURRENT_USER)
  61. // lpszSection should be a key relative to the above handle that
  62. // points to a location where configuration information for this
  63. // line is to be stored. The mandatory entries are those mentioned
  64. // above for WIN16 -- they are all null-terminated strings.
  65. // uAutoAnswer, hwndListen: same as for FileT30Listen below..
  66. //
  67. // Returns OK, NOMODEM (port number is wrong) or PORTBUSY
  68. // (somebody else is using the port) or WRONGTYPE (wrong modem type)
  69. // BETTERTYPE (chosen type is supported, but a "better" type is also
  70. // supported). In the last 2 cases suberr is 1,2, or 3 giving the
  71. // correct/better type and Init is *successful*. In the BETTERTYPE
  72. // case, the chosen type is used, *not* the "better" type.
  73. // Can return any of these on modem errors:-
  74. // T30_MODEMERROR -- usually non-fixable. Got some weird response from modem
  75. // T30_PORTBUSY -- someone else owns teh Com Port
  76. // T30_MODEMDEAD -- could not talk to modem at all. Modem may be off,
  77. // on a different port or the guy has cabling problems
  78. // this is sometimes fixable by power-cycling the modem
  79. USHORT FileT30Listen(USHORT uLevel, HWND hwndResult);
  80. // uLevel: 0==off 1==notif posted if hwndResult is non-NULL 2==auto
  81. // returns one of values below
  82. // Usually OK or PORTBUSY
  83. // Can return any of these on modem errors:-
  84. // T30_MODEMERROR -- usually non-fixable. Got some weird response from modem
  85. // T30_PORTBUSY -- someone else owns teh Com Port
  86. // T30_MODEMDEAD -- could not talk to modem at all. Modem may be off,
  87. // on a different port or the guy has cabling problems
  88. // this is sometimes fixable by power-cycling the modem
  89. // In manual answer mode (Mode 1), once a RING is detected,
  90. // it _must_ be cleared before anything else can be done.
  91. // It can be cleared by a call to FileT30Answer(T/F)
  92. void FileT30Send(ATOM aPhone, ATOM aCapsPhone, ATOM aFileAWG3, ATOM aFileIFX, ATOM aFileEFX, ATOM aFileDCX, HWND hwndResult);
  93. // return value via IF_FILET30_DONE message below.
  94. // Result values can be
  95. // BUSY or PORTBUSY
  96. // CALLDONE+SENTALL -- all Aok
  97. // CALLFAIL+SENTSOME or SENTNONE -- actually called & failed
  98. // BADPARAM -- bad file name, phone number too long
  99. // BUG -- some debugchk failed
  100. // DIALFAIL+NCUDIAL_xxx -- failure during dial
  101. // DIALFAIL+NCUANSWER_xxx -- failure during answer
  102. // Can return any of these on modem errors:-
  103. // T30_MODEMERROR -- usually non-fixable. Got some weird response from modem
  104. // T30_PORTBUSY -- someone else owns teh Com Port
  105. // T30_MODEMDEAD -- could not talk to modem at all. Modem may be off,
  106. // on a different port or the guy has cabling problems
  107. // this is sometimes fixable by power-cycling the modem
  108. // That's it
  109. // aCapsPhone, is nonzero, is to be used to as the key for saving
  110. // capabilities entries (it will be in canonical form, typically).
  111. // All the caller is responsible for freeing all atoms, on receiving
  112. // FILET30_DONE message, which is guaranteed to be sent.
  113. ULONG FileT30Answer(BOOL fAccept, BOOL fImmediate, HWND hwndResult);
  114. // fAccept is FALSE to reject a call
  115. // if fAccept and fImmediate are TRUE call is answered even
  116. // if no RING detected if transport is IDLE
  117. // if fAccept==TRUE and fImmediate==FALSE call is answered
  118. // iff it is ringing. We also wait for the configured
  119. // number of Rings rather than answer immediately.
  120. // failure return value (loword==err hiword==FailureCode)
  121. // Result values can be
  122. // BUSY or PORTBUSY
  123. // FILE_ERROR
  124. // Can return any of these on modem errors:-
  125. // T30_MODEMERROR -- usually non-fixable. Got some weird response from modem
  126. // T30_PORTBUSY -- someone else owns teh Com Port
  127. // T30_MODEMDEAD -- could not talk to modem at all. Modem may be off,
  128. // on a different port or the guy has cabling problems
  129. // this is sometimes fixable by power-cycling the modem
  130. // Nothing else
  131. void FileT30Abort();
  132. // Synchronous abort of current send/recv. Busy-waits until done.
  133. // Transport returns to IDLE state. If aim is to shut down all
  134. // activity, then call FileT30Listen(0,0) first, then FileT30Abort()
  135. // and then FileT30Deinit(TRUE)
  136. DWORD FileT30ReportRecv(LPDWORD lpdwPollContext, BOOL fGetIt);
  137. // returns file names of received faxes one by one.
  138. // *lpdwPollContext, if non-null, will be set to 0 if this is a normal
  139. // receive or the supplied context dword if this is a response to a poll
  140. // request (see FileT30PollRequest).
  141. //
  142. // returns 0 if no more received faxes
  143. // LOWORD is global atom for file name
  144. // HIWORD is final result (i.e. lowbyte=one of the values below,
  145. // hibyte=Failure Code // T30FAIL_xxx values)
  146. //
  147. // The only return values returned are:-
  148. // ANSWERFAIL (ext err is NCUANSWER_ERROR or NCUANSWER_NORING)
  149. // (former likely on voice calls, latter on manual answers)
  150. // CALLFAIL, CALLDONE, ABORT or FILE_ERROR (ext err == 0)
  151. // file atom can be present anyway from any of these. If
  152. // result value is not CALLDONE then this is only a partially
  153. // received transmission.
  154. BOOL FileT30AckRecv(ATOM aRecv);
  155. // acknowledges successful receipt. The Recv log is deleted
  156. // aRecv must be non-NULL and a valid recv file name
  157. // returns FALSE on errors
  158. // ***NOTE*** Until AckRecv is called multiple calls to ReportRecv
  159. // will return the same value
  160. USHORT FileT30Status(void);
  161. // returns one of
  162. # define T30STATE_IDLE 0
  163. # define T30STATE_SENDING 1
  164. # define T30STATE_RECEIVING 2
  165. # define T30STATE_ABORTING 3 // stuck inside abort loop
  166. // this is a bad error...!!
  167. void FileT30SetStatusWindow(HWND hwndStatus);
  168. // all subsequent status messages get posted to this
  169. // window. If hwndStatus==0, recv status is not posted
  170. BOOL FileT30ReadIniFile(void);
  171. // forces transport to re-read INI file
  172. // returns FALSE if busy
  173. USHORT FileT30DeInit(BOOL fForce);
  174. // Frees modem etc.
  175. // returns T30_OK if ok
  176. // Returns T30_BUSY if call in progress
  177. // If call not in progress, but recv files left,
  178. // returns T30_RECVLEFT. If fForce is TRUE then
  179. // it saves recv file list to disk and returns
  180. // and T30_OK. Reloads recv list next time
  181. DWORD FileT30ModemClasses(
  182. DWORD dwLineID, USHORT usLineIDType,
  183. DWORD dwProfileID, LPSTR lpszSection
  184. );
  185. // dwLineID, usLineIDType: same as in FileT30Init.
  186. // dwProfileID, lpszSection: same as in FileT30Init.
  187. //----------MUST BE CALLED ONLY WHEN TRANSPORT IS **NOT** INITED--------//
  188. // returns ((DWORD)(-1)) on error (e.g. if called when transport is inited)
  189. // return 0 if no modem detected (e.g. CAS is supported but no CAS detected
  190. // or can't get ComPort or can't talk to modem)
  191. // LOWORD(return value)==uClasses is one or more of the below
  192. // CAS is checked IFF uPort is 0
  193. #ifdef WIN32
  194. BOOL FileT30UpdateHandle(HANDLE hComm);
  195. // Once the transport has been inited with an external handle,
  196. // and answer mode is off, and no activity is ongoing, this api
  197. // can be called to to specify a new comm handle. If hComm ==
  198. // NULL, this will disable further sends or attempts to change answer
  199. // mode to on until a subsequent FileT30UpdateHandle call is made with a
  200. // valid hComm. The comm port and modem will be in an unknown state
  201. // when this is made, so the transport should properly setup the
  202. // port and reset the modem to a known state the next time it want's
  203. // to talk to the modem.
  204. #endif
  205. # define FAXCLASS0 0x01
  206. # define FAXCLASS1 0x02
  207. # define FAXCLASS2 0x04
  208. # define FAXCLASS2_0 0x08 // Class4==0x10
  209. # define FAXCLASSMOUSE 0x40 // used if mouse found
  210. # define FAXCLASSCAS 0x80
  211. void FileT30PollReq(ATOM aPhone, ATOM aCapsPhone, USHORT PollType,
  212. ATOM aDocName, ATOM aPassWord, DWORD dwPollContext, HWND hwndResult);
  213. // Poll type is one of the POLLTYPE_ values below
  214. #define POLLTYPE_G3 0 // G3(blind) poll req: DocName/Pass=null
  215. #define POLLTYPE_EXTCAPS 2 // ext-caps poll request: DocName/Pass=null
  216. #define POLLTYPE_NAMED_DOC 3 // named-doc poll req: DocName=reqd. Pwd=optional
  217. #define POLLTYPE_BYRECIPNAME 4 // poll-by-recip-name: DocName=recip email-name. Pwd=reqd
  218. #define POLLTYPE_BYPATHNAME 5 // poll-by-filename: DocName=file-path. Pwd=reqd
  219. // dwPollContext is a dword of context which will associated with all
  220. // receives associated with this poll request. See FileT30ReportReceives.
  221. // return value via IF_FILET30_DONE message below.
  222. // Poll Response shows up as a regular recvd message
  223. // Result values can be
  224. // BUSY or PORTBUSY
  225. // CALLDONE -- all Aok
  226. // CALLFAIL -- actually called & failed
  227. // BADPARAM -- bad file name, phone number too long
  228. // BUG -- some debugchk failed
  229. // DIALFAIL+NCUDIAL_xxx -- failure during dial
  230. // Can return any of these on modem errors:-
  231. // T30_MODEMERROR -- usually non-fixable. Got some weird response from modem
  232. // T30_PORTBUSY -- someone else owns teh Com Port
  233. // T30_MODEMDEAD -- could not talk to modem at all. Modem may be off,
  234. // on a different port or the guy has cabling problems
  235. // this is sometimes fixable by power-cycling the modem
  236. // aCapsPhone -- see FileT30Send.
  237. // also returns
  238. // T30_NOSUPPORT -- returns this if this API is called with a Class2
  239. // or CAS modem (polling not supported), or a non-G3 pollreq is
  240. // sent to a non-AWFAX entity (this error returned after calling)
  241. /**------------------ Messages returned *from* t30.exe --------------------**/
  242. #define IF_FILET30_STATUS (IF_USER + 0x702)
  243. // wParam==aPhone (used as handle)
  244. // LOBYTE(LOWORD(lParam))==one of T30STATUS_ defines below
  245. // HIBYTE(LOWORD(lParam))==N1 (as defined below)
  246. // LOBYTE(HIWORD(lParam))==N2 (as defined below)
  247. // HIBYTE(HIWORD(lParam))==N3 (as defined below)
  248. // +++ WARNING: these constants are duplicated in psifxapi.h
  249. typedef enum
  250. {
  251. T30STAT_INITING, // all N==0
  252. // sender
  253. T30STATS_DIALING, // all N==0
  254. T30STATS_TRAIN, // N1==BaudRateCode N2==how many times N3==0
  255. // Baud rate remains same for the page that follows
  256. T30STATS_SEND, // N1==Page number N2==%age done N3==0
  257. T30STATS_CONFIRM, // N1==Page number N2==0 N3==0
  258. T30STATS_REJECT, // N1==Page number N2==0 N3==0
  259. T30STATS_RESEND_ECM,// N1==Page number N2==0 N3==Block number
  260. T30STATS_SUCCESS, // all N==0
  261. T30STATS_FAIL, // all N==0
  262. // recvr
  263. T30STATR_ANSWERING, // all N==0
  264. T30STATR_TRAIN, // N1==0 N2==how many times(NYI) N3==0
  265. // Baud rate remains same for the page that follows
  266. T30STATR_RECV, // N1==Page number
  267. // MAKEWORD(N2,N3)==KBytes recvd in this page
  268. T30STATR_CONFIRM, // N1==Page number **rest NYI** N2==Num bad lines N3==0
  269. T30STATR_REJECT, // N1==Page number **rest NYI** N2==Num bad lines N3==0
  270. T30STATR_RERECV_ECM,// **all Ns NYI** N1==Page number N2==BlockNum N3==how many times
  271. T30STATR_SUCCESS, // all N==0
  272. T30STATR_FAIL, // all N==0
  273. // both
  274. T30STAT_ERROR, // all N==0
  275. // autoanswer
  276. T30STAT_NOANSWER, // all N==0
  277. T30STAT_MANUALANSWER, // all N==0
  278. T30STAT_AUTOANSWER, // all N==0
  279. T30STATS_SEND_DATA, // N1==Page number N2=KB sent in curr page N3==MsgNum or AttachNum
  280. T30STATR_RECV_DATA, // N1==Page number N2=KB recvd in curr page N3==MsgNum or AttachNum
  281. T30STATS_CONFIRM_ECM // Sent in ADDITION to T30STATS_CONFIRM
  282. // N1==Page number.
  283. // MAKEWORD(N2,N3)==K Bytes confirmed.
  284. }
  285. T30STATUS;
  286. // Baud rate codes
  287. /* V27_2400 0 (display as V.27 2400bps) */
  288. /* V29_9600 1 */
  289. /* V27_4800 2 */
  290. /* V29_7200 3 */
  291. /* V33_14400 4 */
  292. /* V33_12000 6 */
  293. /* V17_14400 8 */
  294. /* V17_9600 9 */
  295. /* V17_12000 10 */
  296. /* V17_7200 11 */
  297. // Not used any more
  298. // #define IF_FILET30_RING (IF_USER + 0x704)
  299. // wParam, lParam not used
  300. // sent iff listen level is set to 1
  301. // This is sent in manual answer mode. You *must* call FileT30Answer
  302. // with TRUE or FALSE after this, otherwise no further calls will
  303. // be answered or notified.
  304. #define IF_FILET30_DESTTYPERES (IF_USER + 0x705)
  305. // wParam==aPhone. LOBYTE(LOWORD(lParam))=one of the DEST_ defines below
  306. // HIBYTE(LOWORD(lParam))=Res--one or more of the RES_ defines
  307. // LOBYTE(HIWORD(lParam))=Enc--one or more of the ENCODE_ defines
  308. // HIBYTE(HIWORD(lParam))=vSecurity--security version number
  309. // 00==none 01==snowball
  310. // (see protapi.h for format)
  311. // Destination types
  312. # define DEST_UNKNOWN 0
  313. # define DEST_G3 1
  314. # define DEST_IFAX 2
  315. # define DEST_EFAX 3
  316. # define NUM_DESTTYPE 4
  317. #define IF_FILET30_TEXTCAPS (IF_USER + 0x706)
  318. // wParam==aPhone. lParam==long pointer to ASCIIZ rep. of recvd NSF/CSI/DIS
  319. // length of the textcaps will never exceed
  320. #define TEXTCAPSSIZE 300
  321. #define IF_FILET30_START (IF_USER + 0x702)
  322. #define IF_FILET30_END (IF_USER + 0x706)
  323. #define IF_FILET30_DONE (IF_USER + 0x703)
  324. // sent after a Send is done
  325. // wParam==aPhone (used as handle)
  326. // LOBYTE(LOWORD(lParam))==result value
  327. // HIBYTE(LOWORD(lParam))==ext err
  328. // LOBYTE(HIWORD(lParam))==FailureCode // one of the T30FAIL_xxx defines
  329. // never returns OK. Only CALLDONE, DIALFAIL, BUSY, PORTBUSY, BADPARAM, BADFILE
  330. // **new** and FILE_ERROR (only on disk-errors on manual answer; on same
  331. // errors in auto-answer, it just doesn't answer). Currently this happens
  332. // if (a) spool dir is so full it can't find a unique file name or
  333. // (b) it can't create a spool file for the received fax.
  334. /**----- result values --------**/
  335. #define T30_OK 0
  336. #define T30_CALLDONE 1
  337. #define T30_CALLFAIL 2
  338. #define T30_BUSY 3
  339. #define T30_DIALFAIL 4
  340. #define T30_ANSWERFAIL 5
  341. #define T30_BADPARAM 6
  342. #define T30_WRONGTYPE 7
  343. #define T30_BETTERTYPE 8
  344. #define T30_NOMODEM 9
  345. #define T30_MISSING_DLLS 10
  346. #define T30_FILE_ERROR 11
  347. #define T30_RECVLEFT 12
  348. #define T30_INTERNAL_ERROR 13
  349. #define T30_ABORT 14
  350. #define T30_MODEMERROR 15
  351. #define T30_PORTBUSY 16
  352. #define T30_MODEMDEAD 17
  353. #define T30_GETCAPS_FAIL 18
  354. #define T30_NOSUPPORT 19
  355. /**----- ICommEnd values **/
  356. /**----- If err=T30_DIALFAIL, exterr is one of -----**/
  357. # define NCUDIAL_ERROR 0
  358. // #define NCUDIAL_OK 1
  359. # define NCUDIAL_BUSY 2
  360. # define NCUDIAL_NOANSWER 3
  361. # define NCUDIAL_NODIALTONE 4
  362. # define NCUDIAL_MODEMERROR 5
  363. /**----- If err=T30_ANSWERFAIL, exterr is one of -----**/
  364. # define NCUANSWER_ERROR 0
  365. // #define NCUANSWER_OK 1
  366. # define NCUANSWER_NORING 8
  367. # define NCUANSWER_MODEMERROR 5
  368. # define NCUANSWER_DATAMODEM 10
  369. /**----- If err=T30_MODEMBUSY, exterr is one of -----**/
  370. // 0==we are using it 1==someone else is using the modem/com port
  371. /**-- On Send: if err=T30_CALLDONE or T30_CALLFAIL, exterr is one of --**/
  372. # define T30_SENTALL 1
  373. # define T30_SENTNONE 2
  374. # define T30_SENTSOME 3
  375. /***
  376. if err=T30_CALLDONE and exterr=T30_SENTALL
  377. a call is considered completed successfully
  378. if err=T30_CALLFAIL and exterr=T30_SENTALL ***REPORT A BUG***
  379. something weird has heppened,
  380. but all pages _may_ have reached.
  381. to be safe call it an error
  382. if err=T30_CALLDONE and exterr!=T30_SENTALL ***REPORT A BUG***
  383. something _really_ weird has happened,
  384. most probably all pages did not reach OK.
  385. To be safe call it an error
  386. if err=T30_CALLFAIL and exterr!=T30_SENTALL
  387. A definite error
  388. **/
  389. /**-- On Send and Recv: if err=T30_CALLDONE or T30_CALLFAIL, FailureCode is one of
  390. the failure codes described in T30FAIL.H
  391. **/
  392. /************************************************************************
  393. *************************************************************************
  394. *************************************************************************
  395. *************************************************************************
  396. *************************************************************************/
  397. /**-- disk file format (MG3, EFX, IFX and CFX files)
  398. File consists on N pages, each with a header of
  399. the following structure, followed by data.
  400. However, all parameters in the headers on non-first
  401. pages are ignored, except the size field, i.e. you can't
  402. mix MG3/IFX/EFX in a single file, and all pages better
  403. use the same res/width/length/encoding.
  404. Sigs are:- "G3", "EB", "EI" (EFAX binary, image) and "EF"
  405. (File/ASCII)
  406. --**/
  407. #define SIG_G3 0x3347
  408. #define SIG_EB 0x4245
  409. #define SIG_EI 0x4945
  410. #define SIG_FA 0x4146
  411. typedef struct {
  412. WORD wSig; // must always be set and must be the same for all headers in a file.
  413. WORD wHeaderSize; // size of this header in bytes. Must always be set
  414. WORD wTotalHeaders; // significant *only* in *first* page header. Can be zero otherwise.
  415. WORD wHeaderNum; // from 1 to wNumPages. Must always be set.
  416. DWORD lDataOffset;// offset to this page's data from start of file. Must always be set.
  417. DWORD lDataSize; // num bytes of data following. Must always be set.
  418. // 16 bytes
  419. DWORD lNextHeaderOffset; // offset to next header, from start of file. Must always be set.
  420. // the next 5 are significant *only* in *first* page header. Can be zero otherwise.
  421. BYTE Resolution; // one or more of the RES_ #defines below
  422. BYTE Encoding; // one or more of the ENCODE_ #defines below
  423. BYTE PageWidth; // one of the WIDTH_ #defines below
  424. BYTE PageLength; // one of the LENGTH_ #defines below
  425. WORD wMinBytesPerLine; // set to 0 if no guarantees
  426. // this may not be used
  427. WORD Text; // Text Encoding, can use TEXT_ASCII from below
  428. BYTE RecvStatus; // Received OK/not OK (0=unknown/unused 1=OK 2=error)
  429. BYTE SendStatus; // Sent OK/not OK (0=unknown/unused 1=OK 2=error)
  430. WORD vSecurity; // Pad to 32 bytes
  431. // 32 bytes
  432. #define MAXFHBIDLEN 20
  433. BYTE szID[MAXFHBIDLEN+1]; // caller id (used in send _and_ recv). Null terminated.
  434. BYTE Reserved2[11]; // Pad to 32 bytes
  435. // 64 bytes
  436. BYTE szFileTitle[13];// Null-term 8.3 user-visible file name,
  437. BYTE szFileName[13]; // Null-term 8.3 file name, assumed to be in _same_
  438. // directory as the spool file containing this struct
  439. BYTE Reserved3[6]; // Pad to 32 bytes
  440. // 96 bytes
  441. BYTE Reserved4[160]; // pad out to 256 bytes for future expansion
  442. // 256 bytes
  443. } FHB, far* LPFHB;
  444. #define vSECURE_SNOW 1
  445. /**---------------------------------------------------------------------
  446. MG3
  447. A G3 file consists of one or more such headers each followed by
  448. Group-3 fax data, in compressed form. Each header starts a new
  449. page. The number of pages, res, encoding, width & len of each
  450. page is set in the first header.
  451. EFX
  452. IFX
  453. An EB file consists of one or more such headers each followed by
  454. Linearized data. Each header starts a new Message. The number of
  455. messages in a file is determined by the 'wTotalPages' field of
  456. the first header. An EI file differs only in that the contents
  457. of the linearized message are claimed to be purely imageable.
  458. CFX
  459. An FA file consists of one or more such headers. Each header
  460. either represents ASCII note-text or a file attachment.
  461. If the Text field of the header is set to TEXT_ASCII,
  462. then the header is followed by lPageDataSize bytes of ASCII
  463. data, and the szFileName field is not used.
  464. Otherwise the Text field must be 0 and the szFileName
  465. field must be meaningful, and must contain the user-visible
  466. filename of an attachment. The file must be in the same
  467. directory, and the filename is in zero-terminated 8.3 format.
  468. Resolution, Width, Length, wMinBytesPerLine unused. The
  469. And the lPageDatSize field of this structure must be zero.
  470. NOTES:-
  471. In all cases, wSig, wHeaderSize, lPageDataSize, lPagePadSize
  472. must be set correctly (0 when applicable).
  473. Each FHB in the file corresponds to a logical "page", so
  474. wPageNum must always be set accordingly (first page is 1) and
  475. in the FIRST FHB in a file wTotalPages must be set to the total
  476. number of FHB structures in the file. In all other FHBs in the file
  477. it must be 0.
  478. Resolution, Encoding, Width, Length and wMinBytesPerLine
  479. are not always used. In all cases, all unused fields, reserved and
  480. pad fields must be set to 00.
  481. --------------------------------------------------------------------**/
  482. //--------------------- Transport API's ---------------
  483. BOOL FAR PASCAL ProcessAnswerModeReturn(USHORT uRetVal);
  484. // Return TRUE if the answer mode shoudl be retried
  485. // FALSE if not. Displays an error message box if
  486. // necessary.
  487. //--------------------- PROFILE ACCESS API's ---------------
  488. //
  489. // Following APIs provide access the fax-related information
  490. // stored in the the registry/ini-file.
  491. //
  492. // These API's should be used, rather than GetPrivateProfileString, etc...
  493. // On WIN32, these API's use the registry.
  494. //
  495. #ifdef WIN32
  496. #define USE_REGISTRY
  497. #endif
  498. #ifdef USE_REGISTRY
  499. # define DEF_BASEKEY 1
  500. # define OEM_BASEKEY 2
  501. #else
  502. # define DEF_BASEKEY 0
  503. # define OEM_BASEKEY 0
  504. #endif
  505. #define szINIFILE "EFAXPUMP.INI"
  506. #define szDIALTONETIMEOUT "DialToneWait"
  507. #define szANSWERTIMEOUT "HangupDelay"
  508. #define szDIALPAUSETIME "CommaDelay"
  509. #define szPULSEDIAL "PULSEDIAL"
  510. #define szDIALBLIND "BlindDial"
  511. #define szSPEAKERCONTROL "SpeakerMode"
  512. #define szSPEAKERVOLUME "Volume"
  513. #define szSPEAKERRING "RingAloud"
  514. #define szRINGSBEFOREANSWER "NumRings"
  515. #define szHIGHESTSENDSPEED "HighestSendSpeed"
  516. #define szLOWESTSENDSPEED "LowestSendSpeed"
  517. #define szENABLEV17SEND "EnableV17Send"
  518. #define szENABLEV17RECV "EnableV17Recv"
  519. #define szDISABLEECM "DisableECM"
  520. #define szDISABLEG3ECM "DisableG3ECM"
  521. #define sz64BYTEECM "SmallFrameECM"
  522. #define szDISABLE_MR_SEND "DisableMRSend"
  523. #define szDISABLE_MR_RECV "DisableMRRecv"
  524. #define szCOPYQUALITYCHECKLEVEL "CopyQualityCheckLevel"
  525. #define szOEMKEY "OEMKey"
  526. #define szFAX "Fax"
  527. #ifdef PCMODEMS
  528. #define szFIXMODEMCLASS "FixModemClass"
  529. #define szFIXSERIALSPEED "FixSerialSpeed"
  530. #define szCL1_NO_SYNC_IF_CMD "Cl1DontSync"
  531. #define szANSWERMODE "AnswerMode"
  532. #define szANS_GOCLASS_TWICE "AnsGoClassTwice"
  533. #endif //PCMODEMS
  534. #define szDEFRECIPNAME "DefRecipName"
  535. #define szDEFRECIPADDR "DefRecipAddr"
  536. #define szSPOOLDIR "SpoolDir"
  537. #define szLOCALID "LocalID"
  538. #define szGENERAL "General"
  539. #define szRUNTIME "RunTime"
  540. #define szACTIVEDEVICEID "ActiveDeviceID"
  541. #define szACTIVEDEVICEIDTYPE "ActiveDeviceIDType"
  542. #define szACTIVEDEVICESECTION "ActiveDeviceSection"
  543. // Following use to specify model-specific behavour of CLASS2 Modems.
  544. // Used only in the class2 driver.
  545. #define szRECV_BOR "Cl2RecvBOR"
  546. #define szSEND_BOR "Cl2SendBOR"
  547. #define szDC2CHAR "Cl2DC2Char" // decimal ascii code.
  548. #define szIS_SIERRA "Cl2IsSr" //Sierra
  549. #define szIS_EXAR "Cl2IsEx" //Exar
  550. #define szSKIP_CTRL_Q "Cl2SkipCtrlQ" // Don't wait for ^Q to send
  551. #define szSW_BOR "Cl2SWBOR" // Implement +FBOR in software.
  552. // Following to control disabling compression capabalities
  553. // 0 => Enabled !0 => Disabled
  554. #define szDISABLE_CMPRS_SEND "DisableCmprsSend"
  555. #define szDISABLE_CMPRS_RECV "DisableCmprsRecv"
  556. // Cotrols whether we delete the modem section on installing modem...
  557. #define szDONT_PURGE "DontPurge"
  558. #define szDIALCAPS "DialCaps"
  559. // One of the LINEDEVCAPSFLAGS_* below.
  560. // RAW Capabilities for the machine dialled last - a MACHINECAPS structure
  561. // which consists of (see srvrdll documentation):
  562. // DIS -- single FR structure.
  563. // NSFs -- Multipe FR structures, terminated by an FR structure with 0
  564. // type and size.
  565. #define szRemoteMachineCaps "RemoteMACHINECAPS"
  566. // Following constants from TAPI.H
  567. // Indicate which special dial chars the modem supports: '!' '@' 'W' resp.
  568. #define LINEDEVCAPFLAGS_DIALBILLING 0x00000040
  569. #define LINEDEVCAPFLAGS_DIALQUIET 0x00000080
  570. #define LINEDEVCAPFLAGS_DIALDIALTONE 0x00000100
  571. #ifdef NSF_TEST_HOOKS
  572. // These are used only for nsf compatibility testing...
  573. // Key where test NSx frames are stored
  574. #define szNSFTEST "Runtime\\NSFTest"
  575. // Under the above key, the values are as follows:
  576. // If any of the following are defined, we will transmit
  577. // the corresponding frames instead of the internally-generated ones:
  578. // Name Type Description
  579. // SentNSFFrameCount string count of nsf frames
  580. // SentNSFFrames binary one or more FR structures
  581. // SentNSSFrameCount string
  582. // SentNSSFrames binary
  583. //
  584. // After each call, the received frames will be written under the same
  585. // key (NSFTest):
  586. // RecvdNSFFrameCount string count of nsf frames
  587. // RecvdNSFFrames binary one or more FR structures
  588. // RecvdNSSFrameCount string
  589. // RecvdNSSFrames binary
  590. // RecvdNSCFrameCount string
  591. // RecvdNSCFrames binary
  592. #endif // NSF_TEST_HOOKS
  593. //=========== PROFILE ENTRIES: ENHANCED COMM MONITORING =============
  594. #define szMONITORCOMM "MonitorComm"
  595. // If 1, comm monitoring is enabled. On by default
  596. // for debug, off by default for retail.
  597. // Used by awfxio32.dll
  598. #define szMONITORBUFSIZEKB "MonitorBufSizeKB"
  599. // Size of comm monitor buffer in KB. If not specified,
  600. // internal default is used.
  601. // Used by awfxio32.dll
  602. //========== PROFILE ENTRIES: ADAPTIVE ANSWER =============
  603. #define szADAPTIVEANSWER "AdaptiveAnswer"
  604. // If 1, adaptive answer is enabled -- i.e., the ability
  605. // to answer either a data or fax call.
  606. // Used by awfxio32.dll and awfxex32.exe
  607. //========== PROFILE ENTRIES: TAPI =============
  608. #define szHIGHEST_PRIO_APP "HighestPrioApp"
  609. // String value giving module name of app to be placed as
  610. // highest priority to answer datamodem calls.
  611. // Used by awfxex32.exe
  612. // Flags passed into ProfileOpen
  613. enum {
  614. fREG_READ = 0x1,
  615. fREG_WRITE = 0x1<<1,
  616. fREG_CREATE = 0x1<<2,
  617. fREG_VOLATILE = 0x1<<3
  618. };
  619. //--------------------- END PROFILE ACCESS API's ---------------
  620. #ifdef __cplusplus
  621. } // extern "C"
  622. #endif
  623. #endif // _FILET30_