00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * t35.h - ITU T.35 FAX non-standard facility 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_T35_H_) 00029 #define _SPANDSP_T35_H_ 00030 00031 /*! \page t35_page T.35 manufacturer specific processing for FAX machines 00032 \section t35_page_sec_1 What does it do? 00033 ???. 00034 00035 \section t35_page_sec_2 How does it work? 00036 ???. 00037 */ 00038 00039 #if defined(__cplusplus) 00040 extern "C" 00041 { 00042 #endif 00043 00044 /*! Resolve a T.35 country code its probable likely real value, using heuristics to try to resolve issues 00045 of broken bit order in the country code. 00046 \brief Resolve a T.35 country code with bit reversal resolution. 00047 \param country_code The country code. 00048 \param country_code_extension The country code extension. 00049 \return The true country code, or -1 for an invalid code. 00050 */ 00051 SPAN_DECLARE(int) t35_real_country_code(int country_code, int country_code_extension); 00052 00053 /*! Decode a T.35 country code to a country name, using heuristics to try to resolve issues of broken bit order 00054 in the country code. 00055 \brief Decode a T.35 country code to a country name, with bit reversal resolution. 00056 \param country_code The country code. 00057 \param country_code_extension The country code extension. 00058 \return The country name, or NULL for an invalid country code. 00059 */ 00060 SPAN_DECLARE(const char *) t35_real_country_code_to_str(int country_code, int country_code_extension); 00061 00062 /*! Decode a T.35 country code to a country name. 00063 \brief Decode a T.35 country code to a country name. 00064 \param country_code The country code. 00065 \param country_code_extension The country code extension. 00066 \return The country name, or NULL for an invalid country code. 00067 */ 00068 SPAN_DECLARE(const char *) t35_country_code_to_str(int country_code, int country_code_extension); 00069 00070 SPAN_DECLARE(const char *) t35_vendor_to_str(const uint8_t *msg, int len); 00071 00072 /*! Decode an NSF field to try to determine the make and model of the 00073 remote machine. 00074 \brief Decode an NSF field. 00075 \param msg The NSF message. 00076 \param len The length of the NSF message. 00077 \param country A pointer which will be pointed to the identified country of origin. 00078 If a NULL pointer is given, the country of origin will not be returned. 00079 If the country of origin is not identified, NULL will be returned. 00080 \param vendor A pointer which will be pointed to the identified vendor. 00081 If a NULL pointer is given, the vendor ID will not be returned. 00082 If the vendor is not identified, NULL will be returned. 00083 \param model A pointer which will be pointed to the identified model. 00084 If a NULL pointer is given, the model will not be returned. 00085 If the model is not identified, NULL will be returned. 00086 \return TRUE if the machine was identified, otherwise FALSE. 00087 */ 00088 SPAN_DECLARE(int) t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model); 00089 00090 #if defined(__cplusplus) 00091 } 00092 #endif 00093 00094 #endif 00095 /*- End of file ------------------------------------------------------------*/
1.6.1