diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:46:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:46:35 +0000 |
commit | 502af2167f7c218366666ca4944bd7cc54b5b19a (patch) | |
tree | a91fec5cc9769d260640bd91c6633cb9cf395524 /src/include/gnunet_configuration_lib.h | |
parent | 03af5a603b7cc53432249d5854cd412aa90dde0d (diff) | |
download | gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.tar.gz gnunet-502af2167f7c218366666ca4944bd7cc54b5b19a.zip |
indentation
Diffstat (limited to 'src/include/gnunet_configuration_lib.h')
-rw-r--r-- | src/include/gnunet_configuration_lib.h | 95 |
1 files changed, 53 insertions, 42 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 642bbde53..4ecb3539f 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -58,8 +58,9 @@ struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_create (void); | |||
58 | * @param cfg configuration to duplicate | 58 | * @param cfg configuration to duplicate |
59 | * @return duplicate configuration | 59 | * @return duplicate configuration |
60 | */ | 60 | */ |
61 | struct GNUNET_CONFIGURATION_Handle * | 61 | struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_dup (const struct |
62 | GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg); | 62 | GNUNET_CONFIGURATION_Handle |
63 | *cfg); | ||
63 | 64 | ||
64 | 65 | ||
65 | /** | 66 | /** |
@@ -113,9 +114,10 @@ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
113 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 114 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
114 | */ | 115 | */ |
115 | int | 116 | int |
116 | GNUNET_CONFIGURATION_write_diffs(const struct GNUNET_CONFIGURATION_Handle *cfgDefault, | 117 | GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle |
117 | const struct GNUNET_CONFIGURATION_Handle *cfgNew, | 118 | *cfgDefault, |
118 | const char* filename); | 119 | const struct GNUNET_CONFIGURATION_Handle |
120 | *cfgNew, const char *filename); | ||
119 | 121 | ||
120 | /** | 122 | /** |
121 | * Test if there are configuration options that were | 123 | * Test if there are configuration options that were |
@@ -124,7 +126,8 @@ GNUNET_CONFIGURATION_write_diffs(const struct GNUNET_CONFIGURATION_Handle *cfgDe | |||
124 | * @param cfg configuration to inspect | 126 | * @param cfg configuration to inspect |
125 | * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed) | 127 | * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed) |
126 | */ | 128 | */ |
127 | int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg); | 129 | int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle |
130 | *cfg); | ||
128 | 131 | ||
129 | 132 | ||
130 | /** | 133 | /** |
@@ -135,10 +138,10 @@ int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg | |||
135 | * @param option name of the option | 138 | * @param option name of the option |
136 | * @param value value of the option | 139 | * @param value value of the option |
137 | */ | 140 | */ |
138 | typedef void (*GNUNET_CONFIGURATION_Iterator)(void *cls, | 141 | typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, |
139 | const char *section, | 142 | const char *section, |
140 | const char *option, | 143 | const char *option, |
141 | const char *value); | 144 | const char *value); |
142 | 145 | ||
143 | 146 | ||
144 | /** | 147 | /** |
@@ -147,8 +150,8 @@ typedef void (*GNUNET_CONFIGURATION_Iterator)(void *cls, | |||
147 | * @param cls closure | 150 | * @param cls closure |
148 | * @param section name of the section | 151 | * @param section name of the section |
149 | */ | 152 | */ |
150 | typedef void (*GNUNET_CONFIGURATION_Section_Iterator)(void *cls, | 153 | typedef void (*GNUNET_CONFIGURATION_Section_Iterator) (void *cls, |
151 | const char *section); | 154 | const char *section); |
152 | 155 | ||
153 | 156 | ||
154 | /** | 157 | /** |
@@ -158,9 +161,9 @@ typedef void (*GNUNET_CONFIGURATION_Section_Iterator)(void *cls, | |||
158 | * @param iter function to call on each option | 161 | * @param iter function to call on each option |
159 | * @param iter_cls closure for iter | 162 | * @param iter_cls closure for iter |
160 | */ | 163 | */ |
161 | void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, | 164 | void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle |
162 | GNUNET_CONFIGURATION_Iterator iter, | 165 | *cfg, GNUNET_CONFIGURATION_Iterator iter, |
163 | void *iter_cls); | 166 | void *iter_cls); |
164 | 167 | ||
165 | 168 | ||
166 | /** | 169 | /** |
@@ -170,9 +173,10 @@ void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg | |||
170 | * @param iter function to call on each section | 173 | * @param iter function to call on each section |
171 | * @param iter_cls closure for iter | 174 | * @param iter_cls closure for iter |
172 | */ | 175 | */ |
173 | void GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle *cfg, | 176 | void GNUNET_CONFIGURATION_iterate_sections (const struct |
174 | GNUNET_CONFIGURATION_Section_Iterator iter, | 177 | GNUNET_CONFIGURATION_Handle *cfg, |
175 | void *iter_cls); | 178 | GNUNET_CONFIGURATION_Section_Iterator |
179 | iter, void *iter_cls); | ||
176 | 180 | ||
177 | 181 | ||
178 | /** | 182 | /** |
@@ -181,8 +185,8 @@ void GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Ha | |||
181 | * @param cfg configuration to inspect | 185 | * @param cfg configuration to inspect |
182 | * @param section name of the section to remove | 186 | * @param section name of the section to remove |
183 | */ | 187 | */ |
184 | void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, | 188 | void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle |
185 | const char *section); | 189 | *cfg, const char *section); |
186 | 190 | ||
187 | /** | 191 | /** |
188 | * Get a configuration value that should be a number. | 192 | * Get a configuration value that should be a number. |
@@ -193,8 +197,9 @@ void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cf | |||
193 | * @param number where to store the numeric value of the option | 197 | * @param number where to store the numeric value of the option |
194 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 198 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
195 | */ | 199 | */ |
196 | int GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle | 200 | int GNUNET_CONFIGURATION_get_value_number (const struct |
197 | *cfg, const char *section, | 201 | GNUNET_CONFIGURATION_Handle *cfg, |
202 | const char *section, | ||
198 | const char *option, | 203 | const char *option, |
199 | unsigned long long *number); | 204 | unsigned long long *number); |
200 | 205 | ||
@@ -208,10 +213,11 @@ int GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Han | |||
208 | * @param time set to the time value stored in the configuration | 213 | * @param time set to the time value stored in the configuration |
209 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 214 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
210 | */ | 215 | */ |
211 | int GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle | 216 | int GNUNET_CONFIGURATION_get_value_time (const struct |
212 | *cfg, const char *section, | 217 | GNUNET_CONFIGURATION_Handle *cfg, |
213 | const char *option, | 218 | const char *section, |
214 | struct GNUNET_TIME_Relative *time); | 219 | const char *option, |
220 | struct GNUNET_TIME_Relative *time); | ||
215 | 221 | ||
216 | 222 | ||
217 | /** | 223 | /** |
@@ -222,8 +228,9 @@ int GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handl | |||
222 | * @param option option of interest | 228 | * @param option option of interest |
223 | * @return GNUNET_YES if so, GNUNET_NO if not. | 229 | * @return GNUNET_YES if so, GNUNET_NO if not. |
224 | */ | 230 | */ |
225 | int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, | 231 | int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle |
226 | const char *section, const char *option); | 232 | *cfg, const char *section, |
233 | const char *option); | ||
227 | 234 | ||
228 | 235 | ||
229 | /** | 236 | /** |
@@ -236,8 +243,9 @@ int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *c | |||
236 | * value, or NULL if option is not specified | 243 | * value, or NULL if option is not specified |
237 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 244 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
238 | */ | 245 | */ |
239 | int GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle | 246 | int GNUNET_CONFIGURATION_get_value_string (const struct |
240 | *cfg, const char *section, | 247 | GNUNET_CONFIGURATION_Handle *cfg, |
248 | const char *section, | ||
241 | const char *option, char **value); | 249 | const char *option, char **value); |
242 | 250 | ||
243 | 251 | ||
@@ -255,8 +263,7 @@ int GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Han | |||
255 | int GNUNET_CONFIGURATION_get_value_filename (const struct | 263 | int GNUNET_CONFIGURATION_get_value_filename (const struct |
256 | GNUNET_CONFIGURATION_Handle *cfg, | 264 | GNUNET_CONFIGURATION_Handle *cfg, |
257 | const char *section, | 265 | const char *section, |
258 | const char *option, | 266 | const char *option, char **value); |
259 | char **value); | ||
260 | 267 | ||
261 | /** | 268 | /** |
262 | * Iterate over the set of filenames stored in a configuration value. | 269 | * Iterate over the set of filenames stored in a configuration value. |
@@ -285,10 +292,11 @@ int GNUNET_CONFIGURATION_iterate_value_filenames (const struct | |||
285 | * @param iter_cls closure for iter | 292 | * @param iter_cls closure for iter |
286 | */ | 293 | */ |
287 | void | 294 | void |
288 | GNUNET_CONFIGURATION_iterate_section_values (const struct GNUNET_CONFIGURATION_Handle *cfg, | 295 | GNUNET_CONFIGURATION_iterate_section_values (const struct |
289 | const char *section, | 296 | GNUNET_CONFIGURATION_Handle *cfg, |
290 | GNUNET_CONFIGURATION_Iterator iter, | 297 | const char *section, |
291 | void *iter_cls); | 298 | GNUNET_CONFIGURATION_Iterator iter, |
299 | void *iter_cls); | ||
292 | 300 | ||
293 | /** | 301 | /** |
294 | * Get a configuration value that should be in a set of | 302 | * Get a configuration value that should be in a set of |
@@ -302,8 +310,9 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct GNUNET_CONFIGURATION_H | |||
302 | * or NULL if option is not specified and no default given | 310 | * or NULL if option is not specified and no default given |
303 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 311 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
304 | */ | 312 | */ |
305 | int GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle | 313 | int GNUNET_CONFIGURATION_get_value_choice (const struct |
306 | *cfg, const char *section, | 314 | GNUNET_CONFIGURATION_Handle *cfg, |
315 | const char *section, | ||
307 | const char *option, | 316 | const char *option, |
308 | const char **choices, | 317 | const char **choices, |
309 | const char **value); | 318 | const char **value); |
@@ -317,8 +326,9 @@ int GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Han | |||
317 | * @param option option of interest | 326 | * @param option option of interest |
318 | * @return GNUNET_YES, GNUNET_NO or if option has no valid value, GNUNET_SYSERR | 327 | * @return GNUNET_YES, GNUNET_NO or if option has no valid value, GNUNET_SYSERR |
319 | */ | 328 | */ |
320 | int GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle | 329 | int GNUNET_CONFIGURATION_get_value_yesno (const struct |
321 | *cfg, const char *section, | 330 | GNUNET_CONFIGURATION_Handle *cfg, |
331 | const char *section, | ||
322 | const char *option); | 332 | const char *option); |
323 | 333 | ||
324 | /** | 334 | /** |
@@ -330,8 +340,9 @@ int GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Hand | |||
330 | * @param orig string to $-expand (will be freed!) | 340 | * @param orig string to $-expand (will be freed!) |
331 | * @return $-expanded string | 341 | * @return $-expanded string |
332 | */ | 342 | */ |
333 | char *GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle | 343 | char *GNUNET_CONFIGURATION_expand_dollar (const struct |
334 | *cfg, char *orig); | 344 | GNUNET_CONFIGURATION_Handle *cfg, |
345 | char *orig); | ||
335 | 346 | ||
336 | 347 | ||
337 | /** | 348 | /** |