Haka: include/haka/parameters.h Source File

Haka

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

parameters.h
Go to the documentation of this file.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
12 #ifndef HAKA_PARAMETERS_H
13 #define HAKA_PARAMETERS_H
14
15 #include <stddef.h>
16 #include <haka/types.h>
17
18
19 struct parameters;
25 struct parameters *parameters_open(const char *file);
26
30 struct parameters *parameters_create();
31
35 void parameters_free(struct parameters *params);
36
40 int parameters_open_section(struct parameters *params, const char *section);
41
45 int parameters_close_section(struct parameters *params);
46
50 const char *parameters_get_string(struct parameters *params, const char *key, const char *def);
51
55 bool parameters_get_boolean(struct parameters *params, const char *key, bool def);
56
60 int parameters_get_integer(struct parameters *params, const char *key, int def);
61
65 bool parameters_set_string(struct parameters *params, const char *key, const char *value);
66
70 bool parameters_set_boolean(struct parameters *params, const char *key, bool value);
71
75 bool parameters_set_integer(struct parameters *params, const char *key, int value);
76
77
78 #endif /* HAKA_PARAMETERS_H */
types.h
parameters_open_section
int parameters_open_section(struct parameters *params, const char *section)
Definition: parameters.c:77
parameters_set_string
bool parameters_set_string(struct parameters *params, const char *key, const char *value)
Definition: parameters.c:151
parameters_free
void parameters_free(struct parameters *params)
Definition: parameters.c:69
parameters_create
struct parameters * parameters_create()
Definition: parameters.c:47
parameters_get_string
const char * parameters_get_string(struct parameters *params, const char *key, const char *def)
Definition: parameters.c:118
parameters_get_integer
int parameters_get_integer(struct parameters *params, const char *key, int def)
Definition: parameters.c:140
parameters_set_integer
bool parameters_set_integer(struct parameters *params, const char *key, int value)
Definition: parameters.c:163
parameters_close_section
int parameters_close_section(struct parameters *params)
Definition: parameters.c:89
parameters_set_boolean
bool parameters_set_boolean(struct parameters *params, const char *key, bool value)
Definition: parameters.c:157
parameters_open
struct parameters * parameters_open(const char *file)
Definition: parameters.c:23
parameters_get_boolean
bool parameters_get_boolean(struct parameters *params, const char *key, bool def)
Definition: parameters.c:129