?? t30.h
字號:
};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, /* Monochrome JBIG */ T30_SUPPORT_T43_COMPRESSION = 0x20, /* Colour JBIG */ T30_SUPPORT_T45_COMPRESSION = 0x40 /* Run length colour compression */};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, /*! Continuous flow mode means data is sent as fast as possible, usually across the Internet, where speed is not constrained by a PSTN modem. */ T30_IAF_MODE_CONTINUOUS_FLOW = 0x08, /*! No TCF means TCF is not exchanged. The end points must sort out usable speed issues locally. */ T30_IAF_MODE_NO_TCF = 0x10, /*! No fill bits means do not insert fill bits, even if the T.30 messages request them. */ T30_IAF_MODE_NO_FILL_BITS = 0x20, /*! No indicators means do not send indicator messages when using T.38. */ T30_IAF_MODE_NO_INDICATORS = 0x40};/*! T.30 FAX channel descriptor. This defines the state of a single working instance of a T.30 FAX channel.*/struct t30_state_s{ /* This must be kept the first thing in the structure, so it can be pointed to reliably as the structures change over time. */ t4_state_t t4; /*! \brief TRUE is behaving as the calling party */ int calling_party; /*! \brief The local identifier string. */ char local_ident[T30_MAX_IDENT_LEN]; /*! \brief The identifier string supplied by the remote FAX machine. */ char far_ident[T30_MAX_IDENT_LEN]; /*! \brief The sub-address string to be sent to the remote FAX machine. */ char local_sub_address[T30_MAX_IDENT_LEN]; /*! \brief The sub-address string supplied by the remote FAX machine. */ char far_sub_address[T30_MAX_IDENT_LEN]; /*! \brief The selective polling sub-address supplied by the remote FAX machine. */ char sep_address[T30_MAX_IDENT_LEN]; /*! \brief The polled sub-address supplied by the remote FAX machine. */ char psa_address[T30_MAX_IDENT_LEN]; /*! \brief A password to be associated with the T.30 context. */ char local_password[T30_MAX_IDENT_LEN]; /*! \brief A password expected from the far end. */ char far_password[T30_MAX_IDENT_LEN]; /*! \brief The text which will be used in FAX page header. No text results in no header line. */ char header_info[50 + 1]; /*! \brief The country of origin of the remote machine, if known, else NULL. */ const char *country; /*! \brief The vendor of the remote machine, if known, else NULL. */ const char *vendor; /*! \brief The model of the remote machine, if known, else NULL. */ const char *model; uint8_t local_nsf[T30_MAX_LOCAL_NSF_LEN]; int local_nsf_len; /*! \brief A pointer to a callback routine to be called when phase B events occur. */ t30_phase_b_handler_t *phase_b_handler; /*! \brief An opaque pointer supplied in event B callbacks. */ void *phase_b_user_data; /*! \brief A pointer to a callback routine to be called when phase D events occur. */ t30_phase_d_handler_t *phase_d_handler; /*! \brief An opaque pointer supplied in event D callbacks. */ void *phase_d_user_data; /*! \brief A pointer to a callback routine to be called when phase E events occur. */ t30_phase_e_handler_t *phase_e_handler; /*! \brief An opaque pointer supplied in event E callbacks. */ void *phase_e_user_data; /*! \brief A pointer to a callback routine to be called when document events (e.g. end of transmitted document) occur. */ t30_document_handler_t *document_handler; /*! \brief An opaque pointer supplied in document callbacks. */ void *document_user_data; 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; int phase; int next_phase; int state; int step; uint8_t dcs_frame[T30_MAX_DIS_DTC_DCS_LEN]; int dcs_len; uint8_t dis_dtc_frame[T30_MAX_DIS_DTC_DCS_LEN]; int dis_dtc_len; /*! \brief TRUE if a valid DIS has been received from the far end. */ int dis_received; /*! \brief TRUE if a valid passwrod has been received from the far end. */ int far_password_ok; /*! \brief A flag to indicate a message is in progress. */ int in_message; /*! \brief TRUE if the short training sequence should be used. */ int short_train; /*! \brief A count of the number of bits in the trainability test. */ int training_test_bits; int training_current_zeros; int training_most_zeros; /*! \brief The current fallback step for the fast message transfer modem. */ int current_fallback; /*! \brief The subset of supported modems allowed at the current time, allowing for negotiation. */ int current_permitted_modems; /*! \brief TRUE if a carrier is present. Otherwise FALSE. */ int rx_signal_present; /*! \brief TRUE if a modem has trained correctly. */ int rx_trained; int current_rx_type; int current_tx_type; /*! \brief T0 is the answer timeout when calling another FAX machine. Placing calls is handled outside the FAX processing, but this timeout keeps running until V.21 modulation is sent or received. T1 is the remote terminal identification timeout (in audio samples). */ int timer_t0_t1; /*! \brief T2 is the HDLC command timeout. T4 is the HDLC response timeout (in audio samples). */ int timer_t2_t4; /*! \brief TRUE if the T2/T4 timer is actually timing T4 */ int timer_is_t4; /*! \brief Procedural interrupt timeout (in audio samples). */ int timer_t3; /*! \brief This is only used in error correcting mode. */ int timer_t5; /*! \brief This is only used in full duplex (e.g. ISDN) modes. */ int timer_t6; /*! \brief This is only used in full duplex (e.g. ISDN) modes. */ int timer_t7; /*! \brief This is only used in full duplex (e.g. ISDN) modes. */ int timer_t8; int far_end_detected; int local_interrupt_pending; int crp_enabled; int line_encoding; uint8_t min_scan_time_code; int x_resolution; int y_resolution; int image_width; int retries; /*! \brief TRUE if error correcting mode is used. */ int error_correcting_mode; int ppr_count; int receiver_not_ready_count; int octets_per_ecm_frame; uint8_t ecm_data[256][260]; int16_t ecm_len[256]; uint8_t ecm_frame_map[3 + 32]; /*! \brief The current page number in ECM mode */ int ecm_page; /*! \brief The current block number in ECM mode */ int ecm_block; /*! \brief The number of frames in the current block number in ECM mode */ int ecm_frames; /*! \brief The number of frames in the current burst of image transmission in ECM mode */ int ecm_frames_this_burst; int ecm_current_frame; int ecm_at_page_end; int next_tx_step; int next_rx_step; char rx_file[256]; int rx_stop_page; char tx_file[256]; int tx_start_page; int tx_stop_page; int current_status; int iaf; int supported_modems; int supported_compressions; int supported_resolutions; int supported_image_sizes; int supported_polling_features; int ecm_allowed; int last_pps_fcf2; int ecm_first_bad_frame; /*! \brief Error and flow logging control */ logging_state_t logging;};typedef struct{ /*! \brief The current bit rate for image transfer. */ int bit_rate; /*! \brief TRUE if error correcting mode is used. */ int error_correcting_mode; /*! \brief The number of pages transferred so far. */ int pages_transferred; /*! \brief The number of pages in the file (<0 if not known). */ int pages_in_file; /*! \brief The number of horizontal pixels in the most recent page. */ int width; /*! \brief The number of vertical pixels in the most recent page. */ int length; /*! \brief The number of bad pixel rows in the most recent page. */ int bad_rows; /*! \brief The largest number of bad pixel rows in a block in the most recent page. */ int longest_bad_row_run; /*! \brief The horizontal column-to-column resolution of the page in pixels per metre */ int x_resolution; /*! \brief The vertical row-to-row resolution of the page in pixels per metre */ int y_resolution; /*! \brief The type of compression used between the FAX machines */ int encoding; /*! \brief The size of the image, in bytes */ int image_size; /*! \brief Current status */ int current_status;} t30_stats_t;#if defined(__cplusplus)extern "C"{#endif/*! Initialise a T.30 context. \brief Initialise a T.30 context. \param s The T.30 context. \param calling_party TRUE if the context is for a calling party. FALSE if the context is for an answering party. \return 0 for OK, else -1. */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,
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -