Hybrid ICN (hICN) plugin  v21.06-rc0-4-g18fa668
oconfig.h
1 
27 #ifndef OCONFIG_H
28 #define OCONFIG_H 1
29 
30 #include <stdio.h>
31 
32 /*
33  * Types
34  */
35 #define OCONFIG_TYPE_STRING 0
36 #define OCONFIG_TYPE_NUMBER 1
37 #define OCONFIG_TYPE_BOOLEAN 2
38 
40  union {
41  char *string;
42  double number;
43  int boolean;
44  } value;
45  int type;
46 };
47 typedef struct oconfig_value_s oconfig_value_t;
48 
49 struct oconfig_item_s;
50 typedef struct oconfig_item_s oconfig_item_t;
52  char *key;
53  oconfig_value_t *values;
54  int values_num;
55 
56  oconfig_item_t *parent;
57  oconfig_item_t *children;
58  int children_num;
59 };
60 
61 /*
62  * Functions
63  */
64 oconfig_item_t *oconfig_parse_file(const char *file);
65 
66 oconfig_item_t *oconfig_clone(const oconfig_item_t *ci);
67 
68 void oconfig_free(oconfig_item_t *ci);
69 
70 #endif /* OCONFIG_H */
oconfig_value_s
Definition: oconfig.h:39
oconfig_item_s
Definition: oconfig.h:51