diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-08-10 20:58:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-08-10 20:58:24 +0200 |
commit | e9023bbcf93e35bee6e14c9d32b7ac223dcdd48f (patch) | |
tree | 10a6f81ab36d6fb5b4fe39076a15840ca8e93fd4 /src/include | |
parent | 4fd0ca3f103310e74066fce93e569b386dd14662 (diff) | |
download | gnunet-e9023bbcf93e35bee6e14c9d32b7ac223dcdd48f.tar.gz gnunet-e9023bbcf93e35bee6e14c9d32b7ac223dcdd48f.zip |
-style fixes
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_configuration_lib.h | 129 |
1 files changed, 66 insertions, 63 deletions
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 3384c6d45..bc862f54f 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h | |||
@@ -160,8 +160,8 @@ GNUNET_CONFIGURATION_serialize (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
160 | * present. This memory should be freed by the caller | 160 | * present. This memory should be freed by the caller |
161 | */ | 161 | */ |
162 | char * | 162 | char * |
163 | GNUNET_CONFIGURATION_serialize_diagnostics (const struct | 163 | GNUNET_CONFIGURATION_serialize_diagnostics ( |
164 | GNUNET_CONFIGURATION_Handle *cfg); | 164 | const struct GNUNET_CONFIGURATION_Handle *cfg); |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * De-serializes configuration | 167 | * De-serializes configuration |
@@ -266,8 +266,8 @@ GNUNET_CONFIGURATION_parse_and_run (const char *filename, | |||
266 | * @param cfg configuration handle | 266 | * @param cfg configuration handle |
267 | */ | 267 | */ |
268 | void | 268 | void |
269 | GNUNET_CONFIGURATION_enable_diagnostics (struct | 269 | GNUNET_CONFIGURATION_enable_diagnostics ( |
270 | GNUNET_CONFIGURATION_Handle *cfg); | 270 | struct GNUNET_CONFIGURATION_Handle *cfg); |
271 | 271 | ||
272 | 272 | ||
273 | /** | 273 | /** |
@@ -292,8 +292,8 @@ typedef void | |||
292 | * @param section name of the section | 292 | * @param section name of the section |
293 | */ | 293 | */ |
294 | typedef void | 294 | typedef void |
295 | (*GNUNET_CONFIGURATION_Section_Iterator) (void *cls, | 295 | (*GNUNET_CONFIGURATION_SectionIterator) (void *cls, |
296 | const char *section); | 296 | const char *section); |
297 | 297 | ||
298 | 298 | ||
299 | /** | 299 | /** |
@@ -319,7 +319,7 @@ GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
319 | void | 319 | void |
320 | GNUNET_CONFIGURATION_iterate_sections ( | 320 | GNUNET_CONFIGURATION_iterate_sections ( |
321 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 321 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
322 | GNUNET_CONFIGURATION_Section_Iterator iter, | 322 | GNUNET_CONFIGURATION_SectionIterator iter, |
323 | void *iter_cls); | 323 | void *iter_cls); |
324 | 324 | ||
325 | 325 | ||
@@ -344,11 +344,11 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
344 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 344 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
345 | */ | 345 | */ |
346 | enum GNUNET_GenericReturnValue | 346 | enum GNUNET_GenericReturnValue |
347 | GNUNET_CONFIGURATION_get_value_number (const struct | 347 | GNUNET_CONFIGURATION_get_value_number ( |
348 | GNUNET_CONFIGURATION_Handle *cfg, | 348 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
349 | const char *section, | 349 | const char *section, |
350 | const char *option, | 350 | const char *option, |
351 | unsigned long long *number); | 351 | unsigned long long *number); |
352 | 352 | ||
353 | 353 | ||
354 | /** | 354 | /** |
@@ -361,11 +361,11 @@ GNUNET_CONFIGURATION_get_value_number (const struct | |||
361 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 361 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
362 | */ | 362 | */ |
363 | enum GNUNET_GenericReturnValue | 363 | enum GNUNET_GenericReturnValue |
364 | GNUNET_CONFIGURATION_get_value_float (const struct | 364 | GNUNET_CONFIGURATION_get_value_float ( |
365 | GNUNET_CONFIGURATION_Handle *cfg, | 365 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
366 | const char *section, | 366 | const char *section, |
367 | const char *option, | 367 | const char *option, |
368 | float *number); | 368 | float *number); |
369 | 369 | ||
370 | 370 | ||
371 | /** | 371 | /** |
@@ -378,11 +378,11 @@ GNUNET_CONFIGURATION_get_value_float (const struct | |||
378 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 378 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
379 | */ | 379 | */ |
380 | enum GNUNET_GenericReturnValue | 380 | enum GNUNET_GenericReturnValue |
381 | GNUNET_CONFIGURATION_get_value_time (const struct | 381 | GNUNET_CONFIGURATION_get_value_time ( |
382 | GNUNET_CONFIGURATION_Handle *cfg, | 382 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
383 | const char *section, | 383 | const char *section, |
384 | const char *option, | 384 | const char *option, |
385 | struct GNUNET_TIME_Relative *time); | 385 | struct GNUNET_TIME_Relative *time); |
386 | 386 | ||
387 | 387 | ||
388 | /** | 388 | /** |
@@ -395,11 +395,11 @@ GNUNET_CONFIGURATION_get_value_time (const struct | |||
395 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 395 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
396 | */ | 396 | */ |
397 | enum GNUNET_GenericReturnValue | 397 | enum GNUNET_GenericReturnValue |
398 | GNUNET_CONFIGURATION_get_value_size (const struct | 398 | GNUNET_CONFIGURATION_get_value_size ( |
399 | GNUNET_CONFIGURATION_Handle *cfg, | 399 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
400 | const char *section, | 400 | const char *section, |
401 | const char *option, | 401 | const char *option, |
402 | unsigned long long *size); | 402 | unsigned long long *size); |
403 | 403 | ||
404 | 404 | ||
405 | /** | 405 | /** |
@@ -446,11 +446,11 @@ GNUNET_CONFIGURATION_get_value_string ( | |||
446 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 446 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
447 | */ | 447 | */ |
448 | enum GNUNET_GenericReturnValue | 448 | enum GNUNET_GenericReturnValue |
449 | GNUNET_CONFIGURATION_get_value_filename (const struct | 449 | GNUNET_CONFIGURATION_get_value_filename ( |
450 | GNUNET_CONFIGURATION_Handle *cfg, | 450 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
451 | const char *section, | 451 | const char *section, |
452 | const char *option, | 452 | const char *option, |
453 | char **value); | 453 | char **value); |
454 | 454 | ||
455 | 455 | ||
456 | /** | 456 | /** |
@@ -464,12 +464,13 @@ GNUNET_CONFIGURATION_get_value_filename (const struct | |||
464 | * @return number of filenames iterated over, -1 on error | 464 | * @return number of filenames iterated over, -1 on error |
465 | */ | 465 | */ |
466 | int | 466 | int |
467 | GNUNET_CONFIGURATION_iterate_value_filenames (const struct | 467 | GNUNET_CONFIGURATION_iterate_value_filenames ( |
468 | GNUNET_CONFIGURATION_Handle *cfg, | 468 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
469 | const char *section, | 469 | const char *section, |
470 | const char *option, | 470 | const char *option, |
471 | GNUNET_FileNameCallback cb, | 471 | GNUNET_FileNameCallback cb, |
472 | void *cb_cls); | 472 | void *cb_cls); |
473 | |||
473 | 474 | ||
474 | /** | 475 | /** |
475 | * Iterate over values of a section in the configuration. | 476 | * Iterate over values of a section in the configuration. |
@@ -480,11 +481,12 @@ GNUNET_CONFIGURATION_iterate_value_filenames (const struct | |||
480 | * @param iter_cls closure for @a iter | 481 | * @param iter_cls closure for @a iter |
481 | */ | 482 | */ |
482 | void | 483 | void |
483 | GNUNET_CONFIGURATION_iterate_section_values (const struct | 484 | GNUNET_CONFIGURATION_iterate_section_values ( |
484 | GNUNET_CONFIGURATION_Handle *cfg, | 485 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
485 | const char *section, | 486 | const char *section, |
486 | GNUNET_CONFIGURATION_Iterator iter, | 487 | GNUNET_CONFIGURATION_Iterator iter, |
487 | void *iter_cls); | 488 | void *iter_cls); |
489 | |||
488 | 490 | ||
489 | /** | 491 | /** |
490 | * Get a configuration value that should be in a set of | 492 | * Get a configuration value that should be in a set of |
@@ -499,12 +501,13 @@ GNUNET_CONFIGURATION_iterate_section_values (const struct | |||
499 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 501 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
500 | */ | 502 | */ |
501 | enum GNUNET_GenericReturnValue | 503 | enum GNUNET_GenericReturnValue |
502 | GNUNET_CONFIGURATION_get_value_choice (const struct | 504 | GNUNET_CONFIGURATION_get_value_choice ( |
503 | GNUNET_CONFIGURATION_Handle *cfg, | 505 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
504 | const char *section, | 506 | const char *section, |
505 | const char *option, | 507 | const char *option, |
506 | const char *const *choices, | 508 | const char *const *choices, |
507 | const char **value); | 509 | const char **value); |
510 | |||
508 | 511 | ||
509 | /** | 512 | /** |
510 | * Get a configuration value that should be in a set of | 513 | * Get a configuration value that should be in a set of |
@@ -516,10 +519,10 @@ GNUNET_CONFIGURATION_get_value_choice (const struct | |||
516 | * @return #GNUNET_YES, #GNUNET_NO or if option has no valid value, #GNUNET_SYSERR | 519 | * @return #GNUNET_YES, #GNUNET_NO or if option has no valid value, #GNUNET_SYSERR |
517 | */ | 520 | */ |
518 | enum GNUNET_GenericReturnValue | 521 | enum GNUNET_GenericReturnValue |
519 | GNUNET_CONFIGURATION_get_value_yesno (const struct | 522 | GNUNET_CONFIGURATION_get_value_yesno ( |
520 | GNUNET_CONFIGURATION_Handle *cfg, | 523 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
521 | const char *section, | 524 | const char *section, |
522 | const char *option); | 525 | const char *option); |
523 | 526 | ||
524 | 527 | ||
525 | /** | 528 | /** |
@@ -606,11 +609,11 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
606 | * #GNUNET_SYSERR if the filename is not in the list | 609 | * #GNUNET_SYSERR if the filename is not in the list |
607 | */ | 610 | */ |
608 | enum GNUNET_GenericReturnValue | 611 | enum GNUNET_GenericReturnValue |
609 | GNUNET_CONFIGURATION_remove_value_filename (struct | 612 | GNUNET_CONFIGURATION_remove_value_filename ( |
610 | GNUNET_CONFIGURATION_Handle *cfg, | 613 | struct GNUNET_CONFIGURATION_Handle *cfg, |
611 | const char *section, | 614 | const char *section, |
612 | const char *option, | 615 | const char *option, |
613 | const char *value); | 616 | const char *value); |
614 | 617 | ||
615 | 618 | ||
616 | /** | 619 | /** |
@@ -625,11 +628,11 @@ GNUNET_CONFIGURATION_remove_value_filename (struct | |||
625 | * #GNUNET_SYSERR if the filename already in the list | 628 | * #GNUNET_SYSERR if the filename already in the list |
626 | */ | 629 | */ |
627 | enum GNUNET_GenericReturnValue | 630 | enum GNUNET_GenericReturnValue |
628 | GNUNET_CONFIGURATION_append_value_filename (struct | 631 | GNUNET_CONFIGURATION_append_value_filename ( |
629 | GNUNET_CONFIGURATION_Handle *cfg, | 632 | struct GNUNET_CONFIGURATION_Handle *cfg, |
630 | const char *section, | 633 | const char *section, |
631 | const char *option, | 634 | const char *option, |
632 | const char *value); | 635 | const char *value); |
633 | 636 | ||
634 | 637 | ||
635 | /** | 638 | /** |