updated Doxyfile
[strongswan.git] / src / charon / plugins / uci / uci_parser.h
1 /*
2 * Copyright (C) 2008 Martin Willi
3 * Copyright (C) 2008 Thomas Kallenberg
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * $Id$
17 */
18
19 /**
20 * @defgroup uci_parser_t uci_parser
21 * @{ @ingroup uci
22 */
23
24 #ifndef UCI_PARSER_H_
25 #define UCI_PARSER_H_
26
27 #include <utils/enumerator.h>
28
29 typedef struct uci_parser_t uci_parser_t;
30
31 /**
32 * Wrapper to parse UCI sections with an enumerator.
33 */
34 struct uci_parser_t {
35
36 /**
37 * Create an enumerator over a section.
38 *
39 * The enumerator returns a section name followed by values for the keywords
40 * specified in the variable argument list of this function.
41 *
42 * @param ... variable argument list with keywords, NULL terminated
43 * @return enumerator over sections
44 */
45 enumerator_t* (*create_section_enumerator)(uci_parser_t *this, ...);
46
47 /**
48 * Destroy the parser.
49 */
50 void (*destroy)(uci_parser_t *this);
51 };
52
53 /**
54 * Create a UCI parser.
55 *
56 * @param package UCI package this parser should read
57 * @return parser context
58 */
59 uci_parser_t *uci_parser_create(char *package);
60
61 #endif /** UCI_PARSER_H_ @}*/