]> pilppa.org Git - libplp.git/blobdiff - src/private/uci_config.h
api fixes and cleanups
[libplp.git] / src / private / uci_config.h
diff --git a/src/private/uci_config.h b/src/private/uci_config.h
new file mode 100644 (file)
index 0000000..c06e725
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * uci_config.h
+ *
+ *  Created on: Aug 2, 2012
+ *      Author: lamikr
+ */
+
+#ifndef UCI_CONFIG_H_
+#define UCI_CONFIG_H_
+
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <uci.h>
+#include <stdbool.h>
+
+#ifdef __cplusplus
+extern "C"
+#endif
+int uci_create_named_section(struct uci_context *ctx,
+                               const char *conf_fname_base,    /* filename without directories */
+                               const char *section_type,
+                               const char *section_name,
+                               bool save_immediately);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+bool uci_set_config_value(struct uci_context *ctx,
+                       struct uci_package *pkg,
+                       const char *conf_fname_base,
+                       const char *conf_fname_full,
+                       const char *section_type,
+                       const char *section_name,
+                       const char *key,
+                       const char *value,
+                       const bool save_immediately);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+char *uci_get_config_value(struct uci_context *ctx,
+                       struct uci_package *pkg,
+                       const char *section_name,
+                       const char *key_name);
+
+#ifdef __cplusplus
+extern "C"
+#endif
+bool uci_save_config_values(struct uci_context *ctx,
+                       struct uci_package *pkg);
+
+#endif /* UCI_CONFIG_H_ */