b.liu | 8583dce | 2024-04-03 13:30:08 +0800 | [diff] [blame] | 1 | #ifndef _LYNQ_UCI_H_
|
| 2 | #define _LYNQ_UCI_H_
|
| 3 |
|
| 4 | #ifdef __cplusplus
|
| 5 | extern "C" {
|
| 6 | #endif
|
| 7 |
|
| 8 | #include <uci.h>
|
| 9 |
|
| 10 | #define LYNQ_UCI_MAX_LEN 128
|
| 11 | #define LYNQ_UCI_SUCCESS 0
|
| 12 | #define LYNQ_UCI_ERROR 1
|
| 13 | #define LYNQ_UCI_FILE "lynq_uci"
|
| 14 | #define LYNQ_UCI_RO_FILE "lynq_uci_ro"
|
| 15 |
|
| 16 | //static struct uci_context * ctx = NULL;
|
| 17 |
|
| 18 | int lynq_del(char *option);
|
| 19 | #if UCI_SUPPORT
|
| 20 | static int uci_get_value(struct uci_option *o, char *out_buf);
|
| 21 | #endif //uci_support
|
| 22 | int lynq_uci_get(const char *arg, char *out_buf);
|
| 23 |
|
| 24 | int lynq_uci_set(const char *arg);
|
| 25 |
|
| 26 | int lynq_add_section(char *section_type, char *section);
|
| 27 |
|
| 28 | int lynq_set_value(char *section, char *key, char *value);
|
| 29 |
|
| 30 | int lynq_get_value(char *file, char *section, char *key, char *tmp);
|
| 31 |
|
| 32 |
|
| 33 | int lynq_load_config(char *filename);
|
| 34 |
|
| 35 | #ifdef __cplusplus
|
| 36 | }
|
| 37 | #endif
|
| 38 | #endif
|