blob: 0a08c31acf7a54a951d2e682c76586c39f492a34 [file] [log] [blame]
b.liu8583dce2024-04-03 13:30:08 +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#if UCI_SUPPORT
20 static int uci_get_value(struct uci_option *o, char *out_buf);
21#endif //uci_support
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
32
33int lynq_load_config(char *filename);
34
35#ifdef __cplusplus
36}
37#endif
38#endif