Mercurial > audlegacy
annotate src/audacious/configdb.h @ 4670:1d7c8ecc353c
Fix some warnings.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sun, 29 Jun 2008 01:20:05 -0500 |
parents | 2eee464379dc |
children |
rev | line source |
---|---|
4557
2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents:
4444
diff
changeset
|
1 #ifndef AUDACIOUS_CONFIGDB_H |
2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents:
4444
diff
changeset
|
2 #define AUDACIOUS_CONFIGDB_H |
2313 | 3 |
4 #include <glib.h> | |
4444
db3a3f46a226
Okay, mf0102 was right .. but we need mcs >= 0.7 for this to actually work
Matti Hamalainen <ccr@tnsp.org>
parents:
4441
diff
changeset
|
5 #include <libmcs/mcs.h> |
2313 | 6 |
7 G_BEGIN_DECLS | |
8 | |
9 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
10 * cfg_db_open: |
2313 | 11 * |
12 * Opens the configuration database. | |
13 * | |
14 * Return value: A configuration database handle. | |
15 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
16 mcs_handle_t *cfg_db_open(); |
2313 | 17 |
18 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
19 * cfg_db_close: |
2313 | 20 * @db: A configuration database handle. |
21 * | |
22 * Closes the configuration database. | |
23 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
24 void cfg_db_close(mcs_handle_t *db); |
2313 | 25 |
26 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
27 * cfg_db_get_string: |
2313 | 28 * @db: A configuration database handle. |
29 * @section: The section of the configuration database to search. | |
30 * @key: The name of the field in the configuration database to look up. | |
31 * @value: Pointer to a buffer to put the data in. | |
32 * | |
33 * Searches the configuration database for a value. | |
34 * | |
35 * Return value: TRUE if successful, FALSE otherwise. | |
36 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
37 gboolean cfg_db_get_string(mcs_handle_t *db, |
2313 | 38 const gchar *section, |
39 const gchar *key, | |
40 gchar **value); | |
41 | |
42 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
43 * cfg_db_get_int: |
2313 | 44 * @db: A configuration database handle. |
45 * @section: The section of the configuration database to search. | |
46 * @key: The name of the field in the configuration database to look up. | |
47 * @value: Pointer to an integer to put the data in. | |
48 * | |
49 * Searches the configuration database for a value. | |
50 * | |
51 * Return value: TRUE if successful, FALSE otherwise. | |
52 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
53 gboolean cfg_db_get_int(mcs_handle_t *db, |
2313 | 54 const gchar *section, |
55 const gchar *key, | |
56 gint *value); | |
57 | |
58 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
59 * cfg_db_get_bool: |
2313 | 60 * @db: A configuration database handle. |
61 * @section: The section of the configuration database to search. | |
62 * @key: The name of the field in the configuration database to look up. | |
63 * @value: Pointer to a boolean to put the data in. | |
64 * | |
65 * Searches the configuration database for a value. | |
66 * | |
67 * Return value: TRUE if successful, FALSE otherwise. | |
68 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
69 gboolean cfg_db_get_bool(mcs_handle_t *db, |
2313 | 70 const gchar *section, |
71 const gchar *key, | |
72 gboolean *value); | |
73 | |
74 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
75 * cfg_db_get_float: |
2313 | 76 * @db: A configuration database handle. |
77 * @section: The section of the configuration database to search. | |
78 * @key: The name of the field in the configuration database to look up. | |
79 * @value: Pointer to a floating point integer to put the data in. | |
80 * | |
81 * Searches the configuration database for a value. | |
82 * | |
83 * Return value: TRUE if successful, FALSE otherwise. | |
84 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
85 gboolean cfg_db_get_float(mcs_handle_t *db, |
2313 | 86 const gchar *section, |
87 const gchar *key, | |
88 gfloat *value); | |
89 | |
90 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
91 * cfg_db_get_double: |
2313 | 92 * @db: A configuration database handle. |
93 * @section: The section of the configuration database to search. | |
94 * @key: The name of the field in the configuration database to look up. | |
95 * @value: Pointer to a double-precision floating point integer to put the data in. | |
96 * | |
97 * Searches the configuration database for a value. | |
98 * | |
99 * Return value: TRUE if successful, FALSE otherwise. | |
100 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
101 gboolean cfg_db_get_double(mcs_handle_t *db, |
2313 | 102 const gchar *section, |
103 const gchar *key, | |
104 gdouble *value); | |
105 | |
106 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
107 * cfg_db_set_string: |
2313 | 108 * @db: A configuration database handle. |
109 * @section: The section of the configuration database to search. | |
110 * @key: The name of the field in the configuration database to set. | |
111 * @value: Pointer to a buffer containing the data. | |
112 * | |
113 * Sets a value in the configuration database. | |
114 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
115 void cfg_db_set_string(mcs_handle_t *db, |
2313 | 116 const gchar *section, |
117 const gchar *key, | |
2346
0b98ad8c8b17
[svn] removed xmms_create_dirbrowser, small config db fixes
mf0102
parents:
2313
diff
changeset
|
118 const gchar *value); |
2313 | 119 |
120 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
121 * cfg_db_set_int: |
2313 | 122 * @db: A configuration database handle. |
123 * @section: The section of the configuration database to search. | |
124 * @key: The name of the field in the configuration database to set. | |
125 * @value: Pointer to an integer containing the data. | |
126 * | |
127 * Sets a value in the configuration database. | |
128 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
129 void cfg_db_set_int(mcs_handle_t *db, |
2313 | 130 const gchar *section, |
131 const gchar *key, | |
132 gint value); | |
133 | |
134 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
135 * cfg_db_set_bool: |
2313 | 136 * @db: A configuration database handle. |
137 * @section: The section of the configuration database to search. | |
138 * @key: The name of the field in the configuration database to set. | |
139 * @value: Pointer to a boolean containing the data. | |
140 * | |
141 * Sets a value in the configuration database. | |
142 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
143 void cfg_db_set_bool(mcs_handle_t *db, |
2313 | 144 const gchar *section, |
145 const gchar *key, | |
146 gboolean value); | |
147 | |
148 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
149 * cfg_db_set_float: |
2313 | 150 * @db: A configuration database handle. |
151 * @section: The section of the configuration database to search. | |
152 * @key: The name of the field in the configuration database to set. | |
153 * @value: Pointer to a floating point integer containing the data. | |
154 * | |
155 * Sets a value in the configuration database. | |
156 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
157 void cfg_db_set_float(mcs_handle_t *db, |
2313 | 158 const gchar *section, |
159 const gchar *key, | |
160 gfloat value); | |
161 | |
162 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
163 * cfg_db_set_double: |
2313 | 164 * @db: A configuration database handle. |
165 * @section: The section of the configuration database to search. | |
166 * @key: The name of the field in the configuration database to set. | |
167 * @value: Pointer to a double precision floating point integer containing the data. | |
168 * | |
169 * Sets a value in the configuration database. | |
170 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
171 void cfg_db_set_double(mcs_handle_t *db, |
2313 | 172 const gchar *section, |
173 const gchar *key, | |
174 gdouble value); | |
175 | |
176 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
177 * cfg_db_unset_key: |
2313 | 178 * @db: A configuration database handle. |
179 * @section: The section of the configuration database to search. | |
180 * @key: The name of the field in the configuration database to set. | |
181 * | |
182 * Removes a value from the configuration database. | |
183 **/ | |
4433
a6a2e84e2b2e
Use mcs_handle_t directly instead of ConfigDb struct to remove the useless wrapper.
Matti Hamalainen <ccr@tnsp.org>
parents:
3686
diff
changeset
|
184 void cfg_db_unset_key(mcs_handle_t *db, |
2313 | 185 const gchar *section, |
186 const gchar *key); | |
187 | |
188 G_END_DECLS | |
189 | |
4557
2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents:
4444
diff
changeset
|
190 #endif /* AUDACIOUS_CONFIGDB_H */ |
2313 | 191 |