Mercurial > audlegacy
annotate src/audacious/configdb.h @ 3696:418ac922ce87
Use a mutex/condvar/timed wait to allow tickless operation in the output loop.
Add suggestions on how to improve produce_audio() API.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sat, 06 Oct 2007 20:35:52 -0500 |
parents | 259b7d3e0976 |
children | a6a2e84e2b2e |
rev | line source |
---|---|
2313 | 1 #ifndef CONFIGDB_H |
2 #define CONFIGDB_H | |
3 | |
4 #include <glib.h> | |
5 | |
6 /** | |
7 * ConfigDb: | |
8 * | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
9 * A configuration database handle, opened with cfg_db_open(). |
2313 | 10 **/ |
11 typedef struct _ConfigDb ConfigDb; | |
12 | |
13 | |
14 G_BEGIN_DECLS | |
15 | |
16 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
17 * cfg_db_open: |
2313 | 18 * |
19 * Opens the configuration database. | |
20 * | |
21 * Return value: A configuration database handle. | |
22 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
23 ConfigDb *cfg_db_open(); |
2313 | 24 |
25 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
26 * cfg_db_close: |
2313 | 27 * @db: A configuration database handle. |
28 * | |
29 * Closes the configuration database. | |
30 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
31 void cfg_db_close(ConfigDb *db); |
2313 | 32 |
33 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
34 * cfg_db_get_string: |
2313 | 35 * @db: A configuration database handle. |
36 * @section: The section of the configuration database to search. | |
37 * @key: The name of the field in the configuration database to look up. | |
38 * @value: Pointer to a buffer to put the data in. | |
39 * | |
40 * Searches the configuration database for a value. | |
41 * | |
42 * Return value: TRUE if successful, FALSE otherwise. | |
43 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
44 gboolean cfg_db_get_string(ConfigDb *db, |
2313 | 45 const gchar *section, |
46 const gchar *key, | |
47 gchar **value); | |
48 | |
49 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
50 * cfg_db_get_int: |
2313 | 51 * @db: A configuration database handle. |
52 * @section: The section of the configuration database to search. | |
53 * @key: The name of the field in the configuration database to look up. | |
54 * @value: Pointer to an integer to put the data in. | |
55 * | |
56 * Searches the configuration database for a value. | |
57 * | |
58 * Return value: TRUE if successful, FALSE otherwise. | |
59 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
60 gboolean cfg_db_get_int(ConfigDb *db, |
2313 | 61 const gchar *section, |
62 const gchar *key, | |
63 gint *value); | |
64 | |
65 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
66 * cfg_db_get_bool: |
2313 | 67 * @db: A configuration database handle. |
68 * @section: The section of the configuration database to search. | |
69 * @key: The name of the field in the configuration database to look up. | |
70 * @value: Pointer to a boolean to put the data in. | |
71 * | |
72 * Searches the configuration database for a value. | |
73 * | |
74 * Return value: TRUE if successful, FALSE otherwise. | |
75 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
76 gboolean cfg_db_get_bool(ConfigDb *db, |
2313 | 77 const gchar *section, |
78 const gchar *key, | |
79 gboolean *value); | |
80 | |
81 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
82 * cfg_db_get_float: |
2313 | 83 * @db: A configuration database handle. |
84 * @section: The section of the configuration database to search. | |
85 * @key: The name of the field in the configuration database to look up. | |
86 * @value: Pointer to a floating point integer to put the data in. | |
87 * | |
88 * Searches the configuration database for a value. | |
89 * | |
90 * Return value: TRUE if successful, FALSE otherwise. | |
91 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
92 gboolean cfg_db_get_float(ConfigDb *db, |
2313 | 93 const gchar *section, |
94 const gchar *key, | |
95 gfloat *value); | |
96 | |
97 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
98 * cfg_db_get_double: |
2313 | 99 * @db: A configuration database handle. |
100 * @section: The section of the configuration database to search. | |
101 * @key: The name of the field in the configuration database to look up. | |
102 * @value: Pointer to a double-precision floating point integer to put the data in. | |
103 * | |
104 * Searches the configuration database for a value. | |
105 * | |
106 * Return value: TRUE if successful, FALSE otherwise. | |
107 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
108 gboolean cfg_db_get_double(ConfigDb *db, |
2313 | 109 const gchar *section, |
110 const gchar *key, | |
111 gdouble *value); | |
112 | |
113 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
114 * cfg_db_set_string: |
2313 | 115 * @db: A configuration database handle. |
116 * @section: The section of the configuration database to search. | |
117 * @key: The name of the field in the configuration database to set. | |
118 * @value: Pointer to a buffer containing the data. | |
119 * | |
120 * Sets a value in the configuration database. | |
121 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
122 void cfg_db_set_string(ConfigDb *db, |
2313 | 123 const gchar *section, |
124 const gchar *key, | |
2346
0b98ad8c8b17
[svn] removed xmms_create_dirbrowser, small config db fixes
mf0102
parents:
2313
diff
changeset
|
125 const gchar *value); |
2313 | 126 |
127 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
128 * cfg_db_set_int: |
2313 | 129 * @db: A configuration database handle. |
130 * @section: The section of the configuration database to search. | |
131 * @key: The name of the field in the configuration database to set. | |
132 * @value: Pointer to an integer containing the data. | |
133 * | |
134 * Sets a value in the configuration database. | |
135 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
136 void cfg_db_set_int(ConfigDb *db, |
2313 | 137 const gchar *section, |
138 const gchar *key, | |
139 gint value); | |
140 | |
141 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
142 * cfg_db_set_bool: |
2313 | 143 * @db: A configuration database handle. |
144 * @section: The section of the configuration database to search. | |
145 * @key: The name of the field in the configuration database to set. | |
146 * @value: Pointer to a boolean containing the data. | |
147 * | |
148 * Sets a value in the configuration database. | |
149 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
150 void cfg_db_set_bool(ConfigDb *db, |
2313 | 151 const gchar *section, |
152 const gchar *key, | |
153 gboolean value); | |
154 | |
155 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
156 * cfg_db_set_float: |
2313 | 157 * @db: A configuration database handle. |
158 * @section: The section of the configuration database to search. | |
159 * @key: The name of the field in the configuration database to set. | |
160 * @value: Pointer to a floating point integer containing the data. | |
161 * | |
162 * Sets a value in the configuration database. | |
163 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
164 void cfg_db_set_float(ConfigDb *db, |
2313 | 165 const gchar *section, |
166 const gchar *key, | |
167 gfloat value); | |
168 | |
169 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
170 * cfg_db_set_double: |
2313 | 171 * @db: A configuration database handle. |
172 * @section: The section of the configuration database to search. | |
173 * @key: The name of the field in the configuration database to set. | |
174 * @value: Pointer to a double precision floating point integer containing the data. | |
175 * | |
176 * Sets a value in the configuration database. | |
177 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
178 void cfg_db_set_double(ConfigDb *db, |
2313 | 179 const gchar *section, |
180 const gchar *key, | |
181 gdouble value); | |
182 | |
183 /** | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
184 * cfg_db_unset_key: |
2313 | 185 * @db: A configuration database handle. |
186 * @section: The section of the configuration database to search. | |
187 * @key: The name of the field in the configuration database to set. | |
188 * | |
189 * Removes a value from the configuration database. | |
190 **/ | |
3686
259b7d3e0976
sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents:
3112
diff
changeset
|
191 void cfg_db_unset_key(ConfigDb *db, |
2313 | 192 const gchar *section, |
193 const gchar *key); | |
194 | |
195 G_END_DECLS | |
196 | |
2521 | 197 #endif /* CONFIGDB_H */ |
2313 | 198 |