aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_configuration_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-03-07 06:31:51 +0000
committerChristian Grothoff <christian@grothoff.org>2014-03-07 06:31:51 +0000
commitc0cad451859c8fa28ce1e3d50c21a208974f9e24 (patch)
tree73edd5a16389ade07f5a1b04ae5b3445ea90da31 /src/include/gnunet_configuration_lib.h
parent8a0b8a4604526e5f832c4971f9c3b1b48d79bea4 (diff)
downloadgnunet-c0cad451859c8fa28ce1e3d50c21a208974f9e24.tar.gz
gnunet-c0cad451859c8fa28ce1e3d50c21a208974f9e24.zip
-fix disting -- include sp
Diffstat (limited to 'src/include/gnunet_configuration_lib.h')
-rw-r--r--src/include/gnunet_configuration_lib.h92
1 files changed, 48 insertions, 44 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index e736bdeb0..0448a5865 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -160,10 +160,9 @@ GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
160 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 160 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
161 */ 161 */
162int 162int
163GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle 163GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle *cfg_default,
164 *cfg_default, 164 const struct GNUNET_CONFIGURATION_Handle *cfg_new,
165 const struct GNUNET_CONFIGURATION_Handle 165 const char *filename);
166 *cfg_new, const char *filename);
167 166
168 167
169/** 168/**
@@ -174,10 +173,8 @@ GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
174 * @return configuration with only the differences, never NULL 173 * @return configuration with only the differences, never NULL
175 */ 174 */
176struct GNUNET_CONFIGURATION_Handle * 175struct GNUNET_CONFIGURATION_Handle *
177GNUNET_CONFIGURATION_get_diff (const struct GNUNET_CONFIGURATION_Handle 176GNUNET_CONFIGURATION_get_diff (const struct GNUNET_CONFIGURATION_Handle *cfg_default,
178 *cfg_default, 177 const struct GNUNET_CONFIGURATION_Handle *cfg_new);
179 const struct GNUNET_CONFIGURATION_Handle
180 *cfg_new);
181 178
182 179
183/** 180/**
@@ -199,9 +196,11 @@ GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg);
199 * @param option name of the option 196 * @param option name of the option
200 * @param value value of the option 197 * @param value value of the option
201 */ 198 */
202typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, const char *section, 199typedef void
203 const char *option, 200(*GNUNET_CONFIGURATION_Iterator) (void *cls,
204 const char *value); 201 const char *section,
202 const char *option,
203 const char *value);
205 204
206 205
207/** 206/**
@@ -210,8 +209,9 @@ typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, const char *section,
210 * @param cls closure 209 * @param cls closure
211 * @param section name of the section 210 * @param section name of the section
212 */ 211 */
213typedef void (*GNUNET_CONFIGURATION_Section_Iterator) (void *cls, 212typedef void
214 const char *section); 213(*GNUNET_CONFIGURATION_Section_Iterator) (void *cls,
214 const char *section);
215 215
216 216
217/** 217/**
@@ -219,7 +219,7 @@ typedef void (*GNUNET_CONFIGURATION_Section_Iterator) (void *cls,
219 * 219 *
220 * @param cfg configuration to inspect 220 * @param cfg configuration to inspect
221 * @param iter function to call on each option 221 * @param iter function to call on each option
222 * @param iter_cls closure for iter 222 * @param iter_cls closure for @a iter
223 */ 223 */
224void 224void
225GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, 225GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -232,13 +232,12 @@ GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
232 * 232 *
233 * @param cfg configuration to inspect 233 * @param cfg configuration to inspect
234 * @param iter function to call on each section 234 * @param iter function to call on each section
235 * @param iter_cls closure for iter 235 * @param iter_cls closure for @a iter
236 */ 236 */
237void 237void
238GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle 238GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle *cfg,
239 *cfg, 239 GNUNET_CONFIGURATION_Section_Iterator iter,
240 GNUNET_CONFIGURATION_Section_Iterator 240 void *iter_cls);
241 iter, void *iter_cls);
242 241
243 242
244/** 243/**
@@ -251,6 +250,7 @@ void
251GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, 250GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
252 const char *section); 251 const char *section);
253 252
253
254/** 254/**
255 * Get a configuration value that should be a number. 255 * Get a configuration value that should be a number.
256 * 256 *
@@ -261,8 +261,8 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
261 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 261 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
262 */ 262 */
263int 263int
264GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle 264GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle *cfg,
265 *cfg, const char *section, 265 const char *section,
266 const char *option, 266 const char *option,
267 unsigned long long *number); 267 unsigned long long *number);
268 268
@@ -277,8 +277,8 @@ GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle
277 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 277 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
278 */ 278 */
279int 279int
280GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle 280GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle *cfg,
281 *cfg, const char *section, 281 const char *section,
282 const char *option, 282 const char *option,
283 struct GNUNET_TIME_Relative *time); 283 struct GNUNET_TIME_Relative *time);
284 284
@@ -294,8 +294,8 @@ GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle
294 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 294 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
295 */ 295 */
296int 296int
297GNUNET_CONFIGURATION_get_value_size (const struct GNUNET_CONFIGURATION_Handle 297GNUNET_CONFIGURATION_get_value_size (const struct GNUNET_CONFIGURATION_Handle *cfg,
298 *cfg, const char *section, 298 const char *section,
299 const char *option, 299 const char *option,
300 unsigned long long *size); 300 unsigned long long *size);
301 301
@@ -310,7 +310,8 @@ GNUNET_CONFIGURATION_get_value_size (const struct GNUNET_CONFIGURATION_Handle
310 */ 310 */
311int 311int
312GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg, 312GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg,
313 const char *section, const char *option); 313 const char *section,
314 const char *option);
314 315
315 316
316/** 317/**
@@ -344,7 +345,8 @@ GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle
344int 345int
345GNUNET_CONFIGURATION_get_value_filename (const struct GNUNET_CONFIGURATION_Handle *cfg, 346GNUNET_CONFIGURATION_get_value_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
346 const char *section, 347 const char *section,
347 const char *option, char **value); 348 const char *option,
349 char **value);
348 350
349 351
350/** 352/**
@@ -358,8 +360,7 @@ GNUNET_CONFIGURATION_get_value_filename (const struct GNUNET_CONFIGURATION_Handl
358 * @return number of filenames iterated over, -1 on error 360 * @return number of filenames iterated over, -1 on error
359 */ 361 */
360int 362int
361GNUNET_CONFIGURATION_iterate_value_filenames (const struct 363GNUNET_CONFIGURATION_iterate_value_filenames (const struct GNUNET_CONFIGURATION_Handle *cfg,
362 GNUNET_CONFIGURATION_Handle *cfg,
363 const char *section, 364 const char *section,
364 const char *option, 365 const char *option,
365 GNUNET_FileNameCallback cb, 366 GNUNET_FileNameCallback cb,
@@ -374,8 +375,7 @@ GNUNET_CONFIGURATION_iterate_value_filenames (const struct
374 * @param iter_cls closure for @a iter 375 * @param iter_cls closure for @a iter
375 */ 376 */
376void 377void
377GNUNET_CONFIGURATION_iterate_section_values (const struct 378GNUNET_CONFIGURATION_iterate_section_values (const struct GNUNET_CONFIGURATION_Handle *cfg,
378 GNUNET_CONFIGURATION_Handle *cfg,
379 const char *section, 379 const char *section,
380 GNUNET_CONFIGURATION_Iterator iter, 380 GNUNET_CONFIGURATION_Iterator iter,
381 void *iter_cls); 381 void *iter_cls);
@@ -393,9 +393,10 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct
393 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 393 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
394 */ 394 */
395int 395int
396GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle 396GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle *cfg,
397 *cfg, const char *section, 397 const char *section,
398 const char *option, const char *const *choices, 398 const char *option,
399 const char *const *choices,
399 const char **value); 400 const char **value);
400 401
401/** 402/**
@@ -408,8 +409,8 @@ GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle
408 * @return #GNUNET_YES, #GNUNET_NO or if option has no valid value, #GNUNET_SYSERR 409 * @return #GNUNET_YES, #GNUNET_NO or if option has no valid value, #GNUNET_SYSERR
409 */ 410 */
410int 411int
411GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle 412GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle *cfg,
412 *cfg, const char *section, 413 const char *section,
413 const char *option); 414 const char *option);
414 415
415 416
@@ -430,8 +431,8 @@ GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle
430 * @return $-expanded string 431 * @return $-expanded string
431 */ 432 */
432char * 433char *
433GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle 434GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg,
434 *cfg, char *orig); 435 char *orig);
435 436
436 437
437/** 438/**
@@ -444,7 +445,8 @@ GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
444 */ 445 */
445void 446void
446GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg, 447GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg,
447 const char *section, const char *option, 448 const char *section,
449 const char *option,
448 unsigned long long number); 450 unsigned long long number);
449 451
450 452
@@ -458,7 +460,8 @@ GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg,
458 */ 460 */
459void 461void
460GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg, 462GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg,
461 const char *section, const char *option, 463 const char *section,
464 const char *option,
462 const char *value); 465 const char *value);
463 466
464 467
@@ -474,11 +477,12 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg,
474 * #GNUNET_SYSERR if the filename is not in the list 477 * #GNUNET_SYSERR if the filename is not in the list
475 */ 478 */
476int 479int
477GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle 480GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle *cfg,
478 *cfg, const char *section, 481 const char *section,
479 const char *option, 482 const char *option,
480 const char *value); 483 const char *value);
481 484
485
482/** 486/**
483 * Append a filename to a configuration value that 487 * Append a filename to a configuration value that
484 * represents a list of filenames 488 * represents a list of filenames
@@ -491,8 +495,8 @@ GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle
491 * #GNUNET_SYSERR if the filename already in the list 495 * #GNUNET_SYSERR if the filename already in the list
492 */ 496 */
493int 497int
494GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle 498GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle *cfg,
495 *cfg, const char *section, 499 const char *section,
496 const char *option, 500 const char *option,
497 const char *value); 501 const char *value);
498 502