-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgzw_options.h
37 lines (30 loc) · 1.21 KB
/
gzw_options.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
#ifndef GOOPENZWAVE_OPTIONS
#define GOOPENZWAVE_OPTIONS
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "gzw_loglevel.h"
#ifdef __cplusplus
extern "C" {
#endif
// Types.
typedef void* options_t;
// Static public member functions.
options_t options_create(const char* configPath, const char* userPath, const char* commandLine);
bool options_destroy();
options_t options_get();
// Public member functions.
bool options_lock(options_t o);
bool options_addOptionBool(options_t o, const char* name, bool value);
bool options_addOptionInt(options_t o, const char* name, int32_t value);
bool options_addOptionLogLevel(options_t o, const char* name, loglevel_t level);
bool options_addOptionString(options_t o, const char* name, const char* value, bool append);
bool options_getOptionAsBool(options_t o, const char* name, bool* o_value);
bool options_getOptionAsInt(options_t o, const char* name, int32_t* o_value);
bool options_getOptionAsString(options_t o, const char* name, char **o_value);
//TODO OptionType options_getOptionType(string const &_name);
bool options_areLocked(options_t o);
#ifdef __cplusplus
}
#endif
#endif // define GOOPENZWAVE_OPTIONS