Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

wbxml_encoder.h

Go to the documentation of this file.
00001 /*
00002  * WBXML Lib, the WBXML Library.
00003  * Copyright (C) 2002-2003  Aymerick Jéhanne
00004  * 
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License (version 2.1) as published by the Free Software Foundation.
00008  * 
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  *
00018  * LGPL v2.1: http://www.gnu.org/licenses/lgpl.txt
00019  *
00020  * Author Contact: libwbxml@jehanne.org
00021  * WBXML Lib home: http://libwbxml.jehanne.org
00022  */
00023  
00034 #ifndef WBXML_ENCODER_H
00035 #define WBXML_ENCODER_H
00036 
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif /* __cplusplus */
00041 
00049 typedef struct WBXMLEncoder_s WBXMLEncoder;
00050 
00055 typedef enum WBXMLEncoderXMLGenType_e {
00056     WBXML_ENCODER_XML_GEN_COMPACT = 0,  
00057     WBXML_ENCODER_XML_GEN_INDENT,       
00058     WBXML_ENCODER_XML_GEN_CANONICAL     
00059 } WBXMLEncoderXMLGenType;
00060 
00061 
00062 /* WBXMLEncoder Functions */
00063 
00069 WBXML_DECLARE(WBXMLEncoder *) wbxml_encoder_create_real(void);
00070 #define wbxml_encoder_create() wbxml_mem_cleam(wbxml_encoder_create_real())
00071 
00076 WBXML_DECLARE(void) wbxml_encoder_destroy(WBXMLEncoder *encoder);
00077 
00078 
00079 /* Possible options when generating WBXML or XML */
00080 
00087 WBXML_DECLARE(void) wbxml_encoder_set_ignore_empty_text(WBXMLEncoder *encoder, WB_BOOL set_ignore);
00088 
00095 WBXML_DECLARE(void) wbxml_encoder_set_remove_text_blanks(WBXMLEncoder *encoder, WB_BOOL set_remove);
00096 
00097 
00098 /* Possible options when generating WBXML */
00099 
00106 WBXML_DECLARE(void) wbxml_encoder_set_use_strtbl(WBXMLEncoder *encoder, WB_BOOL use_strtbl);
00107 
00113 WBXML_DECLARE(void) wbxml_encoder_set_wbxml_version(WBXMLEncoder *encoder, WBXMLVersion version);
00114 
00115 
00116 /* Possible options when generating XML */
00117 
00123 WBXML_DECLARE(void) wbxml_encoder_set_xml_gen_type(WBXMLEncoder *encoder, WBXMLEncoderXMLGenType gen_type);
00124 
00130 WBXML_DECLARE(void) wbxml_encoder_set_indent(WBXMLEncoder *encoder, WB_UTINY indent);
00131 
00132 
00133 /* Encoding Functions */
00134 
00141 WBXML_DECLARE(void) wbxml_encoder_set_tree(WBXMLEncoder *encoder, WBXMLTree *tree);
00142 
00151 WBXML_DECLARE(WBXMLError) wbxml_encoder_encode_to_wbxml(WBXMLEncoder *encoder, WB_UTINY **wbxml, WB_ULONG *wbxml_len);
00152 
00160 WBXML_DECLARE(WBXMLError) wbxml_encoder_encode_to_xml(WBXMLEncoder *encoder, WB_UTINY **xml);
00161 
00164 #ifdef __cplusplus
00165 }
00166 #endif /* __cplusplus */
00167 
00168 #endif /* WBXML_ENCODER_H */

Generated on Mon Nov 24 20:09:42 2003 for WBXML Library by doxygen1.3-rc1