t30_api.h

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

Generated on Wed Feb 8 18:38:18 2012 for spandsp by  doxygen 1.4.7