// WINFAX.CH - constants used in fax interface

#ifndef NTRIM
#define NTRIM(x) (ALLTRIM(STR(x)))
#endif

#ifndef CRLF
#define CRLF (CHR(13)+CHR(10))
#endif

#xtranslate DEFAULT(<z>,<y>) 		=> <z> := IIF(<z> == NIL ,<y>,<z>)

#define PORT_OPEN_QUERY           1
#define PORT_OPEN_MODIFY 			 2

#define JSA_NOW                   0   // Send now
#define JSA_SPECIFIC_TIME,        1   // Send at specific time
#define JSA_DISCOUNT_PERIOD       2   // Send at server configured discount period

#define DRT_NONE                  0   // Do not send receipt
#define DRT_EMAIL                 1   // Send receipt by email
#define DRT_INBOX                 2   // send receipt to local inbox

//
// job status defines
//
#define JS_PENDING                  0x00000000
#define JS_INPROGRESS               0x00000001
#define JS_DELETING                 0x00000002
#define JS_FAILED                   0x00000004
#define JS_PAUSED                   0x00000008
#define JS_NOLINE                   0x00000010
#define JS_RETRYING                 0x00000020
#define JS_RETRIES_EXCEEDED         0x00000040

//
// fax port state masks
//
// if you change these defines the be sure to
// change the resources in the fax service.
//

#define FPS_DIALING              0x20000001
#define FPS_SENDING              0x20000002
#define FPS_RECEIVING            0x20000004
#define FPS_COMPLETED            0x20000008
#define FPS_HANDLED              0x20000010
#define FPS_UNAVAILABLE          0x20000020
#define FPS_BUSY                 0x20000040
#define FPS_NO_ANSWER            0x20000080
#define FPS_BAD_ADDRESS          0x20000100
#define FPS_NO_DIAL_TONE         0x20000200
#define FPS_DISCONNECTED         0x20000400
#define FPS_FATAL_ERROR          0x20000800
#define FPS_NOT_FAX_CALL         0x20001000
#define FPS_CALL_DELAYED         0x20002000
#define FPS_CALL_BLACKLISTED     0x20004000
#define FPS_INITIALIZING         0x20008000
#define FPS_OFFLINE              0x20010000
#define FPS_RINGING              0x20020000

#define FPS_AVAILABLE            0x20100000
#define FPS_ABORTING             0x20200000
#define FPS_ROUTING              0x20400000
#define FPS_ANSWERED             0x20800000
