FaxMan SDK Version 4.7
FaxMan #DEFINES

FaxMan Defines, Enumerations and Structures

 

 

#define WM_FAXMSG WM_USER+1000

 

// These identifiers should be responded to by the client apps in their FaxMan message window.

#define FAXSENDMSG  0
#define FAXPRINTMSG  1
#define FAXLOGADD  3
#define FAXLOGREMOVE 4
#define FAXCONFIGMSG 5
#define FAXMODEMMSG  6
#define FAXSERVERCONFIGMSG 7
#define FAXMODEMDONE  8

 

FAXCLASS is an enumeration of the possible types of faxmodems installed a and usable by FaxMan

 

typedef enum {
 FAX_0 = 0,
 FAX_1,
 FAX_2,
 FAX_20,
 FAX_21,
 FAX_10
} FAXCLASS;

 

 

FAXSTATE is an enumeration of the possible fax states. During fax transmission, an application will receive notifications which contain the current state of the operation, as defined below.

 

typedef enum {

 FAXST_ERROR= 0,

 FAXST_OK,

 FAXST_INIT,

 FAXST_WAITFORSEND,

 FAXST_SEND_INIT,  //initializing a send operation

 FAXST_SEND_DIALING,  //we're dialing...

 FAXST_SEND_WAIT_FCON, //waiting for connect message

 FAXST_SEND_FCON,  //Connected!

 FAXST_SEND_WAIT_FCSI, //waiting for FCSI

 FAXST_SEND_FCSI,  //Receiver's ID string

 FAXST_SEND_WAIT_FDIS, //waiting for remote +FDIS

 FAXST_SEND_FDIS,  //Remote T.30 parameters

 FAXST_SEND_WAIT_CONNECT, //wait for connect

 FAXST_SEND_FDCS,  //negotiated T.30 parms

 FAXST_SENDING,  //actually sending data - no longer in command mode

 FAXST_PAGE_END,  //end of page

 FAXST_PORTSHUT,  //comm port deleted

 FAXST_ABORT,   //abort the current FAX and reset faxmodem

 FAXST_COMPLETE,  //we're done, and our session has ended

 // Receiving fax states

 FAXST_INITRX,   //initialize faxmodem for receive

 FAXST_WAITFORRX,  //waiting for RING

 FAXST_ANSWERING,  //answering the phone

 FAXST_RX_NEGOTIATE,  //negotiating RX parms

 FAXST_RXDATA,   //receiving fax data

 FAXST_RX_PAGE_END,  //end of rx page

 

} FAXSTATE;

 

FAXERROR is a list of error codes possible during transmission

typedef enum { 

 FAXERR_OK,

 FAXERR_ACK,   // Command wasn't acknowledged w/OK

 FAXERR_BADFAXMODEM,  // Faxmodem doesn't support FaxModem-level ops

 FAXERR_INIT,   // error initializing faxmodem

 FAXERR_FDIS,   // bad FDIS settings

 FAXERR_FLID,   // some kind of error setting local ID

 FAXERR_DIAL,   // error dialing

 FAXERR_FCON_ERR,  // error trying to connect to remote fax

 FAXERR_FCSI,   // bad FCSI string

 FAXERR_NEG_FDIS,  // error receiving Negotiated +FDIS

 FAXERR_BADSTATE,  // tried to do something at wrong time

 FAXERR_BUSY,   // line is busy

 FAXERR_NODIALTONE,  // no dialtone found when dialing

 FAXERR_NOCONNECT,  // got a non-fax answer or no answer

 FAXERR_CANCEL,  // user cancel

 FAXERR_FPTS,   // bad or no FPTS when expected

 FAXERR_FHNG,   // bad FHNG exit code or no FHNG when expected

 FAXERR_FDCS,   // +FDCS: not found when expected

 FAXERR_ERROR,   // general unspecific error w/faxmodem

 FAXERR_FILE,   // invalid fax file or files specified

 FAXERR_VERSION,  // incompatible DLL/Server versions

 FAXERR_TIMEOUT  // Command timed out

 FAXERR_NO_MPS_RESP  //No response to MPS repeated 3 times

 FAXERR_NO_EOP_RESP  //No Response to EOP repeated 3 times

 FAXERR_NOTRAIN  // Could not train the remote system

 FAXERR_PORTINIT  // Could not open or initialize the port

} FAXERROR;

 

Log identifier flags

#define SUBSCRIBE_LOG_PENDING 0x01

#define SUBSCRIBE_LOG_SENDING 0x02

#define SUBSCRIBE_LOG_COMPLETE 0x04

#define SUBSCRIBE_LOG_FAILED 0x08

#define SUBSCRIBE_LOG_RECEIVE 0x10

#define SUBSCRIBE_LOG_ALL  0xff

 

 


© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.