File:  [ELWIX - Embedded LightWeight unIX -] / gpl / axl / babel / axl_babel.h
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Jun 8 07:09:12 2011 UTC (13 years ago) by misho
CVS tags: MAIN, HEAD
Initial revision

    1: /*
    2:  *  LibAxl:  Another XML library
    3:  *  Copyright (C) 2008 Advanced Software Production Line, S.L.
    4:  *
    5:  *  This program is free software; you can redistribute it and/or
    6:  *  modify it under the terms of the GNU Lesser General Public License
    7:  *  as published by the Free Software Foundation; either version 2.1 of
    8:  *  the License, or (at your option) any later version.
    9:  *
   10:  *  This program is distributed in the hope that it will be useful,
   11:  *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
   12:  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
   13:  *  GNU Lesser General Public License for more details.
   14:  *
   15:  *  You should have received a copy of the GNU Lesser General Public
   16:  *  License along with this program; if not, write to the Free
   17:  *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   18:  *  02111-1307 USA
   19:  *  
   20:  *  You may find a copy of the license under this software is released
   21:  *  at COPYING file. This is LGPL software: you are welcome to
   22:  *  develop proprietary applications using this library without any
   23:  *  royalty or fee but returning back any change, improvement or
   24:  *  addition in the form of source code, project image, documentation
   25:  *  patches, etc. 
   26:  *
   27:  *  For commercial support on build XML enabled solutions contact us:
   28:  *          
   29:  *      Postal address:
   30:  *         Advanced Software Production Line, S.L.
   31:  *         Edificio Alius A, Oficina 102,
   32:  *         C/ Antonio Suarez Nº 10,
   33:  *         Alcalá de Henares 28802 Madrid
   34:  *         Spain
   35:  *
   36:  *      Email address:
   37:  *         info@aspl.es - http://www.aspl.es/xml
   38:  */
   39: #ifndef __AXL_BABEL_H__
   40: #define __AXL_BABEL_H__
   41: 
   42: /** 
   43:  * \addtogroup axl_babel
   44:  * @{
   45:  */
   46: 
   47: /* include base library */
   48: #include <axl.h>
   49: 
   50: /**
   51:  * @brief Public definition for a translation unit from a native
   52:  * codification into universal unicode representation using UTF-8
   53:  * format. This type is used by modules providing input encoding
   54:  * support to axl babel. If you are not developing an encoding module,
   55:  * this type isn't useful for you.
   56:  */
   57: typedef struct _axlBabelTable {
   58: 	/**
   59: 	 * @brief Amount of unicode utf-8 atoms stored in buffer.
   60: 	 */
   61: 	short size;
   62: 
   63: 	/**
   64: 	 * @brief Support for 6 octects to represent one unicode unit.
   65: 	 */
   66: 	unsigned char  buffer[6];
   67: } axlBabelTable;
   68: 
   69: axl_bool    axl_babel_init (axlError ** error);
   70: 
   71: void        axl_babel_finish ();
   72: 
   73: axl_bool    axl_babel_detect_codification (axlStream   * stream, 
   74: 					   const char ** encoding,
   75: 					   axlPointer    user_data,
   76: 					   axlError   ** error);
   77: 
   78: axl_bool    axl_babel_configure_encoding  (axlStream  * stream, 
   79: 					   const char * encoding, 
   80: 					   const char * detected, 
   81: 					   axlPointer user_data, 
   82: 					   axlError ** error);
   83: 
   84: axl_bool    axl_babel_check_utf8_content  (const char * content,
   85: 					   int          content_length,
   86: 					   int        * index_error);
   87: 
   88: 
   89: #endif /* end __AXL_BABEL_H__ */
   90: 
   91: /**
   92:  * @}
   93:  */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>