root/src/noit_conf.h

Revision e102af344eb4afacdeeb549fb60d77715f815a53, 2.0 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 7 years ago)

modules actually load now.

  • Property mode set to 100644
Line 
1 /*
2  * Copyright (c) 2007, OmniTI Computer Consulting, Inc.
3  * All rights reserved.
4  */
5
6 #ifndef _NOIT_CONF_H
7 #define _NOIT_CONF_H
8
9 #include "noit_defines.h"
10 #include "utils/noit_hash.h"
11
12 typedef enum { noit_true, noit_false } noit_conf_boolean;
13 typedef void * noit_conf_section_t;
14
15 API_EXPORT(void) noit_conf_init();
16 API_EXPORT(int) noit_conf_load(const char *path);
17 API_EXPORT(int) noit_conf_save(const char *path);
18
19 API_EXPORT(noit_conf_section_t)
20   noit_conf_get_section(noit_conf_section_t section, const char *path);
21 API_EXPORT(noit_conf_section_t *)
22   noit_conf_get_sections(noit_conf_section_t section, const char *path,
23                          int *cnt);
24
25 API_EXPORT(noit_hash_table *)
26   noit_conf_get_hash(noit_conf_section_t section, const char *path);
27
28 API_EXPORT(int) noit_conf_get_string(noit_conf_section_t section,
29                                      const char *path, char **value);
30 API_EXPORT(int) noit_conf_get_stringbuf(noit_conf_section_t section,
31                                         const char *path, char *value, int len);
32 API_EXPORT(int) noit_conf_get_int(noit_conf_section_t section,
33                                   const char *path, int *value);
34 API_EXPORT(int) noit_conf_get_float(noit_conf_section_t section,
35                                     const char *path, float *value);
36 API_EXPORT(int) noit_conf_get_boolean(noit_conf_section_t section,
37                                       const char *path, noit_conf_boolean *value);
38
39 API_EXPORT(int) noit_conf_set_string(noit_conf_section_t section,
40                                      const char *path, const char *value);
41 API_EXPORT(int) noit_conf_set_int(noit_conf_section_t section,
42                                   const char *path, int value);
43 API_EXPORT(int) noit_conf_set_float(noit_conf_section_t section,
44                                     const char *path, float value);
45 API_EXPORT(int) noit_conf_set_boolean(noit_conf_section_t section,
46                                       const char *path, noit_conf_boolean value);
47
48 #endif
Note: See TracBrowser for help on using the browser.