hxing
[oweals/gnunet.git] / src / core / gnunet-service-core_clients.h
1 /*
2      This file is part of GNUnet.
3      (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      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      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file core/gnunet-service-core_clients.h
23  * @brief code for managing interactions with clients of core service
24  * @author Christian Grothoff
25  */
26 #include "gnunet_util_lib.h"
27 #include "gnunet_service_core_clients.h"
28
29 #ifndef GNUNET_SERVICE_CORE_CLIENTS_H
30 #define GNUNET_SERVICE_CORE_CLIENTS_H
31
32
33 /**
34  * Notify client about a change to existing connection to one of our neighbours.
35  *
36  * @param neighbour identity of the neighbour that changed status
37  * @param tmap updated type map for the neighbour, NULL for disconnect
38  */
39 void
40 GDS_CLIENTS_notify_clients_about_neighbour (const struct GNUNET_PeerIdentity *neighbour,
41                                             const struct GSC_TypeMap *tmap);
42
43
44 /**
45  * Deliver P2P message to interested clients.
46  *
47  * @param sender peer who sent us the message 
48  * @param m the message
49  */
50 void
51 GSC_CLIENTS_deliver_message (const struct GNUNET_PeerIdentity *sender,
52                              const struct GNUNET_MessageHeader *m);
53
54
55 /**
56  * Initialize clients subsystem.
57  *
58  * @param server handle to server clients connect to
59  */
60 void
61 GSC_CLIENTS_init (struct GNUNET_SERVER_Handle *server);
62
63
64 /**
65  * Shutdown clients subsystem.
66  */
67 void
68 GSC_CLIENTS_done (void);
69
70 #endif
71 /* end of gnunet-service-core_clients.h */