blob: 904ff2b05c60cf9c25ee207ef27011444828ebb6 [file] [log] [blame]
you.chen5ef374a2023-12-26 17:25:16 +08001#ifndef _LYNQ_UCI_H_
2#define _LYNQ_UCI_H_
3
4#ifdef __cplusplus
5extern "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
18int lynq_del(char *option);
19
20static int uci_get_value(struct uci_option *o, char *out_buf);
21
22int lynq_uci_get(const char *arg, char *out_buf);
23
24int lynq_uci_set(const char *arg);
25
26int lynq_add_section(char *section_type, char *section);
27
28int lynq_set_value(char *section, char *key, char *value);
29
30int lynq_get_value(char *file, char *section, char *key, char *tmp);
31
32int lynq_load_config(char *filename);
33
34#ifdef __cplusplus
35}
36#endif
37#endif