]> pilppa.org Git - libplp.git/blob - src/private/uci_config.h
api fixes and cleanups
[libplp.git] / src / private / uci_config.h
1 /*
2  * uci_config.h
3  *
4  *  Created on: Aug 2, 2012
5  *      Author: lamikr
6  */
7
8 #ifndef UCI_CONFIG_H_
9 #define UCI_CONFIG_H_
10
11 #include <string.h>
12 #include <errno.h>
13 #include <stdlib.h>
14 #include <unistd.h>
15 #include <uci.h>
16 #include <stdbool.h>
17
18 #ifdef __cplusplus
19 extern "C"
20 #endif
21 int uci_create_named_section(struct uci_context *ctx,
22                                 const char *conf_fname_base,    /* filename without directories */
23                                 const char *section_type,
24                                 const char *section_name,
25                                 bool save_immediately);
26
27 #ifdef __cplusplus
28 extern "C"
29 #endif
30 bool uci_set_config_value(struct uci_context *ctx,
31                         struct uci_package *pkg,
32                         const char *conf_fname_base,
33                         const char *conf_fname_full,
34                         const char *section_type,
35                         const char *section_name,
36                         const char *key,
37                         const char *value,
38                         const bool save_immediately);
39
40 #ifdef __cplusplus
41 extern "C"
42 #endif
43 char *uci_get_config_value(struct uci_context *ctx,
44                         struct uci_package *pkg,
45                         const char *section_name,
46                         const char *key_name);
47
48 #ifdef __cplusplus
49 extern "C"
50 #endif
51 bool uci_save_config_values(struct uci_context *ctx,
52                         struct uci_package *pkg);
53
54 #endif /* UCI_CONFIG_H_ */