diff options
Diffstat (limited to 'src/include/gnunet_mq_lib.h')
-rw-r--r-- | src/include/gnunet_mq_lib.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index a1c5c4957..3eca71f0f 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -18,7 +18,17 @@ | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include "gnunet_common.h" | ||
22 | #if !defined (__GNUNET_UTIL_LIB_H_INSIDE__) | ||
23 | #error "Only <gnunet_util_lib.h> can be included directly." | ||
24 | #endif | ||
25 | |||
26 | |||
21 | /** | 27 | /** |
28 | * @addtogroup libgnunetutil | ||
29 | * Multi-function utilities library for GNUnet programs | ||
30 | * @{ | ||
31 | * | ||
22 | * @author Florian Dold | 32 | * @author Florian Dold |
23 | * @author Christian Grothoff | 33 | * @author Christian Grothoff |
24 | * | 34 | * |
@@ -35,6 +45,7 @@ | |||
35 | #ifndef GNUNET_MQ_LIB_H | 45 | #ifndef GNUNET_MQ_LIB_H |
36 | #define GNUNET_MQ_LIB_H | 46 | #define GNUNET_MQ_LIB_H |
37 | 47 | ||
48 | |||
38 | #include "gnunet_scheduler_lib.h" | 49 | #include "gnunet_scheduler_lib.h" |
39 | 50 | ||
40 | /** | 51 | /** |
@@ -386,9 +397,9 @@ typedef void | |||
386 | * FIFO of envelopes independent of MQ itself and wants to | 397 | * FIFO of envelopes independent of MQ itself and wants to |
387 | * re-use the pointers internal to @a env. Use with caution. | 398 | * re-use the pointers internal to @a env. Use with caution. |
388 | * | 399 | * |
389 | * @param[in|out] env_head of envelope DLL | 400 | * @param[in,out] env_head of envelope DLL |
390 | * @param[in|out] env_tail tail of envelope DLL | 401 | * @param[in,out] env_tail tail of envelope DLL |
391 | * @param[in|out] env element to insert at the tail | 402 | * @param[in,out] env element to insert at the tail |
392 | */ | 403 | */ |
393 | void | 404 | void |
394 | GNUNET_MQ_dll_insert_head (struct GNUNET_MQ_Envelope **env_head, | 405 | GNUNET_MQ_dll_insert_head (struct GNUNET_MQ_Envelope **env_head, |
@@ -404,9 +415,9 @@ GNUNET_MQ_dll_insert_head (struct GNUNET_MQ_Envelope **env_head, | |||
404 | * FIFO of envelopes independent of MQ itself and wants to | 415 | * FIFO of envelopes independent of MQ itself and wants to |
405 | * re-use the pointers internal to @a env. Use with caution. | 416 | * re-use the pointers internal to @a env. Use with caution. |
406 | * | 417 | * |
407 | * @param[in|out] env_head of envelope DLL | 418 | * @param[in,out] env_head of envelope DLL |
408 | * @param[in|out] env_tail tail of envelope DLL | 419 | * @param[in,out] env_tail tail of envelope DLL |
409 | * @param[in|out] env element to insert at the tail | 420 | * @param[in,out] env element to insert at the tail |
410 | */ | 421 | */ |
411 | void | 422 | void |
412 | GNUNET_MQ_dll_insert_tail (struct GNUNET_MQ_Envelope **env_head, | 423 | GNUNET_MQ_dll_insert_tail (struct GNUNET_MQ_Envelope **env_head, |
@@ -422,9 +433,9 @@ GNUNET_MQ_dll_insert_tail (struct GNUNET_MQ_Envelope **env_head, | |||
422 | * FIFO of envelopes independent of MQ itself and wants to | 433 | * FIFO of envelopes independent of MQ itself and wants to |
423 | * re-use the pointers internal to @a env. Use with caution. | 434 | * re-use the pointers internal to @a env. Use with caution. |
424 | * | 435 | * |
425 | * @param[in|out] env_head of envelope DLL | 436 | * @param[in,out] env_head of envelope DLL |
426 | * @param[in|out] env_tail tail of envelope DLL | 437 | * @param[in,out] env_tail tail of envelope DLL |
427 | * @param[in|out] env element to remove from the DLL | 438 | * @param[in,out] env element to remove from the DLL |
428 | */ | 439 | */ |
429 | void | 440 | void |
430 | GNUNET_MQ_dll_remove (struct GNUNET_MQ_Envelope **env_head, | 441 | GNUNET_MQ_dll_remove (struct GNUNET_MQ_Envelope **env_head, |
@@ -597,6 +608,7 @@ struct GNUNET_MQ_MessageHandler | |||
597 | * "context"), | 608 | * "context"), |
598 | * GNUNET_MQ_handler_end() | 609 | * GNUNET_MQ_handler_end() |
599 | * }; | 610 | * }; |
611 | * </code> | ||
600 | * | 612 | * |
601 | * @param name unique basename for the functions | 613 | * @param name unique basename for the functions |
602 | * @param code message type constant | 614 | * @param code message type constant |
@@ -680,7 +692,7 @@ struct GNUNET_MQ_MessageHandler | |||
680 | * @return #GNUNET_OK on success, #GNUNET_NO if no handler matched, | 692 | * @return #GNUNET_OK on success, #GNUNET_NO if no handler matched, |
681 | * #GNUNET_SYSERR if message was rejected by check function | 693 | * #GNUNET_SYSERR if message was rejected by check function |
682 | */ | 694 | */ |
683 | int | 695 | enum GNUNET_GenericReturnValue |
684 | GNUNET_MQ_handle_message (const struct GNUNET_MQ_MessageHandler *handlers, | 696 | GNUNET_MQ_handle_message (const struct GNUNET_MQ_MessageHandler *handlers, |
685 | const struct GNUNET_MessageHeader *mh); | 697 | const struct GNUNET_MessageHeader *mh); |
686 | 698 | ||
@@ -983,7 +995,7 @@ GNUNET_MQ_destroy_notify_cancel ( | |||
983 | * Call the message message handler that was registered | 995 | * Call the message message handler that was registered |
984 | * for the type of the given message in the given message queue. | 996 | * for the type of the given message in the given message queue. |
985 | * | 997 | * |
986 | * This function is indented to be used for the implementation | 998 | * This function is intended to be used for the implementation |
987 | * of message queues. | 999 | * of message queues. |
988 | * | 1000 | * |
989 | * @param mq message queue with the handlers | 1001 | * @param mq message queue with the handlers |
@@ -1120,3 +1132,5 @@ GNUNET_MQ_preference_to_string (enum GNUNET_MQ_PreferenceKind type); | |||
1120 | #endif | 1132 | #endif |
1121 | 1133 | ||
1122 | /** @} */ /* end of group mq */ | 1134 | /** @} */ /* end of group mq */ |
1135 | |||
1136 | /** @} */ /* end of group addition */ | ||