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.6 2008/08/14 14:06:05 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 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 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 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 nsf A pointer to the frame. 00064 \param len The length of the frame. 00065 \return 0 for OK, else -1. */ 00066 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 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 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 nsf A pointer to the frame. 00086 \param len The length of the frame. 00087 \return 0 for OK, else -1. */ 00088 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 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 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 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 \param id A pointer to the identifier. 00115 \return 0 for OK, else -1. */ 00116 const char *t30_get_tx_ident(t30_state_t *s); 00117 00118 /*! Get the transmitted identifier associated with a T.30 context. 00119 \brief Set the transmitted identifier associated with a T.30 context. 00120 \param s The T.30 context. 00121 \param id A pointer to the identifier. 00122 \return 0 for OK, else -1. */ 00123 const char *t30_get_rx_ident(t30_state_t *s); 00124 00125 /*! Set the transmitted sub-address associated with a T.30 context. 00126 \brief Set the transmitted sub-address associated with a T.30 context. 00127 \param s The T.30 context. 00128 \param sub_address A pointer to the sub-address. 00129 \return 0 for OK, else -1. */ 00130 int t30_set_tx_sub_address(t30_state_t *s, const char *sub_address); 00131 00132 /*! Get the received sub-address associated with a T.30 context. 00133 \brief Get the received sub-address associated with a T.30 context. 00134 \param s The T.30 context. 00135 \param sub_address A pointer to the sub-address. 00136 \return 0 for OK, else -1. */ 00137 const char *t30_get_tx_sub_address(t30_state_t *s); 00138 00139 /*! Get the received sub-address associated with a T.30 context. 00140 \brief Get the received sub-address associated with a T.30 context. 00141 \param s The T.30 context. 00142 \param sub_address A pointer to the sub-address. 00143 \return 0 for OK, else -1. */ 00144 const char *t30_get_rx_sub_address(t30_state_t *s); 00145 00146 /*! Set the transmitted selective polling address (i.e. the one we will send to the far 00147 end) associated with a T.30 context. 00148 \brief Set the transmitted selective polling address associated with a T.30 context. 00149 \param s The T.30 context. 00150 \param selective_polling_address A pointer to the selective polling address. 00151 \return 0 for OK, else -1. */ 00152 int t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address); 00153 00154 /*! Get the received selective polling address (i.e. the one we will send to the far 00155 end) associated with a T.30 context. 00156 \brief Get the received selective polling address associated with a T.30 context. 00157 \param s The T.30 context. 00158 \param selective_polling_address A pointer to the selective polling address. 00159 \return 0 for OK, else -1. */ 00160 const char *t30_get_tx_selective_polling_address(t30_state_t *s); 00161 00162 /*! Get the received selective polling address (i.e. the one we will send to the far 00163 end) associated with a T.30 context. 00164 \brief Get the received selective polling address associated with a T.30 context. 00165 \param s The T.30 context. 00166 \param selective_polling_address A pointer to the selective polling address. 00167 \return 0 for OK, else -1. */ 00168 const char *t30_get_rx_selective_polling_address(t30_state_t *s); 00169 00170 /*! Set the transmitted polled sub-address (i.e. the one we will send to the far 00171 end) associated with a T.30 context. 00172 \brief Set the transmitted polled sub-address associated with a T.30 context. 00173 \param s The T.30 context. 00174 \param polled_sub_address A pointer to the polled sub-address. 00175 \return 0 for OK, else -1. */ 00176 int t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address); 00177 00178 /*! Get the received polled sub-address (i.e. the one we will send to the far 00179 end) associated with a T.30 context. 00180 \brief Get the received polled sub-address associated with a T.30 context. 00181 \param s The T.30 context. 00182 \param polled_sub_address A pointer to the polled sub-address. 00183 \return 0 for OK, else -1. */ 00184 const char *t30_get_tx_polled_sub_address(t30_state_t *s); 00185 00186 /*! Get the received polled sub-address (i.e. the one we will send to the far 00187 end) associated with a T.30 context. 00188 \brief Get the received polled sub-address associated with a T.30 context. 00189 \param s The T.30 context. 00190 \param polled_sub_address A pointer to the polled sub-address. 00191 \return 0 for OK, else -1. */ 00192 const char *t30_get_rx_polled_sub_address(t30_state_t *s); 00193 00194 /*! Set the transmitted sender ident (i.e. the one we will send to the far 00195 end) associated with a T.30 context. 00196 \brief Set the transmitted sender ident associated with a T.30 context. 00197 \param s The T.30 context. 00198 \param sender_ident A pointer to the sender ident. 00199 \return 0 for OK, else -1. */ 00200 int t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident); 00201 00202 /*! Get the received sender ident (i.e. the one we will send to the far 00203 end) associated with a T.30 context. 00204 \brief Get the received sender ident associated with a T.30 context. 00205 \param s The T.30 context. 00206 \param sender_ident A pointer to the sender ident. 00207 \return 0 for OK, else -1. */ 00208 const char *t30_get_tx_sender_ident(t30_state_t *s); 00209 00210 /*! Get the received sender ident (i.e. the one we will send to the far 00211 end) associated with a T.30 context. 00212 \brief Get the received sender ident associated with a T.30 context. 00213 \param s The T.30 context. 00214 \param sender_ident A pointer to the sender ident. 00215 \return 0 for OK, else -1. */ 00216 const char *t30_get_rx_sender_ident(t30_state_t *s); 00217 00218 /*! Set the transmitted password (i.e. the one we will send to the far 00219 end) associated with a T.30 context. 00220 \brief Set the transmitted password associated with a T.30 context. 00221 \param s The T.30 context. 00222 \param password A pointer to the password. 00223 \return 0 for OK, else -1. */ 00224 int t30_set_tx_password(t30_state_t *s, const char *password); 00225 00226 /*! Get the received password (i.e. the one we will send to the far 00227 end) associated with a T.30 context. 00228 \brief Get the received password associated with a T.30 context. 00229 \param s The T.30 context. 00230 \param password A pointer to the password. 00231 \return 0 for OK, else -1. */ 00232 const char *t30_get_tx_password(t30_state_t *s); 00233 00234 /*! Get the received password (i.e. the one we will send to the far 00235 end) associated with a T.30 context. 00236 \brief Get the received password associated with a T.30 context. 00237 \param s The T.30 context. 00238 \param password A pointer to the password. 00239 \return 0 for OK, else -1. */ 00240 const char *t30_get_rx_password(t30_state_t *s); 00241 00242 /*! Set the transmitted ??? (i.e. the one we will send to the far 00243 end) associated with a T.30 context. 00244 \brief Set the transmitted ??? associated with a T.30 context. 00245 \param s The T.30 context. 00246 \param type The type of address. 00247 \param type A pointer to the address. 00248 \param len The length of the address. 00249 \return 0 for OK, else -1. */ 00250 int t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len); 00251 00252 /*! Get the received ??? (i.e. the one we will send to the far 00253 end) associated with a T.30 context. 00254 \brief Get the received ??? associated with a T.30 context. 00255 \param s The T.30 context. 00256 \param type The type of address. 00257 \param type A pointer to the address. 00258 \param len The length of the address. 00259 \return 0 for OK, else -1. */ 00260 size_t t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[]); 00261 00262 /*! Get the received ??? (i.e. the one we will send to the far 00263 end) associated with a T.30 context. 00264 \brief Get the received ??? associated with a T.30 context. 00265 \param s The T.30 context. 00266 \param type The type of address. 00267 \param type A pointer to the address. 00268 \param len The length of the address. 00269 \return 0 for OK, else -1. */ 00270 size_t t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[]); 00271 00272 /*! Set the transmitted ??? (i.e. the one we will send to the far 00273 end) associated with a T.30 context. 00274 \brief Set the transmitted ??? associated with a T.30 context. 00275 \param s The T.30 context. 00276 \param type The type of address. 00277 \param type A pointer to the address. 00278 \param len The length of the address. 00279 \return 0 for OK, else -1. */ 00280 int t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len); 00281 00282 /*! Get the received ??? (i.e. the one we will send to the far 00283 end) associated with a T.30 context. 00284 \brief Get the received ??? associated with a T.30 context. 00285 \param s The T.30 context. 00286 \param type The type of address. 00287 \param type A pointer to the address. 00288 \param len The length of the address. 00289 \return 0 for OK, else -1. */ 00290 size_t t30_get_tx_ira(t30_state_t *s, int *type, const char *address[]); 00291 00292 /*! Get the received ??? (i.e. the one we will send to the far 00293 end) associated with a T.30 context. 00294 \brief Get the received ??? associated with a T.30 context. 00295 \param s The T.30 context. 00296 \param type The type of address. 00297 \param type A pointer to the address. 00298 \param len The length of the address. 00299 \return 0 for OK, else -1. */ 00300 size_t t30_get_rx_ira(t30_state_t *s, int *type, const char *address[]); 00301 00302 /*! Set the transmitted ??? (i.e. the one we will send to the far 00303 end) associated with a T.30 context. 00304 \brief Set the transmitted ??? associated with a T.30 context. 00305 \param s The T.30 context. 00306 \param type The type of address. 00307 \param type A pointer to the address. 00308 \param len The length of the address. 00309 \return 0 for OK, else -1. */ 00310 int t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len); 00311 00312 /*! Get the received ??? (i.e. the one we will send to the far 00313 end) associated with a T.30 context. 00314 \brief Get the received ??? associated with a T.30 context. 00315 \param s The T.30 context. 00316 \param type The type of address. 00317 \param type A pointer to the address. 00318 \param len The length of the address. 00319 \return 0 for OK, else -1. */ 00320 size_t t30_get_tx_cia(t30_state_t *s, int *type, const char *address[]); 00321 00322 /*! Get the received ??? (i.e. the one we will send to the far 00323 end) associated with a T.30 context. 00324 \brief Get the received ??? associated with a T.30 context. 00325 \param s The T.30 context. 00326 \param type The type of address. 00327 \param type A pointer to the address. 00328 \param len The length of the address. 00329 \return 0 for OK, else -1. */ 00330 size_t t30_get_rx_cia(t30_state_t *s, int *type, const char *address[]); 00331 00332 /*! Set the transmitted ??? (i.e. the one we will send to the far 00333 end) associated with a T.30 context. 00334 \brief Set the transmitted ??? associated with a T.30 context. 00335 \param s The T.30 context. 00336 \param type The type of address. 00337 \param type A pointer to the address. 00338 \param len The length of the address. 00339 \return 0 for OK, else -1. */ 00340 int t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len); 00341 00342 /*! Get the received ??? (i.e. the one we will send to the far 00343 end) associated with a T.30 context. 00344 \brief Get the received ??? associated with a T.30 context. 00345 \param s The T.30 context. 00346 \param type The type of address. 00347 \param type A pointer to the address. 00348 \return 0 for OK, else -1. */ 00349 size_t t30_get_tx_isp(t30_state_t *s, int *type, const char *address[]); 00350 00351 /*! Get the received ??? (i.e. the one we will send to the far 00352 end) associated with a T.30 context. 00353 \brief Get the received ??? associated with a T.30 context. 00354 \param s The T.30 context. 00355 \param type The type of address. 00356 \param type A pointer to the address. 00357 \return 0 for OK, else -1. */ 00358 size_t t30_get_rx_isp(t30_state_t *s, int *type, const char *address[]); 00359 00360 /*! Set the transmitted ??? (i.e. the one we will send to the far 00361 end) associated with a T.30 context. 00362 \brief Set the transmitted ??? associated with a T.30 context. 00363 \param s The T.30 context. 00364 \param type The type of address. 00365 \param type A pointer to the address. 00366 \param len The length of the address. 00367 \return 0 for OK, else -1. */ 00368 int t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len); 00369 00370 /*! Get the received ??? (i.e. the one we will send to the far 00371 end) associated with a T.30 context. 00372 \brief Get the received ??? associated with a T.30 context. 00373 \param s The T.30 context. 00374 \param type The type of address. 00375 \param type A pointer to the address. 00376 \param len The length of the address. 00377 \return 0 for OK, else -1. */ 00378 size_t t30_get_tx_csa(t30_state_t *s, int *type, const char *address[]); 00379 00380 /*! Get the received ??? (i.e. the one we will send to the far 00381 end) associated with a T.30 context. 00382 \brief Get the received ??? associated with a T.30 context. 00383 \param s The T.30 context. 00384 \param type The type of address. 00385 \param type A pointer to the address. 00386 \param len The length of the address. 00387 \return 0 for OK, else -1. */ 00388 size_t t30_get_rx_csa(t30_state_t *s, int *type, const char *address[]); 00389 00390 /*! Set the transmitted header information associated with a T.30 context. 00391 \brief Set the transmitted header information associated with a T.30 context. 00392 \param s The T.30 context. 00393 \param info A pointer to the information string. 00394 \return 0 for OK, else -1. */ 00395 int t30_set_tx_page_header_info(t30_state_t *s, const char *info); 00396 00397 /*! Get the header information associated with a T.30 context. 00398 \brief Get the header information associated with a T.30 context. 00399 \param s The T.30 context. 00400 \param info A pointer to a buffer for the header information. The buffer 00401 should be at least 51 bytes long. 00402 \return the length of the string. */ 00403 size_t t30_get_tx_page_header_info(t30_state_t *s, char *info); 00404 00405 /*! Get the country of origin of the remote FAX machine associated with a T.30 context. 00406 \brief Get the country of origin of the remote FAX machine associated with a T.30 context. 00407 \param s The T.30 context. 00408 \return a pointer to the country name, or NULL if the country is not known. */ 00409 const char *t30_get_rx_country(t30_state_t *s); 00410 00411 /*! Get the name of the vendor of the remote FAX machine associated with a T.30 context. 00412 \brief Get the name of the vendor of the remote FAX machine associated with a T.30 context. 00413 \param s The T.30 context. 00414 \return a pointer to the vendor name, or NULL if the vendor is not known. */ 00415 const char *t30_get_rx_vendor(t30_state_t *s); 00416 00417 /*! Get the name of the model of the remote FAX machine associated with a T.30 context. 00418 \brief Get the name of the model of the remote FAX machine associated with a T.30 context. 00419 \param s The T.30 context. 00420 \return a pointer to the model name, or NULL if the model is not known. */ 00421 const char *t30_get_rx_model(t30_state_t *s); 00422 00423 /*! Specify the file name of the next TIFF file to be received by a T.30 00424 context. 00425 \brief Set next receive file name. 00426 \param s The T.30 context. 00427 \param file The file name 00428 \param stop_page The maximum page to receive. -1 for no restriction. */ 00429 void t30_set_rx_file(t30_state_t *s, const char *file, int stop_page); 00430 00431 /*! Specify the file name of the next TIFF file to be transmitted by a T.30 00432 context. 00433 \brief Set next transmit file name. 00434 \param s The T.30 context. 00435 \param file The file name 00436 \param start_page The first page to send. -1 for no restriction. 00437 \param stop_page The last page to send. -1 for no restriction. */ 00438 void t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page); 00439 00440 /*! Set Internet aware FAX (IAF) mode. 00441 \brief Set Internet aware FAX (IAF) mode. 00442 \param s The T.30 context. 00443 \param iaf TRUE for IAF, or FALSE for non-IAF. */ 00444 void t30_set_iaf_mode(t30_state_t *s, int iaf); 00445 00446 /*! Specify if error correction mode (ECM) is allowed by a T.30 context. 00447 \brief Select ECM capability. 00448 \param s The T.30 context. 00449 \param enabled TRUE for ECM capable, FALSE for not ECM capable. 00450 \return 0 if OK, else -1. */ 00451 int t30_set_ecm_capability(t30_state_t *s, int enabled); 00452 00453 /*! Specify the output encoding for TIFF files created during FAX reception. 00454 \brief Specify the output encoding for TIFF files created during FAX reception. 00455 \param s The T.30 context. 00456 \param encoding The coding required. The options are T4_COMPRESSION_ITU_T4_1D, 00457 T4_COMPRESSION_ITU_T4_2D, T4_COMPRESSION_ITU_T6. T6 is usually the 00458 densest option, but support for it is broken in a number of software 00459 packages. 00460 \return 0 if OK, else -1. */ 00461 int t30_set_rx_encoding(t30_state_t *s, int encoding); 00462 00463 /*! Specify the minimum scan line time supported by a T.30 context. 00464 \brief Specify minimum scan line time. 00465 \param s The T.30 context. 00466 \param min_time The minimum permitted scan line time, in milliseconds. 00467 \return 0 if OK, else -1. */ 00468 int t30_set_minimum_scan_line_time(t30_state_t *s, int min_time); 00469 00470 /*! Specify which modem types are supported by a T.30 context. 00471 \brief Specify supported modems. 00472 \param s The T.30 context. 00473 \param supported_modems Bit field list of the supported modems. 00474 \return 0 if OK, else -1. */ 00475 int t30_set_supported_modems(t30_state_t *s, int supported_modems); 00476 00477 /*! Specify which compression types are supported by a T.30 context. 00478 \brief Specify supported compression types. 00479 \param s The T.30 context. 00480 \param supported_compressions Bit field list of the supported compression types. 00481 \return 0 if OK, else -1. */ 00482 int t30_set_supported_compressions(t30_state_t *s, int supported_compressions); 00483 00484 /*! Specify which resolutions are supported by a T.30 context. 00485 \brief Specify supported resolutions. 00486 \param s The T.30 context. 00487 \param supported_resolutions Bit field list of the supported resolutions. 00488 \return 0 if OK, else -1. */ 00489 int t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions); 00490 00491 /*! Specify which images sizes are supported by a T.30 context. 00492 \brief Specify supported image sizes. 00493 \param s The T.30 context. 00494 \param supported_image_sizes Bit field list of the supported widths and lengths. 00495 \return 0 if OK, else -1. */ 00496 int t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes); 00497 00498 /*! Specify which special T.30 features are supported by a T.30 context. 00499 \brief Specify supported T.30 features. 00500 \param s The T.30 context. 00501 \param supported_t30_features Bit field list of the supported features. 00502 \return 0 if OK, else -1. */ 00503 int t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features); 00504 00505 /*! Set T.30 status. This may be used to adjust the status from within 00506 the phase B and phase D callbacks. 00507 \brief Set T.30 status. 00508 \param s The T.30 context. 00509 \param status The new status. */ 00510 void t30_set_status(t30_state_t *s, int status); 00511 00512 /*! Specify a period of responding with receiver not ready. 00513 \brief Specify a period of responding with receiver not ready. 00514 \param s The T.30 context. 00515 \param count The number of times to report receiver not ready. 00516 \return 0 if OK, else -1. */ 00517 int t30_set_receiver_not_ready(t30_state_t *s, int count); 00518 00519 /*! Set a callback function for T.30 phase B handling. 00520 \brief Set a callback function for T.30 phase B handling. 00521 \param s The T.30 context. 00522 \param handler The callback function. 00523 \param user_data An opaque pointer passed to the callback function. */ 00524 void t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data); 00525 00526 /*! Set a callback function for T.30 phase D handling. 00527 \brief Set a callback function for T.30 phase D handling. 00528 \param s The T.30 context. 00529 \param handler The callback function. 00530 \param user_data An opaque pointer passed to the callback function. */ 00531 void t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data); 00532 00533 /*! Set a callback function for T.30 phase E handling. 00534 \brief Set a callback function for T.30 phase E handling. 00535 \param s The T.30 context. 00536 \param handler The callback function. 00537 \param user_data An opaque pointer passed to the callback function. */ 00538 void t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data); 00539 00540 /*! Set a callback function for T.30 end of document handling. 00541 \brief Set a callback function for T.30 end of document handling. 00542 \param s The T.30 context. 00543 \param handler The callback function. 00544 \param user_data An opaque pointer passed to the callback function. */ 00545 void t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data); 00546 00547 /*! Set a callback function for T.30 frame exchange monitoring. This is called from the heart 00548 of the signal processing, so don't take too long in the handler routine. 00549 \brief Set a callback function for T.30 frame exchange monitoring. 00550 \param s The T.30 context. 00551 \param handler The callback function. 00552 \param user_data An opaque pointer passed to the callback function. */ 00553 void t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data); 00554 00555 #if defined(__cplusplus) 00556 } 00557 #endif 00558 00559 #endif 00560 /*- End of file ------------------------------------------------------------*/