aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-07 18:37:09 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-07 18:37:09 +0000
commitaf0501960d6041f27758678c8f8ffdc3ed7ac6c9 (patch)
treec2aefd184f975731f5e2957f979af2dd05dc352e /src/include/gnunet_common.h
parentef0def7ccde140b2b4558761dfd46cbb16c625f4 (diff)
downloadgnunet-af0501960d6041f27758678c8f8ffdc3ed7ac6c9.tar.gz
gnunet-af0501960d6041f27758678c8f8ffdc3ed7ac6c9.zip
-indent, doxygen
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h41
1 files changed, 26 insertions, 15 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index ec077d355..d8444e100 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -259,7 +259,9 @@ GNUNET_NETWORK_STRUCT_END
259 * #GNUNET_NO to stop iteration with no error, 259 * #GNUNET_NO to stop iteration with no error,
260 * #GNUNET_SYSERR to abort iteration with error! 260 * #GNUNET_SYSERR to abort iteration with error!
261 */ 261 */
262typedef int (*GNUNET_FileNameCallback) (void *cls, const char *filename); 262typedef int
263(*GNUNET_FileNameCallback) (void *cls,
264 const char *filename);
263 265
264 266
265/* ****************************** logging ***************************** */ 267/* ****************************** logging ***************************** */
@@ -291,8 +293,10 @@ enum GNUNET_ErrorType
291 * @param date when was the message logged? 293 * @param date when was the message logged?
292 * @param message what is the message 294 * @param message what is the message
293 */ 295 */
294typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind, 296typedef void (*GNUNET_Logger) (void *cls,
295 const char *component, const char *date, 297 enum GNUNET_ErrorType kind,
298 const char *component,
299 const char *date,
296 const char *message); 300 const char *message);
297 301
298 302
@@ -310,7 +314,8 @@ int
310GNUNET_get_log_call_status (int caller_level, 314GNUNET_get_log_call_status (int caller_level,
311 const char *comp, 315 const char *comp,
312 const char *file, 316 const char *file,
313 const char *function, int line); 317 const char *function,
318 int line);
314#endif 319#endif
315 320
316 321
@@ -437,10 +442,11 @@ GNUNET_abort (void) GNUNET_NORETURN;
437 * Ignore the next @a n calls to the log function. 442 * Ignore the next @a n calls to the log function.
438 * 443 *
439 * @param n number of log calls to ignore (could be negative) 444 * @param n number of log calls to ignore (could be negative)
440 * @param check_reset GNUNET_YES to assert that the log skip counter is currently zero 445 * @param check_reset #GNUNET_YES to assert that the log skip counter is currently zero
441 */ 446 */
442void 447void
443GNUNET_log_skip (int n, int check_reset); 448GNUNET_log_skip (int n,
449 int check_reset);
444 450
445 451
446/** 452/**
@@ -453,7 +459,9 @@ GNUNET_log_skip (int n, int check_reset);
453 * @return #GNUNET_OK on success, #GNUNET_SYSERR if logfile could not be opened 459 * @return #GNUNET_OK on success, #GNUNET_SYSERR if logfile could not be opened
454 */ 460 */
455int 461int
456GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile); 462GNUNET_log_setup (const char *comp,
463 const char *loglevel,
464 const char *logfile);
457 465
458 466
459/** 467/**
@@ -464,7 +472,8 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile);
464 * @param logger_cls closure for @a logger 472 * @param logger_cls closure for @a logger
465 */ 473 */
466void 474void
467GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls); 475GNUNET_logger_add (GNUNET_Logger logger,
476 void *logger_cls);
468 477
469 478
470/** 479/**
@@ -472,10 +481,11 @@ GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
472 * Remove a custom logger. 481 * Remove a custom logger.
473 * 482 *
474 * @param logger log function 483 * @param logger log function
475 * @param logger_cls closure for logger 484 * @param logger_cls closure for @a logger
476 */ 485 */
477void 486void
478GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls); 487GNUNET_logger_remove (GNUNET_Logger logger,
488 void *logger_cls);
479 489
480 490
481/** 491/**
@@ -513,7 +523,7 @@ GNUNET_h2s_full (const struct GNUNET_HashCode * hc);
513 * 523 *
514 * @param pid the peer identity 524 * @param pid the peer identity
515 * @return string form of the pid; will be overwritten by next 525 * @return string form of the pid; will be overwritten by next
516 * call to #GNUNET_i2s. 526 * call to #GNUNET_i2s().
517 */ 527 */
518const char * 528const char *
519GNUNET_i2s (const struct GNUNET_PeerIdentity *pid); 529GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
@@ -527,7 +537,7 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
527 * 537 *
528 * @param pid the peer identity 538 * @param pid the peer identity
529 * @return string form of the pid; will be overwritten by next 539 * @return string form of the pid; will be overwritten by next
530 * call to #GNUNET_i2s. 540 * call to #GNUNET_i2s_full().
531 */ 541 */
532const char * 542const char *
533GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid); 543GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid);
@@ -540,12 +550,13 @@ GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid);
540 * in the entire API that is NOT reentrant! 550 * in the entire API that is NOT reentrant!
541 * 551 *
542 * @param addr the address 552 * @param addr the address
543 * @param addrlen the length of the address 553 * @param addrlen the length of the @a addr
544 * @return nicely formatted string for the address 554 * @return nicely formatted string for the address
545 * will be overwritten by next call to GNUNET_a2s. 555 * will be overwritten by next call to #GNUNET_a2s().
546 */ 556 */
547const char * 557const char *
548GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen); 558GNUNET_a2s (const struct sockaddr *addr,
559 socklen_t addrlen);
549 560
550 561
551/** 562/**