Lumiera  0.pre.03
»edit your freedom«
config-interface.h
Go to the documentation of this file.
1 /*
2  CONFIG-INTERFACE.h - Lumiera configuration interface
3 
4  Copyright (C) Lumiera.org
5  2008, Christian Thaeter <ct@pipapo.org>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
37 #ifndef LUMIERA_CONFIG_INTERFACE_H
38 #define LUMIERA_CONFIG_INTERFACE_H
39 
40 
41 #include "common/interface.h"
42 
43 
44 
45 void
46 lumiera_config_interface_init (void);
47 
48 void
49 lumiera_config_interface_destroy (void);
50 
51 /*
52  Note that some interfaces return ints rather than underlying opaque pointers, this is then the truth value of the pointer
53  */
54 
55 LUMIERA_INTERFACE_DECLARE (lumieraorg_configuration, 0,
56  LUMIERA_INTERFACE_SLOT (int, load, (const char* file)),
57  LUMIERA_INTERFACE_SLOT (int, save, (void)),
58  LUMIERA_INTERFACE_SLOT (int, purge, (const char* filename)),
59  LUMIERA_INTERFACE_SLOT (void, dump, (FILE* out)),
60  LUMIERA_INTERFACE_SLOT (int, setdefault, (const char* line)),
61  LUMIERA_INTERFACE_SLOT (int, reset, (const char* key)),
62  LUMIERA_INTERFACE_SLOT (int, info, (const char* key, const char** filename, unsigned* line)),
63 
64  LUMIERA_INTERFACE_SLOT (const char*, wordlist_get_nth, (const char* key, unsigned nth, const char* delims)),
65  LUMIERA_INTERFACE_SLOT (int, wordlist_find, (const char* key, const char* value, const char* delims)),
66  LUMIERA_INTERFACE_SLOT (int, wordlist_replace,
67  (const char* key, const char* value, const char* subst1, const char* subst2, const char* delims)),
68  LUMIERA_INTERFACE_SLOT (int, wordlist_add, (const char* key, const char* value, const char* delims)),
69 
70  LUMIERA_INTERFACE_SLOT (int, link_get, (const char* key, const char** value)),
71  LUMIERA_INTERFACE_SLOT (int, link_set, (const char* key, const char** value)),
72  LUMIERA_INTERFACE_SLOT (int, number_get, (const char* key, long long* value)),
73  LUMIERA_INTERFACE_SLOT (int, number_set, (const char* key, long long* value)),
74  LUMIERA_INTERFACE_SLOT (int, real_get, (const char* key, long double* value)),
75  LUMIERA_INTERFACE_SLOT (int, real_set, (const char* key, long double* value)),
76  LUMIERA_INTERFACE_SLOT (int, string_get, (const char* key, const char** value)),
77  LUMIERA_INTERFACE_SLOT (int, string_set, (const char* key, const char** value)),
78  LUMIERA_INTERFACE_SLOT (int, wordlist_get, (const char* key, const char** value)),
79  LUMIERA_INTERFACE_SLOT (int, wordlist_set, (const char* key, const char** value)),
80  LUMIERA_INTERFACE_SLOT (int, word_get, (const char* key, const char** value)),
81  LUMIERA_INTERFACE_SLOT (int, word_set, (const char* key, const char** value)),
82  LUMIERA_INTERFACE_SLOT (int, bool_get, (const char* key, int* value)),
83  LUMIERA_INTERFACE_SLOT (int, bool_set, (const char* key, int* value)),
84  );
85 
86 
87 #endif
88 /*
89 // Local Variables:
90 // mode: C
91 // c-file-style: "gnu"
92 // indent-tabs-mode: nil
93 // End:
94 */
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition: interface.h:163
Lumiera interface macros and structures.