Main Page | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

fax_modems.h

Go to the documentation of this file.
00001 /*
00002  * SpanDSP - a series of DSP components for telephony
00003  *
00004  * fax_modems.h - definitions for the analogue modem set for fax processing
00005  *
00006  * Written by Steve Underwood <steveu@coppice.org>
00007  *
00008  * Copyright (C) 2008 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: fax_modems.h,v 1.10 2009/02/14 15:21:14 steveu Exp $
00026  */
00027 
00028 /*! \file */
00029 
00030 #if !defined(_SPANDSP_FAX_MODEMS_H_)
00031 #define _SPANDSP_FAX_MODEMS_H_
00032 
00033 enum
00034 {
00035     FAX_MODEM_NONE = -1,
00036     FAX_MODEM_FLUSH = 0,
00037     FAX_MODEM_SILENCE_TX,
00038     FAX_MODEM_SILENCE_RX,
00039     FAX_MODEM_CED_TONE,
00040     FAX_MODEM_CNG_TONE,
00041     FAX_MODEM_NOCNG_TONE,
00042     FAX_MODEM_V21_TX,
00043     FAX_MODEM_V17_TX,
00044     FAX_MODEM_V27TER_TX,
00045     FAX_MODEM_V29_TX,
00046     FAX_MODEM_V21_RX,
00047     FAX_MODEM_V17_RX,
00048     FAX_MODEM_V27TER_RX,
00049     FAX_MODEM_V29_RX
00050 };
00051 
00052 /*!
00053     The set of modems needed for FAX, plus the auxilliary stuff, like tone generation.
00054 */
00055 typedef struct fax_modems_state_s fax_modems_state_t;
00056 
00057 #if defined(__cplusplus)
00058 extern "C"
00059 {
00060 #endif
00061 
00062 /* N.B. the following are currently a work in progress */
00063 SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
00064 SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
00065 SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
00066 
00067 SPAN_DECLARE(void) fax_modems_set_tep_mode(fax_modems_state_t *s, int use_tep);
00068 
00069 SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s,
00070                                                    int use_tep,
00071                                                    hdlc_frame_handler_t hdlc_accept,
00072                                                    hdlc_underflow_handler_t hdlc_tx_underflow,
00073                                                    put_bit_func_t non_ecm_put_bit,
00074                                                    get_bit_func_t non_ecm_get_bit,
00075                                                    tone_report_func_t tone_callback,
00076                                                    void *user_data);
00077 
00078 SPAN_DECLARE(int) fax_modems_release(fax_modems_state_t *s);
00079 
00080 SPAN_DECLARE(int) fax_modems_free(fax_modems_state_t *s);
00081 
00082 #if defined(__cplusplus)
00083 }
00084 #endif
00085 
00086 #endif
00087 /*- End of file ------------------------------------------------------------*/

Generated on Fri Aug 28 20:12:26 2009 for spandsp by  doxygen 1.3.9.1