LIRC libraries LinuxInfraredRemoteControl

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

- File List
- Globals

lirc_options.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** options.h ***************************************************************
3 ****************************************************************************/
4
12 #ifndef LIRC_OPTIONS
13 #define LIRC_OPTIONS
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 #include "lirc_log.h"
20 #include "ciniparser.h"
21
22 /* Global options instance with all option values. */
23 extern dictionary* lirc_options;
24
25 /* Set given option to value (always a string). */
26 void options_set_opt(const char* key, const char* value);
27
29 loglevel_t options_set_loglevel(const char* optarg);
30
31 /* Get a [string|int|boolean] option with 0 as default value. */
32 const char* options_getstring(const char* const key);
33 int options_getint(const char* const key);
34 int options_getboolean(const char* const key);
35
36
37 /*
38 * Set unset options using values in defaults list.
39 * Arguments:
40 * - defaults: NULL-terminated list of key, value [, key, value]...
41 */
42 void options_add_defaults(const char* const defaults[]);
43
44
45 /*
46 * Parse global option file and command line. On exit, all values
47 * @ingroup private_api
48 * are set, possibly to defaults.
49 * Arguments:
50 * - argc, argv; As handled to main()
51 * - options-file: Path to options file. If NULL, the default one
52 * will be used.
53 * - options_load: Function called as options_load(argc, argv, path).
54 * argc and argv are as given to options_init; path is the absolute
55 * path to the configuration file.
56 *
57 */
58 void options_load(int argc,
59 char** const argv,
60 const char* options_file,
61 void (*options_load)(int, char** const));
62
63
64 /* Reset options to pristine state. */
65 void options_unload(void);
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif
lirc_log.h
Logging functionality.
loglevel_t
loglevel_t
Definition: lirc_log.h:36
options_set_loglevel
loglevel_t options_set_loglevel(const char *optarg)
Definition: lirc_options.c:38
_dictionary_
Dictionary object.
Definition: dictionary.h:67
ciniparser.h
Parser for ini files.