?? t30.h
字號:
void *set_tx_type_user_data, t30_send_hdlc_handler_t *send_hdlc_handler, void *send_hdlc_user_data);/*! Release a T.30 context. \brief Release a T.30 context. \param s The T.30 context. */void t30_release(t30_state_t *s);/*! Restart a T.30 context. \brief Restart a T.30 context. \param s The T.30 context. \return 0 for OK, else -1. */int t30_restart(t30_state_t *s);/*! Create and initialise a T.30 context. \brief Create and initialise a 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 A pointer to the FAX context, or NULL if one could not be created.*/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);/*! Free a T.30 context. \brief Free a T.30 context. \param s The T.30 context. */void t30_free(t30_state_t *s);/*! Cleanup a T.30 context if the call terminates. \brief Cleanup a T.30 context if the call terminates. \param s The T.30 context. */void t30_terminate(t30_state_t *s);/*! Return a text name for a T.30 frame type. \brief Return a text name for a T.30 frame type. \param x The frametype octet. \return A pointer to the text name for the frame type. If the frame type is not value, the string "???" is returned. */const char *t30_frametype(uint8_t x);/*! Decode a DIS, DTC or DCS frame, and log the contents. \brief Decode a DIS, DTC or DCS frame, and log the contents. \param s The T.30 context. \param dis A pointer to the frame to be decoded. \param len The length of the frame. */void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len);/*! Convert a phase E completion code to a short text description. \brief Convert a phase E completion code to a short text description. \param result The result code. \return A pointer to the description. */const char *t30_completion_code_to_str(int result);/*! Set Internet aware FAX (IAF) mode. \brief Set Internet aware FAX (IAF) mode. \param s The T.30 context. \param iaf TRUE for IAF, or FALSE for non-IAF. */void t30_set_iaf_mode(t30_state_t *s, int iaf);/*! Set the sub-address associated with a T.30 context. \brief Set the sub-address associated with a T.30 context. \param s The T.30 context. \param sub_address A pointer to the sub-address. \return 0 for OK, else -1. */int t30_set_local_sub_address(t30_state_t *s, const char *sub_address);/*! Set the header information associated with a T.30 context. \brief Set the header information associated with a T.30 context. \param s The T.30 context. \param info A pointer to the information string. \return 0 for OK, else -1. */int t30_set_header_info(t30_state_t *s, const char *info);/*! Set the local identifier associated with a T.30 context. \brief Set the local identifier associated with a T.30 context. \param s The T.30 context. \param id A pointer to the identifier. \return 0 for OK, else -1. */int t30_set_local_ident(t30_state_t *s, const char *id);int t30_set_local_nsf(t30_state_t *s, const uint8_t *nsf, int len);/*! Get the sub-address associated with a T.30 context. \brief Get the sub-address associated with a T.30 context. \param s The T.30 context. \param sub_address A pointer to a buffer for the sub-address. The buffer should be at least 21 bytes long. \return the length of the string. */size_t t30_get_sub_address(t30_state_t *s, char *sub_address);/*! Get the header information associated with a T.30 context. \brief Get the header information associated with a T.30 context. \param s The T.30 context. \param sub_address A pointer to a buffer for the header information. The buffer should be at least 51 bytes long. \return the length of the string. */size_t t30_get_header_info(t30_state_t *s, char *info);/*! Get the local FAX machine identifier associated with a T.30 context. \brief Get the local identifier associated with a T.30 context. \param s The T.30 context. \param id A pointer to a buffer for the identifier. The buffer should be at least 21 bytes long. \return the length of the string. */size_t t30_get_local_ident(t30_state_t *s, char *id);/*! Get the remote FAX machine identifier associated with a T.30 context. \brief Get the remote identifier associated with a T.30 context. \param s The T.30 context. \param id A pointer to a buffer for the identifier. The buffer should be at least 21 bytes long. \return the length of the string. */size_t t30_get_far_ident(t30_state_t *s, char *id);/*! Get the country of origin of the remote FAX machine associated with a T.30 context. \brief Get the country of origin of the remote FAX machine associated with a T.30 context. \param s The T.30 context. \return a pointer to the country name, or NULL if the country is not known. */const char *t30_get_far_country(t30_state_t *s);/*! Get the name of the vendor of the remote FAX machine associated with a T.30 context. \brief Get the name of the vendor of the remote FAX machine associated with a T.30 context. \param s The T.30 context. \return a pointer to the vendor name, or NULL if the vendor is not known. */const char *t30_get_far_vendor(t30_state_t *s);/*! Get the name of the model of the remote FAX machine associated with a T.30 context. \brief Get the name of the model of the remote FAX machine associated with a T.30 context. \param s The T.30 context. \return a pointer to the model name, or NULL if the model is not known. */const char *t30_get_far_model(t30_state_t *s);/*! Get the current transfer statistics for the file being sent or received. \brief Get the current transfer statistics. \param s The T.30 context. \param t A pointer to a buffer for the statistics. */void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t);/*! Set a callback function for T.30 phase B handling. \brief Set a callback function for T.30 phase B handling. \param s The T.30 context. \param handler The callback function \param user_data An opaque pointer passed to the callback function. */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 D handling. \brief Set a callback function for T.30 phase D handling. \param s The T.30 context. \param handler The callback function \param user_data An opaque pointer passed to the callback function. */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 E handling. \brief Set a callback function for T.30 phase E handling. \param s The T.30 context. \param handler The callback function \param user_data An opaque pointer passed to the callback function. */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 end of document handling. \brief Set a callback function for T.30 end of document handling. \param s The T.30 context. \param handler The callback function \param user_data An opaque pointer passed to the callback function. */void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data);/*! Specify the file name of the next TIFF file to be received by a T.30 context. \brief Set next receive file name. \param s The T.30 context. \param file The file name \param stop_page The maximum page to receive. -1 for no restriction. */void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page);/*! Specify the file name of the next TIFF file to be transmitted by a T.30 context. \brief Set next transmit file name. \param s The T.30 context. \param file The file name \param start_page The first page to send. -1 for no restriction. \param stop_page The last page to send. -1 for no restriction. */void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page);/*! Specify which modem types are supported by a T.30 context. \brief Specify supported modems. \param s The T.30 context. \param supported_modems Bit field list of the supported modems. */void t30_set_supported_modems(t30_state_t *s, int supported_modems);/*! Specify a period of responding with receiver not ready. \brief Specify a period of responding with receiver not ready. \param s The T.30 context. \param count The number of times to report receiver not ready. */void t30_set_receiver_not_ready(t30_state_t *s, int count);/*! Specify which compression types are supported by a T.30 context. \brief Specify supported compression types. \param s The T.30 context. \param supported_compressions Bit field list of the supported compression types. */void t30_set_supported_compressions(t30_state_t *s, int supported_compressions);/*! Specify which resolutions are supported by a T.30 context. \brief Specify supported resolutions. \param s The T.30 context. \param supported_compressions Bit field list of the supported resolutions. */void t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions);/*! Specify which images sizes are supported by a T.30 context. \brief Specify supported image sizes. \param s The T.30 context. \param supported_image_sizes Bit field list of the supported widths and lengths. */void t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes);/*! Specify if error correction mode (ECM) is allowed by a T.30 context. \brief Select ECM capability. \param s The T.30 context. \param enabled TRUE for ECM capable, FALSE for not ECM capable. */void t30_set_ecm_capability(t30_state_t *s, int enabled);/*! Request a local interrupt of FAX exchange. \brief Request a local interrupt of FAX exchange. \param s The T.30 context. \param state TRUE to enable interrupt request, else FALSE. */void t30_local_interrupt_request(t30_state_t *s, int state);/*! Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.). \brief Inform the T.30 engine of a status change in the front end (end of tx, rx signal change, etc.). \param user_data The T.30 context. \param status The type of status change which occured. */void t30_front_end_status(void *user_data, int status);/*! Get a bit of received non-ECM image data. \brief Get a bit of received non-ECM image data. \param user_data An opaque pointer, which must point to the T.30 context. \return The next bit to transmit. */int t30_non_ecm_get_bit(void *user_data);/*! Get a byte of received non-ECM image data. \brief Get a byte of received non-ECM image data. \param user_data An opaque pointer, which must point to the T.30 context. \return The next byte to transmit. */int t30_non_ecm_get_byte(void *user_data);/*! Get a chunk of received non-ECM image data. \brief Get a bit of received non-ECM image data. \param user_data An opaque pointer, which must point to the T.30 context. \param buf The buffer to contain the data. \param max_len The maximum length of the chunk. \return The actual length of the chunk. */int t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len);/*! Process a bit of received non-ECM image data. \brief Process a bit of received non-ECM image data \param user_data An opaque pointer, which must point to the T.30 context. \param bit The received bit. */void t30_non_ecm_put_bit(void *user_data, int bit);/*! Process a byte of received non-ECM image data. \brief Process a byte of received non-ECM image data \param user_data An opaque pointer, which must point to the T.30 context. \param byte The received byte. */void t30_non_ecm_put_byte(void *user_data, int byte);/*! Process a chunk of received non-ECM image data. \brief Process a chunk of received non-ECM image data \param user_data An opaque pointer, which must point to the T.30 context. \param buf The buffer containing the received data. \param len The length of the data in buf. */void t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len);/*! Process a received HDLC frame. \brief Process a received HDLC frame. \param s The T.30 context. \param msg The HDLC message. \param int The length of the message, in octets. \param ok TRUE if the frame was received without error. */void t30_hdlc_accept(void *user_data, const uint8_t *msg, int len, int ok);/*! Report the passage of time to the T.30 engine. \brief Report the passage of time to the T.30 engine. \param s The T.30 context. \param samples The time change in 1/8000th second steps. */void t30_timer_update(t30_state_t *s, int samples);#if defined(__cplusplus)}#endif#endif/*- End of file ------------------------------------------------------------*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -