X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=uci.h;h=6dc00f177fd7af51a74eaef8918282fcd258c4b9;hp=d18095d988bdf1356dc2702e17e765a68d67359b;hb=854f7c5d08cd37aeb7414e26ed6666fad26f5f7a;hpb=3db7aea5f1e65b8b97b8a73ee19ae907e75a4b48 diff --git a/uci.h b/uci.h index d18095d..6dc00f1 100644 --- a/uci.h +++ b/uci.h @@ -50,6 +50,11 @@ struct uci_parse_context; extern struct uci_context *uci_alloc(void); /** + * uci_free: Free the uci context including all of its data + */ +extern void uci_free(struct uci_context *ctx); + +/** * uci_perror: Print the last uci error that occured * @ctx: uci context * @str: string to print before the error message @@ -62,15 +67,29 @@ extern void uci_perror(struct uci_context *ctx, const char *str); * @ctx: uci context * @name: name of the config file (relative to the config directory) */ -int uci_load(struct uci_context *ctx, const char *name); +extern int uci_load(struct uci_context *ctx, const char *name, struct uci_config **cfg); + +/** + * uci_unload: Unload a config file from the uci context + * + * @ctx: uci context + * @name: name of the config file + */ +extern int uci_unload(struct uci_context *ctx, const char *name); /** * uci_cleanup: Clean up after an error * * @ctx: uci context */ -int uci_cleanup(struct uci_context *ctx); +extern int uci_cleanup(struct uci_context *ctx); +/** + * uci_list_configs: List available uci config files + * + * @ctx: uci context + */ +extern char **uci_list_configs(struct uci_context *ctx); /* UCI data structures */