forked from 360trev/ME7Sum
-
Notifications
You must be signed in to change notification settings - Fork 19
/
inifile_prop.h
50 lines (38 loc) · 962 Bytes
/
inifile_prop.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef INIFILE_PROP_H
#define INIFILE_PROP_H
#include <stdint.h>
#include "inifile/inifile.h"
#ifdef __cplusplus
extern "C" {
#endif
#define END_LIST -1
#define GET_VALUE 1
#define GET_STRING 2
typedef struct PropertyListItem {
int attr_type;
uint32_t *attr_adr;
const char *attr_path;
const char *attr_name;
const char *attr_default;
} PropertyListItem;
typedef struct InfoItem {
uint32_t off;
uint32_t len;
} InfoItem;
typedef struct InfoListItem {
const char *label;
int attr_type;
InfoItem *item;
const char *attr_path;
const char *attr_name;
const char *attr_default;
const char *attr_default_len;
} InfoListItem;
uint32_t get_property_value(struct section *sections, const char *sectname, const char *propname, const char *def);
int process_properties_list(struct section *osconfig, PropertyListItem *ci);
int process_info_list(struct section *osconfig, InfoListItem *ci);
#ifdef __cplusplus
}
#endif
#endif
// vim:ts=4:sw=4