GNUnet  0.11.x
gnunet_nc_lib.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2012-2016 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
33 #ifndef GNUNET_NC_H
34 #define GNUNET_NC_H
35 
36 
46 
47 
58 
59 
65 void
67 
68 
75 void
77  struct GNUNET_MQ_Handle *mq);
78 
79 
87 void
89  const struct GNUNET_MessageHeader *msg,
90  int can_drop);
91 
98 unsigned int
100 
101 #endif
The notification context is the key datastructure for a convenience API used for transmission of noti...
Definition: nc.c:75
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
unsigned int queue_length
Maximum number of optional messages to queue per subscriber.
Definition: nc.c:90
void GNUNET_notification_context_add(struct GNUNET_NotificationContext *nc, struct GNUNET_MQ_Handle *mq)
Add a subscriber to the notification context.
Definition: nc.c:160
unsigned int GNUNET_notification_context_get_size(struct GNUNET_NotificationContext *nc)
Return active number of subscribers in this context.
Definition: nc.c:215
static struct GNUNET_PEERINFO_NotifyContext * nc
Iterator context.
struct GNUNET_NotificationContext * GNUNET_notification_context_create(unsigned int queue_length)
Create a new notification context.
Definition: nc.c:121
Handle to a message queue.
Definition: mq.c:85
void GNUNET_notification_context_broadcast(struct GNUNET_NotificationContext *nc, const struct GNUNET_MessageHeader *msg, int can_drop)
Send a message to all subscribers of this context.
Definition: nc.c:189
struct GNUNET_MQ_Handle * mq
Definition: 003.c:5
Header for all communications.
void GNUNET_notification_context_destroy(struct GNUNET_NotificationContext *nc)
Destroy the context, force disconnect for all subscribers.
Definition: nc.c:137