2 * Copyright (C) 2008 Martin Willi
3 * Copyright (C) 2008 Thomas Kallenberg
4 * Hochschule fuer Technik Rapperswil
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>.
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
20 * @defgroup uci_parser_t uci_parser
27 #include <utils/enumerator.h>
29 typedef struct uci_parser_t uci_parser_t
;
32 * Wrapper to parse UCI sections with an enumerator.
37 * Create an enumerator over a section.
39 * The enumerator returns a section name followed by values for the keywords
40 * specified in the variable argument list of this function.
42 * @param ... variable argument list with keywords, NULL terminated
43 * @return enumerator over sections
45 enumerator_t
* (*create_section_enumerator
)(uci_parser_t
*this, ...);
50 void (*destroy
)(uci_parser_t
*this);
54 * Create a UCI parser.
56 * @param package UCI package this parser should read
57 * @return parser context
59 uci_parser_t
*uci_parser_create(char *package
);
61 #endif /* UCI_PARSER_H_ @}*/