diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-19 14:31:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-19 14:31:14 +0000 |
commit | 63eb0920ef2261e98dc0ff6310c303a5d8c163ce (patch) | |
tree | 3c88a4fce9f507e2978a2ea463d51e692c31202c /src/include/gnunet_mq_lib.h | |
parent | 64fda257bdaf166ed3d96dce3a01ea14017a2a3e (diff) | |
download | gnunet-63eb0920ef2261e98dc0ff6310c303a5d8c163ce.tar.gz gnunet-63eb0920ef2261e98dc0ff6310c303a5d8c163ce.zip |
towards adding mq destruction notification
Diffstat (limited to 'src/include/gnunet_mq_lib.h')
-rw-r--r-- | src/include/gnunet_mq_lib.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index 999ee4134..ff8c9ba1b 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -637,6 +637,36 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq); | |||
637 | 637 | ||
638 | 638 | ||
639 | /** | 639 | /** |
640 | * Handle we return for callbacks registered to be | ||
641 | * notified when #GNUNET_MQ_destroy() is called on a queue. | ||
642 | */ | ||
643 | struct GNUNET_MQ_DestroyNotificationHandle; | ||
644 | |||
645 | |||
646 | /** | ||
647 | * Register function to be called whenever @a mq is being | ||
648 | * destroyed. | ||
649 | * | ||
650 | * @param mq message queue to watch | ||
651 | * @param cb function to call on @a mq destruction | ||
652 | * @param cb_cls closure for @a cb | ||
653 | * @return handle for #GNUNET_MQ_destroy_notify_cancel(). | ||
654 | */ | ||
655 | struct GNUNET_MQ_DestroyNotificationHandle * | ||
656 | GNUNET_MQ_destroy_notify (struct GNUNET_MQ_Handle *mq, | ||
657 | GNUNET_SCHEDULER_TaskCallback cb, | ||
658 | void *cb_cls); | ||
659 | |||
660 | /** | ||
661 | * Cancel registration from #GNUNET_MQ_destroy_notify(). | ||
662 | * | ||
663 | * @param dnh handle for registration to cancel | ||
664 | */ | ||
665 | void | ||
666 | GNUNET_MQ_destroy_notify_cancel (struct GNUNET_MQ_DestroyNotificationHandle *dnh); | ||
667 | |||
668 | |||
669 | /** | ||
640 | * Call the message message handler that was registered | 670 | * Call the message message handler that was registered |
641 | * for the type of the given message in the given message queue. | 671 | * for the type of the given message in the given message queue. |
642 | * | 672 | * |