Apache HTTPD
structdata.h
Go to the documentation of this file.
1/* Interface to some helper routines used to accumulate and check
2 structured content.
3 __ __ _
4 ___\ \/ /_ __ __ _| |_
5 / _ \\ /| '_ \ / _` | __|
6 | __// \| |_) | (_| | |_
7 \___/_/\_\ .__/ \__,_|\__|
8 |_| XML parser
9
10 Copyright (c) 2017 Rhodri James <[email protected]>
11 Licensed under the MIT license:
12
13 Permission is hereby granted, free of charge, to any person obtaining
14 a copy of this software and associated documentation files (the
15 "Software"), to deal in the Software without restriction, including
16 without limitation the rights to use, copy, modify, merge, publish,
17 distribute, sublicense, and/or sell copies of the Software, and to permit
18 persons to whom the Software is furnished to do so, subject to the
19 following conditions:
20
21 The above copyright notice and this permission notice shall be included
22 in all copies or substantial portions of the Software.
23
24 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
27 NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
28 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
29 OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
30 USE OR OTHER DEALINGS IN THE SOFTWARE.
31*/
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#ifndef XML_STRUCTDATA_H
38# define XML_STRUCTDATA_H 1
39
40# include "expat.h"
41
42typedef struct {
43 const XML_Char *str;
44 int data0;
45 int data1;
46 int data2;
48
49typedef struct {
50 int count; /* Number of entries used */
51 int max_count; /* Number of StructDataEntry items in `entries` */
54
56
57void StructData_AddItem(StructData *storage, const XML_Char *s, int data0,
58 int data1, int data2);
59
61 int count);
62
64
65#endif /* XML_STRUCTDATA_H */
66
67#ifdef __cplusplus
68}
69#endif
char XML_Char
unsigned int count
Definition apr_md5.h:152
const char * s
Definition apr_strings.h:95
static const ap_slotmem_provider_t * storage
const XML_Char * str
Definition structdata.h:43
StructDataEntry * entries
Definition structdata.h:52
int max_count
Definition structdata.h:51
void StructData_Dispose(StructData *storage)
Definition structdata.c:148
void StructData_AddItem(StructData *storage, const XML_Char *s, int data0, int data1, int data2)
Definition structdata.c:80
void StructData_CheckItems(StructData *storage, const StructDataEntry *expected, int count)
Definition structdata.c:108
void StructData_Init(StructData *storage)
Definition structdata.c:72