diff options
Diffstat (limited to 'apps/plugins/lib/configfile.h')
-rw-r--r-- | apps/plugins/lib/configfile.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/plugins/lib/configfile.h b/apps/plugins/lib/configfile.h index 0804a5930d..5dc31735a3 100644 --- a/apps/plugins/lib/configfile.h +++ b/apps/plugins/lib/configfile.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define TYPE_INT 1 | 24 | #define TYPE_INT 1 |
25 | #define TYPE_ENUM 2 | 25 | #define TYPE_ENUM 2 |
26 | #define TYPE_STRING 3 | 26 | #define TYPE_STRING 3 |
27 | #define TYPE_BOOL 4 | ||
27 | 28 | ||
28 | struct configdata | 29 | struct configdata |
29 | { | 30 | { |
@@ -31,12 +32,14 @@ struct configdata | |||
31 | int min; /* Min value for integers, should be 0 for enums */ | 32 | int min; /* Min value for integers, should be 0 for enums */ |
32 | int max; /* Max value for enums and integers, | 33 | int max; /* Max value for enums and integers, |
33 | buffer size for strings */ | 34 | buffer size for strings */ |
34 | int *val; /* Pointer to integer/enum value, | 35 | union |
35 | NULL if the item is a string */ | 36 | { |
37 | int *int_p; | ||
38 | bool *bool_p; | ||
39 | char *string; | ||
40 | }; /* Pointer to value, a union of the possible types */ | ||
36 | char *name; /* Pointer to the name of the item */ | 41 | char *name; /* Pointer to the name of the item */ |
37 | char **values; /* List of strings for enums, NULL if not enum */ | 42 | char **values; /* List of strings for enums, NULL if not enum */ |
38 | char *string; /* Pointer to a string buffer if the item is a string, | ||
39 | NULL otherwise */ | ||
40 | }; | 43 | }; |
41 | 44 | ||
42 | /* configfile_save - Given configdata entries this function will | 45 | /* configfile_save - Given configdata entries this function will |