Go to the source code of this file.
Classes | |
struct | t30_state_s |
struct | t30_stats_t |
Defines | |
#define | _SPANDSP_T30_H_ |
#define | T30_MAX_DIS_DTC_DCS_LEN 22 |
#define | T30_MAX_IDENT_LEN 21 |
Typedefs | |
typedef t30_state_s | t30_state_t |
typedef void() | t30_phase_b_handler_t (t30_state_t *s, void *user_data, int result) |
T.30 phase B callback handler. | |
typedef void() | t30_phase_d_handler_t (t30_state_t *s, void *user_data, int result) |
T.30 phase D callback handler. | |
typedef void() | t30_phase_e_handler_t (t30_state_t *s, void *user_data, int completion_code) |
T.30 phase E callback handler. | |
typedef int() | t30_document_handler_t (t30_state_t *s, void *user_data, int status) |
T.30 document handler. | |
typedef void() | t30_set_handler_t (void *user_data, int type, int short_train, int use_hdlc) |
T.30 set a receive or transmit type handler. | |
typedef void() | t30_send_hdlc_handler_t (void *user_data, const uint8_t *msg, int len) |
T.30 send HDLC handler. | |
Enumerations | |
enum | { T30_ERR_OK = 0, T30_ERR_CEDTONE, T30_ERR_T0EXPIRED, T30_ERR_T1EXPIRED, T30_ERR_T3EXPIRED, T30_ERR_HDLCCARR, T30_ERR_CANNOTTRAIN, T30_ERR_OPERINTFAIL, T30_ERR_INCOMPATIBLE, T30_ERR_NOTRXCAPABLE, T30_ERR_NOTTXCAPABLE, T30_ERR_UNEXPECTED, T30_ERR_NORESSUPPORT, T30_ERR_NOSIZESUPPORT, T30_ERR_FILEERROR, T30_ERR_NOPAGE, T30_ERR_BADTIFF, T30_ERR_UNSUPPORTED, T30_ERR_BADDCSTX, T30_ERR_BADPGTX, T30_ERR_ECMPHDTX, T30_ERR_ECMRNRTX, T30_ERR_GOTDCNTX, T30_ERR_INVALRSPTX, T30_ERR_NODISTX, T30_ERR_NXTCMDTX, T30_ERR_PHBDEADTX, T30_ERR_PHDDEADTX, T30_ERR_ECMPHDRX, T30_ERR_GOTDCSRX, T30_ERR_INVALCMDRX, T30_ERR_NOCARRIERRX, T30_ERR_NOEOLRX, T30_ERR_NOFAXRX, T30_ERR_NXTCMDRX, T30_ERR_T2EXPDCNRX, T30_ERR_T2EXPDRX, T30_ERR_T2EXPFAXRX, T30_ERR_T2EXPMPSRX, T30_ERR_T2EXPRRRX, T30_ERR_T2EXPRX, T30_ERR_DCNWHYRX, T30_ERR_DCNDATARX, T30_ERR_DCNFAXRX, T30_ERR_DCNPHDRX, T30_ERR_DCNRRDRX, T30_ERR_DCNNORTNRX, T30_ERR_BADPAGE, T30_ERR_BADTAG, T30_ERR_BADTIFFHDR, T30_ERR_BADPARM, T30_ERR_BADSTATE, T30_ERR_CMDDATA, T30_ERR_DISCONNECT, T30_ERR_INVALARG, T30_ERR_INVALFUNC, T30_ERR_NODATA, T30_ERR_NOMEM, T30_ERR_NOPOLL, T30_ERR_NOSTATE, T30_ERR_RETRYDCN, T30_ERR_CALLDROPPED } |
enum | { T30_MODEM_NONE = 0, T30_MODEM_PAUSE, T30_MODEM_CED, T30_MODEM_CNG, T30_MODEM_V21, T30_MODEM_V27TER_2400, T30_MODEM_V27TER_4800, T30_MODEM_V29_7200, T30_MODEM_V29_9600, T30_MODEM_V17_7200, T30_MODEM_V17_9600, T30_MODEM_V17_12000, T30_MODEM_V17_14400, T30_MODEM_DONE } |
enum | { T30_SUPPORT_V27TER = 0x01, T30_SUPPORT_V29 = 0x02, T30_SUPPORT_V17 = 0x04, T30_SUPPORT_V34 = 0x08, T30_SUPPORT_IAF = 0x10 } |
enum | { T30_SUPPORT_NO_COMPRESSION = 0x01, T30_SUPPORT_T4_1D_COMPRESSION = 0x02, T30_SUPPORT_T4_2D_COMPRESSION = 0x04, T30_SUPPORT_T6_COMPRESSION = 0x08, T30_SUPPORT_T85_COMPRESSION = 0x10, T30_SUPPORT_T43_COMPRESSION = 0x20, T30_SUPPORT_T45_COMPRESSION = 0x40 } |
enum | { T30_SUPPORT_STANDARD_RESOLUTION = 0x01, T30_SUPPORT_FINE_RESOLUTION = 0x02, T30_SUPPORT_SUPERFINE_RESOLUTION = 0x04, T30_SUPPORT_R4_RESOLUTION = 0x10000, T30_SUPPORT_R8_RESOLUTION = 0x20000, T30_SUPPORT_R16_RESOLUTION = 0x40000, T30_SUPPORT_300_300_RESOLUTION = 0x100000, T30_SUPPORT_400_400_RESOLUTION = 0x200000, T30_SUPPORT_600_600_RESOLUTION = 0x400000, T30_SUPPORT_1200_1200_RESOLUTION = 0x800000, T30_SUPPORT_300_600_RESOLUTION = 0x1000000, T30_SUPPORT_400_800_RESOLUTION = 0x2000000, T30_SUPPORT_600_1200_RESOLUTION = 0x4000000 } |
enum | { T30_SUPPORT_215MM_WIDTH = 0x01, T30_SUPPORT_255MM_WIDTH = 0x02, T30_SUPPORT_303MM_WIDTH = 0x04, T30_SUPPORT_UNLIMITED_LENGTH = 0x10000, T30_SUPPORT_A4_LENGTH = 0x20000, T30_SUPPORT_B4_LENGTH = 0x40000, T30_SUPPORT_US_LETTER_LENGTH = 0x80000, T30_SUPPORT_US_LEGAL_LENGTH = 0x100000 } |
enum | { T30_SUPPORT_SEP = 0x01, T30_SUPPORT_PSA = 0x02 } |
enum | { T30_IAF_MODE_T37 = 0x01, T30_IAF_MODE_T38 = 0x02, T30_IAF_MODE_FLOW_CONTROL = 0x04, T30_IAF_MODE_CONTINUOUS_FLOW = 0x08, T30_IAF_MODE_NO_TCF = 0x10, T30_IAF_MODE_NO_FILL_BITS = 0x20, T30_IAF_MODE_NO_INDICATORS = 0x40 } |
Functions | |
int | t30_init (t30_state_t *s, int calling_party, t30_set_handler_t *set_rx_type_handler, void *set_rx_type_user_data, t30_set_handler_t *set_tx_type_handler, void *set_tx_type_user_data, t30_send_hdlc_handler_t *send_hdlc_handler, void *send_hdlc_user_data) |
Initialise a T.30 context. | |
void | t30_release (t30_state_t *s) |
Release a T.30 context. | |
int | t30_restart (t30_state_t *s) |
Restart a T.30 context. | |
t30_state_t * | t30_create (int calling_party, t30_set_handler_t *set_rx_type_handler, void *set_rx_type_user_data, t30_set_handler_t *set_tx_type_handler, void *set_tx_type_user_data, t30_send_hdlc_handler_t *send_hdlc_handler, void *send_hdlc_user_data) |
Create and initialise a T.30 context. | |
void | t30_free (t30_state_t *s) |
Free a T.30 context. | |
void | t30_terminate (t30_state_t *s) |
Cleanup a T.30 context if the call terminates. | |
const char * | t30_frametype (uint8_t x) |
Return a text name for a T.30 frame type. | |
void | t30_decode_dis_dtc_dcs (t30_state_t *s, const uint8_t *dis, int len) |
Decode a DIS, DTC or DCS frame, and log the contents. | |
const char * | t30_completion_code_to_str (int result) |
Convert a phase E completion code to a short text description. | |
void | t30_set_iaf_mode (t30_state_t *s, int iaf) |
Set Internet aware FAX (IAF) mode. | |
int | t30_set_local_sub_address (t30_state_t *s, const char *sub_address) |
Set the sub-address associated with a T.30 context. | |
int | t30_set_header_info (t30_state_t *s, const char *info) |
Set the header information associated with a T.30 context. | |
int | t30_set_local_ident (t30_state_t *s, const char *id) |
Set the local identifier associated with a T.30 context. | |
int | t30_set_local_nsf (t30_state_t *s, const uint8_t *nsf, int len) |
size_t | t30_get_sub_address (t30_state_t *s, char *sub_address) |
Get the sub-address associated with a T.30 context. | |
size_t | t30_get_header_info (t30_state_t *s, char *info) |
Get the header information associated with a T.30 context. | |
size_t | t30_get_local_ident (t30_state_t *s, char *id) |
Get the local identifier associated with a T.30 context. | |
size_t | t30_get_far_ident (t30_state_t *s, char *id) |
Get the remote identifier associated with a T.30 context. | |
const char * | t30_get_far_country (t30_state_t *s) |
Get the country of origin of the remote FAX machine associated with a T.30 context. | |
const char * | t30_get_far_vendor (t30_state_t *s) |
Get the name of the vendor of the remote FAX machine associated with a T.30 context. | |
const char * | t30_get_far_model (t30_state_t *s) |
Get the name of the model of the remote FAX machine associated with a T.30 context. | |
void | t30_get_transfer_statistics (t30_state_t *s, t30_stats_t *t) |
Get the current transfer statistics. | |
void | t30_set_phase_b_handler (t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data) |
Set a callback function for T.30 phase B handling. | |
void | t30_set_phase_d_handler (t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data) |
Set a callback function for T.30 phase D handling. | |
void | t30_set_phase_e_handler (t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data) |
Set a callback function for T.30 phase E handling. | |
void | t30_set_document_handler (t30_state_t *s, t30_document_handler_t *handler, void *user_data) |
Set a callback function for T.30 end of document handling. | |
void | t30_set_rx_file (t30_state_t *s, const char *file, int stop_page) |
Set next receive file name. | |
void | t30_set_tx_file (t30_state_t *s, const char *file, int start_page, int stop_page) |
Set next transmit file name. | |
void | t30_set_supported_modems (t30_state_t *s, int supported_modems) |
Specify supported modems. | |
void | t30_set_supported_compressions (t30_state_t *s, int supported_compressions) |
Specify supported compression types. | |
void | t30_set_supported_resolutions (t30_state_t *s, int supported_resolutions) |
Specify supported resolutions. | |
void | t30_set_supported_image_sizes (t30_state_t *s, int supported_image_sizes) |
Specify supported image sizes. | |
void | t30_set_ecm_capability (t30_state_t *s, int enabled) |
Select ECM capability. | |
void | t30_local_interrupt_request (t30_state_t *s, int state) |
Request a local interrupt of FAX exchange. | |
void | t30_send_complete (void *user_data) |
Inform the T.30 engine the current transmission has completed. | |
void | t30_receive_complete (void *user_data) |
Inform the T.30 engine the current receive has completed. | |
int | t30_non_ecm_get_bit (void *user_data) |
Get a bit of received non-ECM image data. | |
int | t30_non_ecm_get_byte (void *user_data) |
Get a byte of received non-ECM image data. | |
int | t30_non_ecm_get_chunk (void *user_data, uint8_t buf[], int max_len) |
Get a bit of received non-ECM image data. | |
void | t30_non_ecm_put_bit (void *user_data, int bit) |
Process a bit of received non-ECM image data. | |
void | t30_non_ecm_put_byte (void *user_data, int byte) |
Process a byte of received non-ECM image data. | |
void | t30_non_ecm_put_chunk (void *user_data, const uint8_t buf[], int len) |
Process a chunk of received non-ECM image data. | |
void | t30_hdlc_accept (void *user_data, int ok, const uint8_t *msg, int len) |
Process a received HDLC frame. | |
void | t30_timer_update (t30_state_t *s, int samples) |
Report the passage of time to the T.30 engine. |
|
T.30 document handler. T.30 document handler.
|
|
T.30 phase B callback handler. T.30 phase B callback handler.
|
|
T.30 phase D callback handler. T.30 phase D callback handler.
|
|
T.30 phase E callback handler. T.30 phase E callback handler.
|
|
T.30 send HDLC handler. T.30 send HDLC handler.
|
|
T.30 set a receive or transmit type handler. T.30 set a receive or transmit type handler.
|
|
|
I/O modes for the T.30 protocol. |
|
|
|
Convert a phase E completion code to a short text description. Convert a phase E completion code to a short text description.
|
|
Create and initialise a T.30 context. Create and initialise a T.30 context.
|
|
Decode a DIS, DTC or DCS frame, and log the contents. Decode a DIS, DTC or DCS frame, and log the contents.
|
|
Return a text name for a T.30 frame type. Return a text name for a T.30 frame type.
|
|
Free a T.30 context. Free a T.30 context.
|
|
Get the country of origin of the remote FAX machine associated with a T.30 context. Get the country of origin of the remote FAX machine associated with a T.30 context.
|
|
Get the remote identifier associated with a T.30 context. Get the remote FAX machine identifier associated with a T.30 context.
|
|
Get the name of the model of the remote FAX machine associated with a T.30 context. Get the name of the model of the remote FAX machine associated with a T.30 context.
|
|
Get the name of the vendor of the remote FAX machine associated with a T.30 context. Get the name of the vendor of the remote FAX machine associated with a T.30 context.
|
|
Get the header information associated with a T.30 context. Get the header information associated with a T.30 context.
|
|
Get the local identifier associated with a T.30 context. Get the local FAX machine identifier associated with a T.30 context.
|
|
Get the sub-address associated with a T.30 context. Get the sub-address associated with a T.30 context.
|
|
Get the current transfer statistics. Get the current transfer statistics for the file being sent or received.
|
|
Process a received HDLC frame. Process a received HDLC frame.
|
|
Initialise a T.30 context. Initialise a T.30 context.
|
|
Request a local interrupt of FAX exchange. Request a local interrupt of FAX exchange.
|
|
Get a bit of received non-ECM image data. Get a bit of received non-ECM image data.
|
|
Get a byte of received non-ECM image data. Get a byte of received non-ECM image data.
|
|
Get a bit of received non-ECM image data. Get a chunk of received non-ECM image data.
|
|
Process a bit of received non-ECM image data. Process a bit of received non-ECM image data.
|
|
Process a byte of received non-ECM image data. Process a byte of received non-ECM image data.
|
|
Process a chunk of received non-ECM image data. Process a chunk of received non-ECM image data.
|
|
Inform the T.30 engine the current receive has completed. Inform the T.30 engine the current receive has completed. This is only needed to report an unexpected end of the receive operation, as might happen with T.38 dying.
|
|
Release a T.30 context. Release a T.30 context.
|
|
Restart a T.30 context. Restart a T.30 context.
|
|
Inform the T.30 engine the current transmission has completed. Inform the T.30 engine the current transmission has completed.
|
|
Set a callback function for T.30 end of document handling. Set a callback function for T.30 end of document handling.
|
|
Select ECM capability. Specify if error correction mode (ECM) is allowed by a T.30 context.
|
|
Set the header information associated with a T.30 context. Set the header information associated with a T.30 context.
|
|
Set Internet aware FAX (IAF) mode. Set Internet aware FAX (IAF) mode.
|
|
Set the local identifier associated with a T.30 context. Set the local identifier associated with a T.30 context.
|
|
Set the sub-address associated with a T.30 context. Set the sub-address associated with a T.30 context.
|
|
Set a callback function for T.30 phase B handling. Set a callback function for T.30 phase B handling.
|
|
Set a callback function for T.30 phase D handling. Set a callback function for T.30 phase D handling.
|
|
Set a callback function for T.30 phase E handling. Set a callback function for T.30 phase E handling.
|
|
Set next receive file name. Specify the file name of the next TIFF file to be received by a T.30 context.
|
|
Specify supported compression types. Specify which compression types are supported by a T.30 context.
|
|
Specify supported image sizes. Specify which images sizes are supported by a T.30 context.
|
|
Specify supported modems. Specify which modem types are supported by a T.30 context.
|
|
Specify supported resolutions. Specify which resolutions are supported by a T.30 context.
|
|
Set next transmit file name. Specify the file name of the next TIFF file to be transmitted by a T.30 context.
|
|
Cleanup a T.30 context if the call terminates. Cleanup a T.30 context if the call terminates.
|
|
Report the passage of time to the T.30 engine. Report the passage of time to the T.30 engine.
|