#include "gnunet_util_lib.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_MESSENGER_Subscription |
Functions | |
struct GNUNET_MESSENGER_Subscription * | create_subscription (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_Member *member, const struct GNUNET_ShortHashCode *discourse, struct GNUNET_TIME_Absolute timestamp, struct GNUNET_TIME_Relative duration) |
void | destroy_subscription (struct GNUNET_MESSENGER_Subscription *subscribtion) |
const struct GNUNET_ShortHashCode * | get_subscription_discourse (const struct GNUNET_MESSENGER_Subscription *subscribtion) |
enum GNUNET_GenericReturnValue | has_subscription_of_timestamp (const struct GNUNET_MESSENGER_Subscription *subscribtion, struct GNUNET_TIME_Absolute timestamp) |
void | update_subscription (struct GNUNET_MESSENGER_Subscription *subscribtion, struct GNUNET_TIME_Absolute timestamp, struct GNUNET_TIME_Relative duration) |
void | update_subscription_timing (struct GNUNET_MESSENGER_Subscription *subscribtion) |
struct GNUNET_MESSENGER_Subscription * create_subscription | ( | struct GNUNET_MESSENGER_SrvRoom * | room, |
struct GNUNET_MESSENGER_Member * | member, | ||
const struct GNUNET_ShortHashCode * | discourse, | ||
struct GNUNET_TIME_Absolute | timestamp, | ||
struct GNUNET_TIME_Relative | duration | ||
) |
Definition at line 33 of file gnunet-service-messenger_subscription.c.
References GNUNET_MESSENGER_Subscription::discourse, duration, GNUNET_MESSENGER_Subscription::end, GNUNET_assert, GNUNET_new, GNUNET_TIME_absolute_add(), GNUNET_MESSENGER_Subscription::member, GNUNET_MESSENGER_Subscription::room, GNUNET_MESSENGER_Subscription::start, GNUNET_MESSENGER_Subscription::task, and timestamp().
Referenced by handle_message_subscribe().
void destroy_subscription | ( | struct GNUNET_MESSENGER_Subscription * | subscribtion | ) |
Definition at line 61 of file gnunet-service-messenger_subscription.c.
References GNUNET_assert, GNUNET_free, GNUNET_SCHEDULER_cancel(), and GNUNET_MESSENGER_Subscription::task.
Referenced by iterate_destroy_subscription(), and task_subscription_exit().
const struct GNUNET_ShortHashCode * get_subscription_discourse | ( | const struct GNUNET_MESSENGER_Subscription * | subscribtion | ) |
Definition at line 72 of file gnunet-service-messenger_subscription.c.
References GNUNET_MESSENGER_Subscription::discourse, and GNUNET_assert.
Referenced by add_member_subscription(), and remove_member_subscription().
enum GNUNET_GenericReturnValue has_subscription_of_timestamp | ( | const struct GNUNET_MESSENGER_Subscription * | subscribtion, |
struct GNUNET_TIME_Absolute | timestamp | ||
) |
Definition at line 80 of file gnunet-service-messenger_subscription.c.
References GNUNET_MESSENGER_Subscription::end, GNUNET_assert, GNUNET_NO, GNUNET_TIME_absolute_cmp, GNUNET_YES, GNUNET_MESSENGER_Subscription::start, and timestamp().
Referenced by notify_srv_handle_message().
void update_subscription | ( | struct GNUNET_MESSENGER_Subscription * | subscribtion, |
struct GNUNET_TIME_Absolute | timestamp, | ||
struct GNUNET_TIME_Relative | duration | ||
) |
Definition at line 93 of file gnunet-service-messenger_subscription.c.
References duration, end, GNUNET_MESSENGER_Subscription::end, GNUNET_assert, GNUNET_TIME_absolute_add(), GNUNET_TIME_absolute_cmp, GNUNET_MESSENGER_Subscription::start, and timestamp().
Referenced by handle_message_subscribe().
void update_subscription_timing | ( | struct GNUNET_MESSENGER_Subscription * | subscribtion | ) |
Definition at line 142 of file gnunet-service-messenger_subscription.c.
References GNUNET_MESSENGER_Subscription::end, GNUNET_assert, GNUNET_SCHEDULER_add_delayed(), GNUNET_SCHEDULER_cancel(), GNUNET_TIME_absolute_get(), GNUNET_TIME_absolute_get_difference(), GNUNET_MESSENGER_Subscription::task, and task_subscription_exit().
Referenced by handle_message_subscribe().