00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * t30_api.h - definitions for T.30 fax processing 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2003 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 * 00025 * $Id: t30_api.h,v 1.10 2009/04/12 09:12:10 steveu Exp $ 00026 */ 00027 00028 /*! \file */ 00029 00030 #if !defined(_SPANDSP_T30_API_H_) 00031 #define _SPANDSP_T30_API_H_ 00032 00033 #if defined(__cplusplus) 00034 extern "C" 00035 { 00036 #endif 00037 00038 /*! Set the transmitted NSF frame to be associated with a T.30 context. 00039 \brief Set the transmitted NSF frame to be associated with a T.30 context. 00040 \param s The T.30 context. 00041 \param nsf A pointer to the frame. 00042 \param len The length of the frame. 00043 \return 0 for OK, else -1. */ 00044 SPAN_DECLARE(int) t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len); 00045 00046 /*! Get an NSF frame to be associated with a T.30 context. 00047 \brief Set an NSF frame to be associated with a T.30 context. 00048 \param s The T.30 context. 00049 \param nsf A pointer to the frame. 00050 \return the length of the NSF message. */ 00051 SPAN_DECLARE(size_t) t30_get_tx_nsf(t30_state_t *s, const uint8_t *nsf[]); 00052 00053 /*! Get an NSF frame to be associated with a T.30 context. 00054 \brief Set an NSF frame to be associated with a T.30 context. 00055 \param s The T.30 context. 00056 \param nsf A pointer to the frame. 00057 \return the length of the NSF message. */ 00058 SPAN_DECLARE(size_t) t30_get_rx_nsf(t30_state_t *s, const uint8_t *nsf[]); 00059 00060 /*! Set the transmitted NSC frame to be associated with a T.30 context. 00061 \brief Set the transmitted NSC frame to be associated with a T.30 context. 00062 \param s The T.30 context. 00063 \param nsc A pointer to the frame. 00064 \param len The length of the frame. 00065 \return 0 for OK, else -1. */ 00066 SPAN_DECLARE(int) t30_set_tx_nsc(t30_state_t *s, const uint8_t *nsc, int len); 00067 00068 /*! Get an NSC frame to be associated with a T.30 context. 00069 \brief Set an NSC frame to be associated with a T.30 context. 00070 \param s The T.30 context. 00071 \param nsc A pointer to the frame. 00072 \return the length of the NSC message. */ 00073 SPAN_DECLARE(size_t) t30_get_tx_nsc(t30_state_t *s, const uint8_t *nsc[]); 00074 00075 /*! Get an NSC frame to be associated with a T.30 context. 00076 \brief Set an NSC frame to be associated with a T.30 context. 00077 \param s The T.30 context. 00078 \param nsc A pointer to the frame. 00079 \return the length of the NSC message. */ 00080 SPAN_DECLARE(size_t) t30_get_rx_nsc(t30_state_t *s, const uint8_t *nsc[]); 00081 00082 /*! Set the transmitted NSS frame to be associated with a T.30 context. 00083 \brief Set the transmitted NSS frame to be associated with a T.30 context. 00084 \param s The T.30 context. 00085 \param nss A pointer to the frame. 00086 \param len The length of the frame. 00087 \return 0 for OK, else -1. */ 00088 SPAN_DECLARE(int) t30_set_tx_nss(t30_state_t *s, const uint8_t *nss, int len); 00089 00090 /*! Get an NSS frame to be associated with a T.30 context. 00091 \brief Set an NSS frame to be associated with a T.30 context. 00092 \param s The T.30 context. 00093 \param nss A pointer to the frame. 00094 \return the length of the NSS message. */ 00095 SPAN_DECLARE(size_t) t30_get_tx_nss(t30_state_t *s, const uint8_t *nss[]); 00096 00097 /*! Get an NSS frame to be associated with a T.30 context. 00098 \brief Set an NSS frame to be associated with a T.30 context. 00099 \param s The T.30 context. 00100 \param nss A pointer to the frame. 00101 \return the length of the NSS message. */ 00102 SPAN_DECLARE(size_t) t30_get_rx_nss(t30_state_t *s, const uint8_t *nss[]); 00103 00104 /*! Set the transmitted identifier associated with a T.30 context. 00105 \brief Set the transmitted identifier associated with a T.30 context. 00106 \param s The T.30 context. 00107 \param id A pointer to the identifier. 00108 \return 0 for OK, else -1. */ 00109 SPAN_DECLARE(int) t30_set_tx_ident(t30_state_t *s, const char *id); 00110 00111 /*! Get the transmitted identifier associated with a T.30 context. 00112 \brief Set the transmitted identifier associated with a T.30 context. 00113 \param s The T.30 context. 00114 \return A pointer to the identifier. */ 00115 SPAN_DECLARE(const char *) t30_get_tx_ident(t30_state_t *s); 00116 00117 /*! Get the transmitted identifier associated with a T.30 context. 00118 \brief Set the transmitted identifier associated with a T.30 context. 00119 \param s The T.30 context. 00120 \return A pointer to the identifier. */ 00121 SPAN_DECLARE(const char *) t30_get_rx_ident(t30_state_t *s); 00122 00123 /*! Set the transmitted sub-address associated with a T.30 context. 00124 \brief Set the transmitted sub-address associated with a T.30 context. 00125 \param s The T.30 context. 00126 \param sub_address A pointer to the sub-address. 00127 \return 0 for OK, else -1. */ 00128 SPAN_DECLARE(int) t30_set_tx_sub_address(t30_state_t *s, const char *sub_address); 00129 00130 /*! Get the received sub-address associated with a T.30 context. 00131 \brief Get the received sub-address associated with a T.30 context. 00132 \param s The T.30 context. 00133 \return A pointer to the sub-address. */ 00134 SPAN_DECLARE(const char *) t30_get_tx_sub_address(t30_state_t *s); 00135 00136 /*! Get the received sub-address associated with a T.30 context. 00137 \brief Get the received sub-address associated with a T.30 context. 00138 \param s The T.30 context. 00139 \return A pointer to the sub-address. */ 00140 SPAN_DECLARE(const char *) t30_get_rx_sub_address(t30_state_t *s); 00141 00142 /*! Set the transmitted selective polling address (i.e. the one we will send to the far 00143 end) associated with a T.30 context. 00144 \brief Set the transmitted selective polling address associated with a T.30 context. 00145 \param s The T.30 context. 00146 \param selective_polling_address A pointer to the selective polling address. 00147 \return 0 for OK, else -1. */ 00148 SPAN_DECLARE(int) t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address); 00149 00150 /*! Get the received selective polling address (i.e. the one we will send to the far 00151 end) associated with a T.30 context. 00152 \brief Get the received selective polling address associated with a T.30 context. 00153 \param s The T.30 context. 00154 \return A pointer to the selective polling address. */ 00155 SPAN_DECLARE(const char *) t30_get_tx_selective_polling_address(t30_state_t *s); 00156 00157 /*! Get the received selective polling address (i.e. the one we will send to the far 00158 end) associated with a T.30 context. 00159 \brief Get the received selective polling address associated with a T.30 context. 00160 \param s The T.30 context. 00161 \return A pointer to the selective polling address. */ 00162 SPAN_DECLARE(const char *) t30_get_rx_selective_polling_address(t30_state_t *s); 00163 00164 /*! Set the transmitted polled sub-address (i.e. the one we will send to the far 00165 end) associated with a T.30 context. 00166 \brief Set the transmitted polled sub-address associated with a T.30 context. 00167 \param s The T.30 context. 00168 \param polled_sub_address A pointer to the polled sub-address. 00169 \return 0 for OK, else -1. */ 00170 SPAN_DECLARE(int) t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address); 00171 00172 /*! Get the received polled sub-address (i.e. the one we will send to the far 00173 end) associated with a T.30 context. 00174 \brief Get the received polled sub-address associated with a T.30 context. 00175 \param s The T.30 context. 00176 \return A pointer to the polled sub-address. */ 00177 SPAN_DECLARE(const char *) t30_get_tx_polled_sub_address(t30_state_t *s); 00178 00179 /*! Get the received polled sub-address (i.e. the one we will send to the far 00180 end) associated with a T.30 context. 00181 \brief Get the received polled sub-address associated with a T.30 context. 00182 \param s The T.30 context. 00183 \return A pointer to the polled sub-address. */ 00184 SPAN_DECLARE(const char *) t30_get_rx_polled_sub_address(t30_state_t *s); 00185 00186 /*! Set the transmitted sender ident (i.e. the one we will send to the far 00187 end) associated with a T.30 context. 00188 \brief Set the transmitted sender ident associated with a T.30 context. 00189 \param s The T.30 context. 00190 \param sender_ident A pointer to the sender ident. 00191 \return 0 for OK, else -1. */ 00192 SPAN_DECLARE(int) t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident); 00193 00194 /*! Get the received sender ident (i.e. the one we will send to the far 00195 end) associated with a T.30 context. 00196 \brief Get the received sender ident associated with a T.30 context. 00197 \param s The T.30 context. 00198 \return A pointer to the sender ident. */ 00199 SPAN_DECLARE(const char *) t30_get_tx_sender_ident(t30_state_t *s); 00200 00201 /*! Get the received sender ident (i.e. the one we will send to the far 00202 end) associated with a T.30 context. 00203 \brief Get the received sender ident associated with a T.30 context. 00204 \param s The T.30 context. 00205 \return A pointer to the sender ident. */ 00206 SPAN_DECLARE(const char *) t30_get_rx_sender_ident(t30_state_t *s); 00207 00208 /*! Set the transmitted password (i.e. the one we will send to the far 00209 end) associated with a T.30 context. 00210 \brief Set the transmitted password associated with a T.30 context. 00211 \param s The T.30 context. 00212 \param password A pointer to the password. 00213 \return 0 for OK, else -1. */ 00214 SPAN_DECLARE(int) t30_set_tx_password(t30_state_t *s, const char *password); 00215 00216 /*! Get the received password (i.e. the one we will send to the far 00217 end) associated with a T.30 context. 00218 \brief Get the received password associated with a T.30 context. 00219 \param s The T.30 context. 00220 \return A pointer to the password. */ 00221 SPAN_DECLARE(const char *) t30_get_tx_password(t30_state_t *s); 00222 00223 /*! Get the received password (i.e. the one we will send to the far 00224 end) associated with a T.30 context. 00225 \brief Get the received password associated with a T.30 context. 00226 \param s The T.30 context. 00227 \return A pointer to the password. */ 00228 SPAN_DECLARE(const char *) t30_get_rx_password(t30_state_t *s); 00229 00230 /*! Set the transmitted ??? (i.e. the one we will send to the far 00231 end) associated with a T.30 context. 00232 \brief Set the transmitted ??? associated with a T.30 context. 00233 \param s The T.30 context. 00234 \param type The type of address. 00235 \param address A pointer to the address. 00236 \param len The length of the address. 00237 \return 0 for OK, else -1. */ 00238 SPAN_DECLARE(int) t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len); 00239 00240 /*! Get the received ??? (i.e. the one we will send to the far 00241 end) associated with a T.30 context. 00242 \brief Get the received ??? associated with a T.30 context. 00243 \param s The T.30 context. 00244 \param type The type of address. 00245 \param address A pointer to the address. 00246 \return The length of the address. */ 00247 SPAN_DECLARE(size_t) t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[]); 00248 00249 /*! Get the received ??? (i.e. the one we will send to the far 00250 end) associated with a T.30 context. 00251 \brief Get the received ??? associated with a T.30 context. 00252 \param s The T.30 context. 00253 \param type The type of address. 00254 \param address A pointer to the address. 00255 \return The length of the address. */ 00256 SPAN_DECLARE(size_t) t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[]); 00257 00258 /*! Set the transmitted ??? (i.e. the one we will send to the far 00259 end) associated with a T.30 context. 00260 \brief Set the transmitted ??? associated with a T.30 context. 00261 \param s The T.30 context. 00262 \param type The type of address. 00263 \param address A pointer to the address. 00264 \param len The length of the address. 00265 \return 0 for OK, else -1. */ 00266 SPAN_DECLARE(int) t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len); 00267 00268 /*! Get the received ??? (i.e. the one we will send to the far 00269 end) associated with a T.30 context. 00270 \brief Get the received ??? associated with a T.30 context. 00271 \param s The T.30 context. 00272 \param type The type of address. 00273 \param address A pointer to the address. 00274 \return The length of the address. */ 00275 SPAN_DECLARE(size_t) t30_get_tx_ira(t30_state_t *s, int *type, const char *address[]); 00276 00277 /*! Get the received ??? (i.e. the one we will send to the far 00278 end) associated with a T.30 context. 00279 \brief Get the received ??? associated with a T.30 context. 00280 \param s The T.30 context. 00281 \param type The type of address. 00282 \param address A pointer to the address. 00283 \return The length of the address. */ 00284 SPAN_DECLARE(size_t) t30_get_rx_ira(t30_state_t *s, int *type, const char *address[]); 00285 00286 /*! Set the transmitted ??? (i.e. the one we will send to the far 00287 end) associated with a T.30 context. 00288 \brief Set the transmitted ??? associated with a T.30 context. 00289 \param s The T.30 context. 00290 \param type The type of address. 00291 \param address A pointer to the address. 00292 \param len The length of the address. 00293 \return 0 for OK, else -1. */ 00294 SPAN_DECLARE(int) t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len); 00295 00296 /*! Get the received ??? (i.e. the one we will send to the far 00297 end) associated with a T.30 context. 00298 \brief Get the received ??? associated with a T.30 context. 00299 \param s The T.30 context. 00300 \param type The type of address. 00301 \param address A pointer to the address. 00302 \return The length of the address. */ 00303 SPAN_DECLARE(size_t) t30_get_tx_cia(t30_state_t *s, int *type, const char *address[]); 00304 00305 /*! Get the received ??? (i.e. the one we will send to the far 00306 end) associated with a T.30 context. 00307 \brief Get the received ??? associated with a T.30 context. 00308 \param s The T.30 context. 00309 \param type The type of address. 00310 \param address A pointer to the address. 00311 \return 0 for OK, else -1. */ 00312 SPAN_DECLARE(size_t) t30_get_rx_cia(t30_state_t *s, int *type, const char *address[]); 00313 00314 /*! Set the transmitted ??? (i.e. the one we will send to the far 00315 end) associated with a T.30 context. 00316 \brief Set the transmitted ??? associated with a T.30 context. 00317 \param s The T.30 context. 00318 \param type The type of address. 00319 \param address A pointer to the address. 00320 \param len The length of the address. 00321 \return 0 for OK, else -1. */ 00322 SPAN_DECLARE(int) t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len); 00323 00324 /*! Get the received ??? (i.e. the one we will send to the far 00325 end) associated with a T.30 context. 00326 \brief Get the received ??? associated with a T.30 context. 00327 \param s The T.30 context. 00328 \param type The type of address. 00329 \param address A pointer to the address. 00330 \return 0 for OK, else -1. */ 00331 SPAN_DECLARE(size_t) t30_get_tx_isp(t30_state_t *s, int *type, const char *address[]); 00332 00333 /*! Get the received ??? (i.e. the one we will send to the far 00334 end) associated with a T.30 context. 00335 \brief Get the received ??? associated with a T.30 context. 00336 \param s The T.30 context. 00337 \param type The type of address. 00338 \param address A pointer to the address. 00339 \return 0 for OK, else -1. */ 00340 SPAN_DECLARE(size_t) t30_get_rx_isp(t30_state_t *s, int *type, const char *address[]); 00341 00342 /*! Set the transmitted ??? (i.e. the one we will send to the far 00343 end) associated with a T.30 context. 00344 \brief Set the transmitted ??? associated with a T.30 context. 00345 \param s The T.30 context. 00346 \param type The type of address. 00347 \param address A pointer to the address. 00348 \param len The length of the address. 00349 \return 0 for OK, else -1. */ 00350 SPAN_DECLARE(int) t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len); 00351 00352 /*! Get the received ??? (i.e. the one we will send to the far 00353 end) associated with a T.30 context. 00354 \brief Get the received ??? associated with a T.30 context. 00355 \param s The T.30 context. 00356 \param type The type of address. 00357 \param address A pointer to the address. 00358 \return The length of the address. */ 00359 SPAN_DECLARE(size_t) t30_get_tx_csa(t30_state_t *s, int *type, const char *address[]); 00360 00361 /*! Get the received ??? (i.e. the one we will send to the far 00362 end) associated with a T.30 context. 00363 \brief Get the received ??? associated with a T.30 context. 00364 \param s The T.30 context. 00365 \param type The type of address. 00366 \param address A pointer to the address. 00367 \return 0 for OK, else -1. */ 00368 SPAN_DECLARE(size_t) t30_get_rx_csa(t30_state_t *s, int *type, const char *address[]); 00369 00370 /*! Set the transmitted header information associated with a T.30 context. 00371 \brief Set the transmitted header information associated with a T.30 context. 00372 \param s The T.30 context. 00373 \param info A pointer to the information string. 00374 \return 0 for OK, else -1. */ 00375 SPAN_DECLARE(int) t30_set_tx_page_header_info(t30_state_t *s, const char *info); 00376 00377 /*! Get the header information associated with a T.30 context. 00378 \brief Get the header information associated with a T.30 context. 00379 \param s The T.30 context. 00380 \param info A pointer to a buffer for the header information. The buffer 00381 should be at least 51 bytes long. 00382 \return the length of the string. */ 00383 SPAN_DECLARE(size_t) t30_get_tx_page_header_info(t30_state_t *s, char *info); 00384 00385 /*! Get the country of origin of the remote FAX machine associated with a T.30 context. 00386 \brief Get the country of origin of the remote FAX machine associated with a T.30 context. 00387 \param s The T.30 context. 00388 \return a pointer to the country name, or NULL if the country is not known. */ 00389 SPAN_DECLARE(const char *) t30_get_rx_country(t30_state_t *s); 00390 00391 /*! Get the name of the vendor of the remote FAX machine associated with a T.30 context. 00392 \brief Get the name of the vendor of the remote FAX machine associated with a T.30 context. 00393 \param s The T.30 context. 00394 \return a pointer to the vendor name, or NULL if the vendor is not known. */ 00395 SPAN_DECLARE(const char *) t30_get_rx_vendor(t30_state_t *s); 00396 00397 /*! Get the name of the model of the remote FAX machine associated with a T.30 context. 00398 \brief Get the name of the model of the remote FAX machine associated with a T.30 context. 00399 \param s The T.30 context. 00400 \return a pointer to the model name, or NULL if the model is not known. */ 00401 SPAN_DECLARE(const char *) t30_get_rx_model(t30_state_t *s); 00402 00403 /*! Specify the file name of the next TIFF file to be received by a T.30 00404 context. 00405 \brief Set next receive file name. 00406 \param s The T.30 context. 00407 \param file The file name 00408 \param stop_page The maximum page to receive. -1 for no restriction. */ 00409 SPAN_DECLARE(void) t30_set_rx_file(t30_state_t *s, const char *file, int stop_page); 00410 00411 /*! Specify the file name of the next TIFF file to be transmitted by a T.30 00412 context. 00413 \brief Set next transmit file name. 00414 \param s The T.30 context. 00415 \param file The file name 00416 \param start_page The first page to send. -1 for no restriction. 00417 \param stop_page The last page to send. -1 for no restriction. */ 00418 SPAN_DECLARE(void) t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page); 00419 00420 /*! Set Internet aware FAX (IAF) mode. 00421 \brief Set Internet aware FAX (IAF) mode. 00422 \param s The T.30 context. 00423 \param iaf TRUE for IAF, or FALSE for non-IAF. */ 00424 SPAN_DECLARE(void) t30_set_iaf_mode(t30_state_t *s, int iaf); 00425 00426 /*! Specify if error correction mode (ECM) is allowed by a T.30 context. 00427 \brief Select ECM capability. 00428 \param s The T.30 context. 00429 \param enabled TRUE for ECM capable, FALSE for not ECM capable. 00430 \return 0 if OK, else -1. */ 00431 SPAN_DECLARE(int) t30_set_ecm_capability(t30_state_t *s, int enabled); 00432 00433 /*! Specify the output encoding for TIFF files created during FAX reception. 00434 \brief Specify the output encoding for TIFF files created during FAX reception. 00435 \param s The T.30 context. 00436 \param encoding The coding required. The options are T4_COMPRESSION_ITU_T4_1D, 00437 T4_COMPRESSION_ITU_T4_2D, T4_COMPRESSION_ITU_T6. T6 is usually the 00438 densest option, but support for it is broken in a number of software 00439 packages. 00440 \return 0 if OK, else -1. */ 00441 SPAN_DECLARE(int) t30_set_rx_encoding(t30_state_t *s, int encoding); 00442 00443 /*! Specify the minimum scan line time supported by a T.30 context. 00444 \brief Specify minimum scan line time. 00445 \param s The T.30 context. 00446 \param min_time The minimum permitted scan line time, in milliseconds. 00447 \return 0 if OK, else -1. */ 00448 SPAN_DECLARE(int) t30_set_minimum_scan_line_time(t30_state_t *s, int min_time); 00449 00450 /*! Specify which modem types are supported by a T.30 context. 00451 \brief Specify supported modems. 00452 \param s The T.30 context. 00453 \param supported_modems Bit field list of the supported modems. 00454 \return 0 if OK, else -1. */ 00455 SPAN_DECLARE(int) t30_set_supported_modems(t30_state_t *s, int supported_modems); 00456 00457 /*! Specify which compression types are supported by a T.30 context. 00458 \brief Specify supported compression types. 00459 \param s The T.30 context. 00460 \param supported_compressions Bit field list of the supported compression types. 00461 \return 0 if OK, else -1. */ 00462 SPAN_DECLARE(int) t30_set_supported_compressions(t30_state_t *s, int supported_compressions); 00463 00464 /*! Specify which resolutions are supported by a T.30 context. 00465 \brief Specify supported resolutions. 00466 \param s The T.30 context. 00467 \param supported_resolutions Bit field list of the supported resolutions. 00468 \return 0 if OK, else -1. */ 00469 SPAN_DECLARE(int) t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions); 00470 00471 /*! Specify which images sizes are supported by a T.30 context. 00472 \brief Specify supported image sizes. 00473 \param s The T.30 context. 00474 \param supported_image_sizes Bit field list of the supported widths and lengths. 00475 \return 0 if OK, else -1. */ 00476 SPAN_DECLARE(int) t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes); 00477 00478 /*! Specify which special T.30 features are supported by a T.30 context. 00479 \brief Specify supported T.30 features. 00480 \param s The T.30 context. 00481 \param supported_t30_features Bit field list of the supported features. 00482 \return 0 if OK, else -1. */ 00483 SPAN_DECLARE(int) t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features); 00484 00485 /*! Set T.30 status. This may be used to adjust the status from within 00486 the phase B and phase D callbacks. 00487 \brief Set T.30 status. 00488 \param s The T.30 context. 00489 \param status The new status. */ 00490 SPAN_DECLARE(void) t30_set_status(t30_state_t *s, int status); 00491 00492 /*! Specify a period of responding with receiver not ready. 00493 \brief Specify a period of responding with receiver not ready. 00494 \param s The T.30 context. 00495 \param count The number of times to report receiver not ready. 00496 \return 0 if OK, else -1. */ 00497 SPAN_DECLARE(int) t30_set_receiver_not_ready(t30_state_t *s, int count); 00498 00499 /*! Set a callback function for T.30 phase B handling. 00500 \brief Set a callback function for T.30 phase B handling. 00501 \param s The T.30 context. 00502 \param handler The callback function. 00503 \param user_data An opaque pointer passed to the callback function. */ 00504 SPAN_DECLARE(void) t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data); 00505 00506 /*! Set a callback function for T.30 phase D handling. 00507 \brief Set a callback function for T.30 phase D handling. 00508 \param s The T.30 context. 00509 \param handler The callback function. 00510 \param user_data An opaque pointer passed to the callback function. */ 00511 SPAN_DECLARE(void) t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data); 00512 00513 /*! Set a callback function for T.30 phase E handling. 00514 \brief Set a callback function for T.30 phase E handling. 00515 \param s The T.30 context. 00516 \param handler The callback function. 00517 \param user_data An opaque pointer passed to the callback function. */ 00518 SPAN_DECLARE(void) t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data); 00519 00520 /*! Set a callback function for T.30 end of document handling. 00521 \brief Set a callback function for T.30 end of document handling. 00522 \param s The T.30 context. 00523 \param handler The callback function. 00524 \param user_data An opaque pointer passed to the callback function. */ 00525 SPAN_DECLARE(void) t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data); 00526 00527 /*! Set a callback function for T.30 frame exchange monitoring. This is called from the heart 00528 of the signal processing, so don't take too long in the handler routine. 00529 \brief Set a callback function for T.30 frame exchange monitoring. 00530 \param s The T.30 context. 00531 \param handler The callback function. 00532 \param user_data An opaque pointer passed to the callback function. */ 00533 SPAN_DECLARE(void) t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data); 00534 00535 /*! Get a pointer to the logging context associated with a T.30 context. 00536 \brief Get a pointer to the logging context associated with a T.30 context. 00537 \param s The T.30 context. 00538 \return A pointer to the logging context, or NULL. 00539 */ 00540 SPAN_DECLARE(logging_state_t *) t30_get_logging_state(t30_state_t *s); 00541 00542 #if defined(__cplusplus) 00543 } 00544 #endif 00545 00546 #endif 00547 /*- End of file ------------------------------------------------------------*/