/usr/include/wbxml_parser.h is in libwbxml2-dev 0.10.7-1+b2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | /*
* libwbxml, the WBXML Library.
* Copyright (C) 2002-2008 Aymerick Jehanne <aymerick@jehanne.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* LGPL v2.1: http://www.gnu.org/copyleft/lesser.txt
*
* Contact: aymerick@jehanne.org
* Home: http://libwbxml.aymerick.com
*/
/**
* @file wbxml_parser.h
* @ingroup wbxml_parser
*
* @author Aymerick Jehanne <aymerick@jehanne.org>
* @date 02/03/12
*
* @brief WBXML Parser - Parse a WBXML document and call user defined Callbacks
*/
#ifndef WBXML_PARSER_H
#define WBXML_PARSER_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** @addtogroup wbxml_parser
* @{
*/
/**
* Default charset of the WBXML document. Used only in this case :
* - No charset found in WBXML document
* - No charset was indicated thanks to the function 'wbxml_parser_set_meta_charset()'
*/
#define WBXML_PARSER_DEFAULT_CHARSET WBXML_CHARSET_UTF_8
typedef struct WBXMLParser_s WBXMLParser;
/**
* @brief Create a WBXML Parser
* @return Return the newly created WBXMLParser, or NULL if not enough memory
*/
WBXML_DECLARE(WBXMLParser *) wbxml_parser_create(void);
/**
* @brief Destroy a WBXML Parser
* @param parser The WBXMLParser to destroy
*/
WBXML_DECLARE(void) wbxml_parser_destroy(WBXMLParser *parser);
/**
* @brief Parse a WBXML document, using User Defined callbacks
* @param parser The WBXML Parser to use for parsing
* @param wbxml The WBXML document to parse
* @param wbxml_len The WBXML document length
* @brief Return WBXML_OK if no error, an error code otherwise
*/
WBXML_DECLARE(WBXMLError) wbxml_parser_parse(WBXMLParser *parser, WB_UTINY *wbxml, WB_ULONG wbxml_len);
/**
* @brief Set User Data for a WBXML Parser
* @param parser The WBXML Parser
* @param user_data User data (returned as a parameter in every Content Handler callbacks)
*/
WBXML_DECLARE(void) wbxml_parser_set_user_data(WBXMLParser *parser, void *user_data);
/**
* @brief Set Content Handler for a WBXML Parser
* @param parser The WBXML Parser
* @param content_handler The Content Handler structure
*/
WBXML_DECLARE(void) wbxml_parser_set_content_handler(WBXMLParser *parser, WBXMLContentHandler *content_handler);
/**
* @brief Set Main WBXML Languages Table
* @param parser The WBXML Parser
* @param main_table The Main WBXML Languages Table to set
*/
WBXML_DECLARE(void) wbxml_parser_set_main_table(WBXMLParser *parser, const WBXMLLangEntry *main_table);
/**
* @brief Force to parse the Document of a given Language
* @param parser The WBXML Parser
* @param lang The Language
* @return TRUE if Language is set, FALSE otherwise
* @note This permits to force the WBXML Parser to parse a WBXML Document of a given LanguageD.
* If this fonction is used, the internal Public ID of the WBXML Document is ignored.
* It is sometimes needed for documents that don't have any WBXML Public ID.
*/
WBXML_DECLARE(WB_BOOL) wbxml_parser_set_language(WBXMLParser *parser, WBXMLLanguage lang);
/**
* @brief Set additionnal meta-information to help determining the Charset Encoding of the Document to parse
* @param parser The WBXML Parser
* @param charset The Charset MIBEnum
* @return TRUE if Charset is set, FALSE otherwise
* @note This information is only used if the Charset Encoding is not specified in WBXML Document:
* "The binary XML format contains a representation of the XML document character encoding.
* This is the WBXML equivalent of the XML document format encoding attribute,
* which is specified in the ?xml processing instruction ... In the case of
* an unknown encoding, transport meta-information should be used to determine the character
* encoding. If transport meta-information is unavailable, the default encoding of UTF-8
* should be assumed."
*/
WBXML_DECLARE(WB_BOOL) wbxml_parser_set_meta_charset(WBXMLParser *parser, WBXMLCharsetMIBEnum charset);
/**
* @brief Get WBXML Public ID
* @param parser The WBXML Parser
* @return The WBXML Public ID of current parsing document
*/
WBXML_DECLARE(WB_ULONG) wbxml_parser_get_wbxml_public_id(WBXMLParser *parser);
/**
* @brief Get XML Public ID
* @param parser The WBXML Parser
* @return The XML Public ID of current parsing document, or NULL if not found
*/
WBXML_DECLARE(const WB_UTINY *) wbxml_parser_get_xml_public_id(WBXMLParser *parser);
/**
* @brief Get WBXML Version
* @param parser The WBXML Parser
* @return The WBXML Version of current parsing document
*/
WBXML_DECLARE(WBXMLVersion) wbxml_parser_get_wbxml_version(WBXMLParser *parser);
/**
* @brief Return current parsing position in WBXML
* @param parser The WBXML Parser
* @return The parsing position in WBXML
*/
WBXML_DECLARE(WB_LONG) wbxml_parser_get_current_byte_index(WBXMLParser *parser);
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* WBXML_PARSER_H */
|