This file is indexed.

/usr/include/wbxml_elt.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
/*
 * 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_elt.h
 * @ingroup wbxml_elt
 *
 * @author Aymerick Jehanne <aymerick@jehanne.org>
 * @date 03/02/22
 *
 * @brief WBXML Elements
 */

#ifndef WBXML_ELT_H
#define WBXML_ELT_H


#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/** @addtogroup wbxml_elt 
 *  @{ 
 */

/**
 * @brief WBXML Value Type
 */
typedef enum WBXMLValueType_e {
    WBXML_VALUE_TOKEN = 0, /**< WBXML Token value */
    WBXML_VALUE_LITERAL    /**< WBXML Literal value */
} WBXMLValueType;


/** @brief WBXML Tag structure */
typedef struct WBXMLTag_s {
    WBXMLValueType type;   /**< Tag Type (Token or Literal) */
    union {
        const WBXMLTagEntry *token;   /**< Token Tag (MUST be const structure, ie from wbxml_tables.c) */
        WBXMLBuffer         *literal; /**< Literal Tag (MUST be dynamically allocated WBXMLBuffer) */
    } u;
} WBXMLTag;


/** @brief WBXML Attribute Name structure */
typedef struct WBXMLAttributeName_s {
    WBXMLValueType type;   /**< Attribute Name Type (Token or Literal) */
    union {
        const WBXMLAttrEntry *token;   /**< Token Attribute Name (MUST be const structure, ie from wbxml_tables.c) */
        WBXMLBuffer          *literal; /**< Literal Attribute Name (MUST be dynamically allocated WBXMLBuffer) */
    } u;
} WBXMLAttributeName;


/** 
 * @brief WBXML Attribute structure 
 * @note The 'value' part contain the FULL attribute value
 *  For example, with the attribute: url="http://127.0.0.1/"
 *  If the 'name' part is this:
 *      - name->u.token->wbxmlCodePage: 0x00
 *      - name->u.token->wbxmlToken : 0x4b
 *      - name->u.token->xmlName : "url"
 *      - name->u.token->xmlValue: "http://"
 *
 *  Then, 'value' is still: "http://127.0.0.1/"
 *
 *  Of course (in this example) it should be better to have the wbxmlToken 0x4a ("url" / NULL). So you mustn't take into
 *  account the 'xmlValue' field for 'name' to get the Attribute Value of this Attribute.
 */
typedef struct WBXMLAttribute_s {
    WBXMLAttributeName *name;  /**< Attribute Name */
    WBXMLBuffer        *value; /**< Full Attribute Value */
} WBXMLAttribute;


/****************************************************
 *    WBXML Elt Functions
 */

/* WBXMLTag */

/**
 * @brief Create a Tag structure
 * @param type WBXML Value Type
 * @return The newly created Tag, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLTag *) wbxml_tag_create(WBXMLValueType type);

/**
 * @brief Additional function to create directly a Token Tag structure
 * @param value The WBXMLTagEntry value
 * @return The newly created Tag, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLTag *) wbxml_tag_create_token(const WBXMLTagEntry *value);

/**
 * @brief Additional function to create directly a Literal Tag structure
 * @param value The Literal value
 * @return The newly created Tag, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLTag *) wbxml_tag_create_literal(WB_UTINY *value);

/**
 * @brief Destroy a Tag structure
 * @param tag The Tag structure to destroy
 */
WBXML_DECLARE(void) wbxml_tag_destroy(WBXMLTag *tag);

/**
 * @brief Duplicate a Tag structure
 * @param tag The Tag structure to duplicate
 * @return The duplicated Tag structure, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLTag *) wbxml_tag_duplicate(WBXMLTag *tag);

/**
 * @brief Get the XML Name of a WBXML Tag
 * @param tag The WBXML Tag
 * @return The XML Name, or "unknown" if not found
 */
WBXML_DECLARE(const WB_UTINY *) wbxml_tag_get_xml_name(WBXMLTag *tag);


/* WBXMLAttributeName */

/**
 * @brief Create an Attribute Name structure
 * @param type WBXML Value Type
 * @return The newly created Attribute Name, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLAttributeName *) wbxml_attribute_name_create(WBXMLValueType type);

/**
 * @brief Additional function to create directly a Token Attribute Name structure
 * @param value The WBXMLTagEntry value
 * @return The newly created Attribute Name, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLAttributeName *) wbxml_attribute_name_create_token(const WBXMLAttrEntry *value);

/**
 * @brief Additional function to create directly a Literal Attribute Name structure
 * @param value The Literal value
 * @return The newly created Attribute Name, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLAttributeName *) wbxml_attribute_name_create_literal(WB_UTINY *value);

/**
 * @brief Destroy an Attribute Name structure
 * @param name The Attribute Name structure to destroy
 */
WBXML_DECLARE(void) wbxml_attribute_name_destroy(WBXMLAttributeName *name);

/**
 * @brief Duplicate a Attribute Name structure
 * @param name The Attribute Name structure to duplicate
 * @return The duplicated Attribute Name structure, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLAttributeName *) wbxml_attribute_name_duplicate(WBXMLAttributeName *name);

/**
 * @brief Get the XML Name of a WBXML Attribute Name
 * @param name The WBXML Attribute Name
 * @return The XML Name, or "unknown" if not found
 */
WBXML_DECLARE(const WB_UTINY *) wbxml_attribute_name_get_xml_name(WBXMLAttributeName *name);


/* WBXMLAttribute */

/**
 * @brief Create an Attribute structure
 * @return The newly created Attribute, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLAttribute *) wbxml_attribute_create(void);

/**
 * @brief Destroy an Attribute structure
 * @param attr The Attribute structure to destroy
 */
WBXML_DECLARE(void) wbxml_attribute_destroy(WBXMLAttribute *attr);

/**
 * @brief Destroy an Attribute structure (used for wbxml_list_destroy())
 * @param attr The Attribute structure to destroy
 */
WBXML_DECLARE_NONSTD(void) wbxml_attribute_destroy_item(void *attr);

/**
 * @brief Duplicate an Attribute structure
 * @param attr The Attribute structure to duplicate
 * @return The duplicated Attribute, or NULL if not enough memory
 */
WBXML_DECLARE(WBXMLAttribute *) wbxml_attribute_duplicate(WBXMLAttribute *attr);

/**
 * @brief Get the XML Attribute Name of a WBXML Attribute
 * @param attr The WBXML Attribute
 * @return The XML Attribute Name, or "unknown" if not found
 */
WBXML_DECLARE(const WB_UTINY *) wbxml_attribute_get_xml_name(WBXMLAttribute *attr);

/**
 * @brief Get the XML Attribute Value of a WBXML Attribute
 * @param attr The WBXML Attribute
 * @return The XML Attribute Value, or "" if none
 */
WBXML_DECLARE(const WB_UTINY *) wbxml_attribute_get_xml_value(WBXMLAttribute *attr);


/** @} */

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* WBXML_ELT_H */