Go to the documentation of this file.
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)
@ T30_ERR_RX_T2EXPMPS
Definition: t30.h:269
uint8_t * nsf
Non-standard facilities (NSF).
Definition: t30.h:488
@ T30_ERR_CANNOT_TRAIN
Definition: t30.h:239
@ T30_SUPPORT_POLLED_SUB_ADDRESSING
Definition: t30.h:431
@ T30_ERR_UNEXPECTED
Definition: t30.h:246
@ T30_SUPPORT_MULTIPLE_SELECTIVE_POLLING
Definition: t30.h:433
@ T30_ERR_TX_BADPG
Definition: t30.h:250
int calling_party
True if behaving as the calling party.
Definition: private/t30.h:47
@ T30_SUPPORT_T88_COMPRESSION
Definition: t30.h:376
@ T30_ERR_RX_NOFAX
Definition: t30.h:265
void t30_remote_interrupts_allowed(t30_state_t *s, int state)
Allow remote interrupts of FAX exchange.
Definition: t30.c:6281
@ T30_ERR_RX_T2EXPRR
Definition: t30.h:270
int bit_rate
The current bit rate for image transfer.
Definition: t30.h:521
@ T30_SUPPORT_CALLED_SUBSCRIBER_INTERNET_ADDRESS
Definition: t30.h:445
int rtn_events
The number of RTN events.
Definition: private/t30.h:303
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
@ T30_ERR_NOSIZESUPPORT
Definition: t30.h:245
@ T30_ERR_RETRYDCN
Definition: t30.h:289
@ T30_SUPPORT_FIELD_NOT_VALID
Definition: t30.h:447
@ T30_ERR_CEDTONE
Definition: t30.h:234
@ T30_SUPPORT_T85_L0_COMPRESSION
Definition: t30.h:366
@ T30_SUPPORT_T6_COMPRESSION
Definition: t30.h:362
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,...
Definition: t30.c:5833
int t30_call_active(t30_state_t *s)
Check if a T.30 call is still active.
Definition: t30.c:6385
@ T30_FRONT_END_RECEIVE_COMPLETE
Definition: t30.h:332
@ T30_SUPPORT_V34HDX
Definition: t30.h:348
@ T30_SUPPORT_T43_COMPRESSION
Definition: t30.h:368
@ T30_SUPPORT_600_1200_RESOLUTION
Definition: t30.h:408
@ T30_SUPPORT_300_300_RESOLUTION
Definition: t30.h:396
@ T30_ERR_RX_DCNNORTN
Definition: t30.h:277
@ T30_ERR_CIA_UNACCEPTABLE
Definition: t30.h:302
@ T30_ERR_RX_GOTDCS
Definition: t30.h:261
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: t30.h:547
int x_resolution
The horizontal column-to-column resolution of the most recent page, in pixels per metre.
Definition: t30.h:531
@ T30_ERR_RX_DCNRRD
Definition: t30.h:276
@ T30_ERR_TX_PHDDEAD
Definition: t30.h:256
@ T30_ERR_TSA_UNACCEPTABLE
Definition: t30.h:300
void * set_rx_type_user_data
An opaque pointer passed to the handler for changes to the receive mode.
Definition: private/t30.h:125
@ T30_ERR_TX_ECMPHD
Definition: t30.h:251
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
@ T30_SUPPORT_CALLING_SUBSCRIBER_INTERNET_ADDRESS
Definition: t30.h:441
@ T30_SUPPORT_COMMAND_REPEAT
Definition: t30.h:449
int t30_release(t30_state_t *s)
Release a T.30 context.
Definition: t30.c:6368
int cia_type
Calling subscriber internet address (CIA).
Definition: t30.h:505
@ T30_ERR_CSA_UNACCEPTABLE
Definition: t30.h:304
@ T30_IAF_MODE_CONTINUOUS_FLOW
Definition: t30.h:459
@ T30_ERR_TX_GOTDCN
Definition: t30.h:252
t30_send_hdlc_handler_t * send_hdlc_handler
The transmitted HDLC frame handler.
Definition: private/t30.h:132
@ T30_SUPPORT_TRANSMITTING_SUBSCRIBER_INTERNET_ADDRESS
Definition: t30.h:437
@ T30_ERR_BADTAG
Definition: t30.h:284
int short_train
True if the short training sequence should be used.
Definition: private/t30.h:166
int y_resolution
The vertical row-to-row resolution of the most recent page, in pixels per metre.
Definition: t30.h:533
@ T30_SUPPORT_INTERNET_ROUTING_ADDRESS
Definition: t30.h:439
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
@ T30_ERR_NOMEM
Definition: t30.h:286
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
int() t30_document_handler_t(t30_state_t *s, void *user_data, int status)
T.30 document handler.
Definition: t30.h:204
@ T30_IAF_MODE_NO_TCF
Definition: t30.h:462
@ T30_SUPPORT_SUB_ADDRESSING
Definition: t30.h:435
@ T30_SUPPORT_SELECTIVE_POLLING
Definition: t30.h:429
int encoding
The type of compression used between the FAX machines.
Definition: t30.h:541
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 t30_free(t30_state_t *s)
Free a T.30 context.
Definition: t30.c:6377
int csa_type
Called subscriber internet address (CSA).
Definition: t30.h:513
@ T30_ERR_RX_T2EXPD
Definition: t30.h:267
@ T30_SUPPORT_SYCC_T81_COMPRESSION
Definition: t30.h:374
@ T30_ERR_RX_INCAPABLE
Definition: t30.h:242
@ T30_ERR_TX_NODIS
Definition: t30.h:254
@ T30_ERR_INCOMPATIBLE
Definition: t30.h:241
int error_correcting_mode
TRUE if error correcting mode is used.
Definition: t30.h:523
@ T30_ERR_RX_DCNWHY
Definition: t30.h:272
@ T30_IAF_MODE_RELAXED_TIMERS
Definition: t30.h:470
@ T30_SUPPORT_600_600_RESOLUTION
Definition: t30.h:400
@ T30_SUPPORT_300_600_RESOLUTION
Definition: t30.h:404
int t30_non_ecm_get_byte(void *user_data)
Get a byte of received non-ECM image data.
Definition: t30.c:5573
@ T30_ERR_ISP_UNACCEPTABLE
Definition: t30.h:303
@ T30_SUPPORT_IAF
Definition: t30.h:350
int pages_in_file
The number of pages in the file (<0 if not known).
Definition: t30.h:529
@ T30_SUPPORT_T4_2D_COMPRESSION
Definition: t30.h:360
@ T30_ERR_BADTIFFHDR
Definition: t30.h:285
@ T30_SUPPORT_V29
Definition: t30.h:344
@ T30_SUPPORT_INTERNET_SELECTIVE_POLLING_ADDRESS
Definition: t30.h:443
@ T30_SUPPORT_400_400_RESOLUTION
Definition: t30.h:398
@ T30_SUPPORT_T81_COMPRESSION
Definition: t30.h:372
uint8_t * nss
Non-standard facilities set-up (NSS).
Definition: t30.h:494
@ T30_ERR_OPER_INT_FAIL
Definition: t30.h:240
@ T30_ERR_TX_T5EXP
Definition: t30.h:257
@ T30_ERR_RX_DCNPHD
Definition: t30.h:275
@ T30_ERR_RX_NOEOL
Definition: t30.h:264
int image_size
The size of the image, in bytes.
Definition: t30.h:539
@ T30_SUPPORT_V27TER
Definition: t30.h:342
@ T30_SUPPORT_R8_RESOLUTION
Definition: t30.h:391
@ T30_ERR_RX_DCNDATA
Definition: t30.h:273
@ T30_ERR_SEP_UNACCEPTABLE
Definition: t30.h:296
@ T30_ERR_T3_EXPIRED
Definition: t30.h:237
@ T30_SUPPORT_NO_COMPRESSION
Definition: t30.h:356
int state
The current state of the T.30 state machine.
Definition: private/t30.h:146
@ T30_ERR_SID_UNACCEPTABLE
Definition: t30.h:298
@ T30_ERR_CALLDROPPED
Definition: t30.h:290
@ T30_SUPPORT_R16_RESOLUTION
Definition: t30.h:393
void t30_terminate(t30_state_t *s)
Cleanup a T.30 context if the call terminates.
Definition: t30.c:6196
@ T30_ERR_SUB_UNACCEPTABLE
Definition: t30.h:295
@ T30_ERR_T1_EXPIRED
Definition: t30.h:236
void() t30_send_hdlc_handler_t(void *user_data, const uint8_t msg[], int len)
T.30 send HDLC handler.
Definition: t30.h:224
@ T30_SUPPORT_FINE_RESOLUTION
Definition: t30.h:384
@ T30_ERR_RX_NOCARRIER
Definition: t30.h:263
void * send_hdlc_user_data
An opaque pointer passed to the transmitted HDLC frame handler.
Definition: private/t30.h:134
void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
Get the current transfer statistics.
Definition: t30.c:6229
@ T30_ERR_FILEERROR
Definition: t30.h:280
@ T30_SUPPORT_T45_COMPRESSION
Definition: t30.h:370
#define T30_MAX_IDENT_LEN
Definition: t30.h:144
@ T30_ERR_HDLC_CARRIER
Definition: t30.h:238
@ T30_ERR_RX_T2EXP
Definition: t30.h:271
@ T30_ERR_PSA_UNACCEPTABLE
Definition: t30.h:297
@ T30_SUPPORT_1200_1200_RESOLUTION
Definition: t30.h:402
SPAN_DECLARE_NONSTD(int) t30_non_ecm_get_bit(void *user_data)
Get a bit of received non-ECM image data.
@ T30_IAF_MODE_NO_INDICATORS
Definition: t30.h:467
Definition: private/t30.h:35
int ira_type
Internet routing address (IRA).
Definition: t30.h:501
@ T30_ERR_RX_DCNFAX
Definition: t30.h:274
@ T30_ERR_TX_INVALRSP
Definition: t30.h:253
int width
The number of horizontal pixels in the most recent page.
Definition: t30.h:535
@ T30_ERR_RX_T2EXPDCN
Definition: t30.h:266
int rtp_events
The number of RTP events.
Definition: private/t30.h:301
int length
The number of vertical pixels in the most recent page.
Definition: t30.h:537
int current_status
Current status.
Definition: t30.h:549
void t30_non_ecm_put_byte(void *user_data, int byte)
Process a byte of received non-ECM image data.
Definition: t30.c:5457
@ T30_ERR_NORESSUPPORT
Definition: t30.h:244
@ T30_ERR_BADTIFF
Definition: t30.h:282
@ T30_ERR_RX_T2EXPFAX
Definition: t30.h:268
@ T30_SUPPORT_SUPERFINE_RESOLUTION
Definition: t30.h:386
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t30.h:543
int pages_rx
The number of pages received so far.
Definition: t30.h:527
t30_set_handler_t * set_tx_type_handler
The handler for changes to the transmit mode.
Definition: private/t30.h:127
t30_set_handler_t * set_rx_type_handler
The handler for changes to the receive mode.
Definition: private/t30.h:123
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
@ T30_ERR_IRA_UNACCEPTABLE
Definition: t30.h:301
@ T30_SUPPORT_T4_1D_COMPRESSION
Definition: t30.h:358
void * set_tx_type_user_data
An opaque pointer passed to the handler for changes to the transmit mode.
Definition: private/t30.h:129
@ T30_SUPPORT_STANDARD_RESOLUTION
Definition: t30.h:382
int pages_tx
The number of pages sent so far.
Definition: t30.h:525
@ T30_SUPPORT_IDENTIFICATION
Definition: t30.h:427
@ T30_ERR_IDENT_UNACCEPTABLE
Definition: t30.h:294
@ T30_ERR_TX_PHBDEAD
Definition: t30.h:255
@ T30_ERR_PWD_UNACCEPTABLE
Definition: t30.h:299
int isp_type
Internet selective polling address (ISP).
Definition: t30.h:509
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 t30_restart(t30_state_t *s)
Restart a T.30 context.
Definition: t30.c:6287
@ T30_SUPPORT_V17
Definition: t30.h:346
@ T30_ERR_NOPAGE
Definition: t30.h:281
int longest_bad_row_run
The largest number of bad pixel rows in a block in the most recent page.
Definition: t30.h:545
@ T30_SUPPORT_400_800_RESOLUTION
Definition: t30.h:406
int tsa_type
Transmitting subscriber internet address (TSA).
Definition: t30.h:497
@ T30_IAF_MODE_NO_FILL_BITS
Definition: t30.h:465
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
@ T30_ERR_RX_INVALCMD
Definition: t30.h:262
@ T30_ERR_TX_INCAPABLE
Definition: t30.h:243
@ T30_SUPPORT_T85_COMPRESSION
Definition: t30.h:364
@ T30_SUPPORT_R4_RESOLUTION
Definition: t30.h:389
@ T30_ERR_BADPAGE
Definition: t30.h:283
@ T30_ERR_RX_ECMPHD
Definition: t30.h:260
@ T30_ERR_T0_EXPIRED
Definition: t30.h:235
void t30_local_interrupt_request(t30_state_t *s, int state)
Request a local interrupt of FAX exchange.
Definition: t30.c:6269
@ T30_ERR_NOPOLL
Definition: t30.h:293
uint8_t * nsc
Non-standard facilities command (NSC).
Definition: t30.h:491
@ T30_ERR_TX_BADDCS
Definition: t30.h:249
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