28 #if !defined(_SPANDSP_T30_H_) 29 #define _SPANDSP_T30_H_ 142 #define T30_MAX_DIS_DTC_DCS_LEN 22 144 #define T30_MAX_IDENT_LEN 20 146 #define T30_MAX_PAGE_HEADER_INFO 50 328 T30_FRONT_END_SEND_STEP_COMPLETE = 0,
333 T30_FRONT_END_SIGNAL_PRESENT,
334 T30_FRONT_END_SIGNAL_ABSENT,
335 T30_FRONT_END_CED_PRESENT,
336 T30_FRONT_END_CNG_PRESENT
413 T30_SUPPORT_215MM_WIDTH = 0x01,
414 T30_SUPPORT_255MM_WIDTH = 0x02,
415 T30_SUPPORT_303MM_WIDTH = 0x04,
417 T30_SUPPORT_UNLIMITED_LENGTH = 0x10000,
418 T30_SUPPORT_A4_LENGTH = 0x20000,
419 T30_SUPPORT_B4_LENGTH = 0x40000,
420 T30_SUPPORT_US_LETTER_LENGTH = 0x80000,
421 T30_SUPPORT_US_LEGAL_LENGTH = 0x100000
454 T30_IAF_MODE_T37 = 0x01,
455 T30_IAF_MODE_T38 = 0x02,
456 T30_IAF_MODE_FLOW_CONTROL = 0x04,
558 #if defined(__cplusplus) 665 SPAN_DECLARE_NONSTD(
void) t30_hdlc_accept(
void *user_data,
const uint8_t msg[],
int len,
int ok);
691 #if defined(__cplusplus)
int pages_rx
The number of pages received so far.
Definition: t30.h:527
void() t30_real_time_frame_handler_t(t30_state_t *s, void *user_data, int direction, const uint8_t msg[], int len)
T.30 real time frame handler.
Definition: t30.h:191
#define T30_MAX_IDENT_LEN
Definition: t30.h:144
int t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len)
Get a bit of received non-ECM image data.
Definition: t30.c:5608
void * send_hdlc_user_data
An opaque pointer passed to the transmitted HDLC frame handler.
Definition: private/t30.h:134
int() t30_document_handler_t(t30_state_t *s, void *user_data, int status)
T.30 document handler.
Definition: t30.h:204
int cia_type
Calling subscriber internet address (CIA).
Definition: t30.h:505
int image_size
The size of the image, in bytes.
Definition: t30.h:539
int calling_party
True if behaving as the calling party.
Definition: private/t30.h:47
int tsa_type
Transmitting subscriber internet address (TSA).
Definition: t30.h:497
Definition: private/t30.h:35
int bit_rate
The current bit rate for image transfer.
Definition: t30.h:521
uint8_t * nsc
Non-standard facilities command (NSC).
Definition: t30.h:491
int x_resolution
The horizontal column-to-column resolution of the most recent page, in pixels per metre...
Definition: t30.h:531
SPAN_DECLARE_NONSTD(int) t30_non_ecm_get_bit(void *user_data)
Get a bit of received non-ECM image data.
int rtp_events
The number of RTP events.
Definition: private/t30.h:301
int csa_type
Called subscriber internet address (CSA).
Definition: t30.h:513
int encoding
The type of compression used between the FAX machines.
Definition: t30.h:541
t30_state_t * 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.
Definition: t30.c:6327
int isp_type
Internet selective polling address (ISP).
Definition: t30.h:509
void t30_front_end_status(void *user_data, int status)
Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.).
Definition: t30.c:5833
int short_train
True if the short training sequence should be used.
Definition: private/t30.h:166
void t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len)
Process a chunk of received non-ECM image data.
Definition: t30.c:5498
int() t30_phase_b_handler_t(t30_state_t *s, void *user_data, int result)
T.30 phase B callback handler.
Definition: t30.h:161
int t30_non_ecm_get_byte(void *user_data)
Get a byte of received non-ECM image data.
Definition: t30.c:5573
void() t30_phase_e_handler_t(t30_state_t *s, void *user_data, int completion_code)
T.30 phase E callback handler.
Definition: t30.h:180
int t30_restart(t30_state_t *s)
Restart a T.30 context.
Definition: t30.c:6287
int ira_type
Internet routing address (IRA).
Definition: t30.h:501
t30_set_handler_t * set_tx_type_handler
The handler for changes to the transmit mode.
Definition: private/t30.h:127
int() t30_phase_d_handler_t(t30_state_t *s, void *user_data, int result)
T.30 phase D callback handler.
Definition: t30.h:171
void t30_timer_update(t30_state_t *s, int samples)
Report the passage of time to the T.30 engine.
Definition: t30.c:6127
int rtn_events
The number of RTN events.
Definition: private/t30.h:303
int t30_call_active(t30_state_t *s)
Check if a T.30 call is still active.
Definition: t30.c:6385
int t30_release(t30_state_t *s)
Release a T.30 context.
Definition: t30.c:6368
int longest_bad_row_run
The largest number of bad pixel rows in a block in the most recent page.
Definition: t30.h:545
void * set_rx_type_user_data
An opaque pointer passed to the handler for changes to the receive mode.
Definition: private/t30.h:125
uint8_t * nsf
Non-standard facilities (NSF).
Definition: t30.h:488
int current_status
Current status.
Definition: t30.h:549
void t30_remote_interrupts_allowed(t30_state_t *s, int state)
Allow remote interrupts of FAX exchange.
Definition: t30.c:6281
int pages_in_file
The number of pages in the file (<0 if not known).
Definition: t30.h:529
void * set_tx_type_user_data
An opaque pointer passed to the handler for changes to the transmit mode.
Definition: private/t30.h:129
void t30_non_ecm_put_byte(void *user_data, int byte)
Process a byte of received non-ECM image data.
Definition: t30.c:5457
void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
Get the current transfer statistics.
Definition: t30.c:6229
void t30_local_interrupt_request(t30_state_t *s, int state)
Request a local interrupt of FAX exchange.
Definition: t30.c:6269
int t30_free(t30_state_t *s)
Free a T.30 context.
Definition: t30.c:6377
t30_send_hdlc_handler_t * send_hdlc_handler
The transmitted HDLC frame handler.
Definition: private/t30.h:132
t30_set_handler_t * set_rx_type_handler
The handler for changes to the receive mode.
Definition: private/t30.h:123
void() t30_send_hdlc_handler_t(void *user_data, const uint8_t msg[], int len)
T.30 send HDLC handler.
Definition: t30.h:224
int length
The number of vertical pixels in the most recent page.
Definition: t30.h:537
void t30_terminate(t30_state_t *s)
Cleanup a T.30 context if the call terminates.
Definition: t30.c:6196
int error_correcting_mode
TRUE if error correcting mode is used.
Definition: t30.h:523
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: t30.h:547
void() t30_set_handler_t(void *user_data, int type, int bit_rate, int short_train, int use_hdlc)
T.30 set a receive or transmit type handler.
Definition: t30.h:215
int width
The number of horizontal pixels in the most recent page.
Definition: t30.h:535
int y_resolution
The vertical row-to-row resolution of the most recent page, in pixels per metre.
Definition: t30.h:533
uint8_t * nss
Non-standard facilities set-up (NSS).
Definition: t30.h:494
int state
The current state of the T.30 state machine.
Definition: private/t30.h:146
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t30.h:543
int pages_tx
The number of pages sent so far.
Definition: t30.h:525