X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=ucimap.h;h=d9aa2d9e957d982a4430a673d9e91c0f66f4b7c9;hp=ccd6127bcd4a9ac164fdb55ab54d82638f8a5090;hb=2a8229347cfc804196648cf601a2a275f5d89ade;hpb=f85abaa9f87af0d3ab54c33f3ef1a98784d84e83 diff --git a/ucimap.h b/ucimap.h index ccd6127..d9aa2d9 100644 --- a/ucimap.h +++ b/ucimap.h @@ -11,6 +11,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#ifndef __UCIMAP_H +#define __UCIMAP_H + #include #include "uci_list.h" #include "uci.h" @@ -68,6 +71,11 @@ enum ucimap_type { UCIMAP_SECTION = 0x3, UCIMAP_CUSTOM = 0x4, UCIMAP_SUBTYPE = 0xf, /* subtype mask */ + + /* automatically create lists from + * options with space-separated items */ + UCIMAP_LIST_AUTO = 0x0100, + UCIMAP_FLAGS = 0xff00, /* flags mask */ }; union ucimap_data { @@ -157,4 +165,6 @@ extern void ucimap_cleanup(struct uci_map *map); extern void ucimap_set_changed(struct ucimap_section_data *sd, void *field); extern int ucimap_store_section(struct uci_map *map, struct uci_package *p, struct ucimap_section_data *sd); extern void ucimap_parse(struct uci_map *map, struct uci_package *pkg); +extern int ucimap_parse_section(struct uci_map *map, struct uci_sectionmap *sm, struct ucimap_section_data *sd, struct uci_section *s); +#endif