improved client API
[oweals/gnunet.git] / src / transport / gnunet-service-transport_clients.c
1 /*
2      This file is part of GNUnet.
3      (C) 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 transport/gnunet-service-transport_clients.c
23  * @brief plugin management API
24  * @author Christian Grothoff
25  */
26 #include "platform.h"
27 #include "gnunet-service-transport_clients.h"
28
29
30 /**
31  * Start handling requests from clients.
32  *
33  * @param server server used to accept clients from.
34  */
35 void 
36 GST_clients_start (struct GNUNET_SERVER_Handle *server)
37 {
38 }
39
40
41 /**
42  * Stop processing clients.
43  */
44 void
45 GST_clients_stop ()
46 {
47 }
48
49
50
51 /**
52  * Initialize a normal client.  We got an init message from this
53  * client, add him to the list of clients for broadcasting of inbound
54  * messages.
55  *
56  * @param cls unused
57  * @param client the client
58  * @param message the init message that was sent
59  */
60 void
61 GST_clients_handle_init (void *cls,
62                          struct GNUNET_SERVER_Client *client,
63                          const struct GNUNET_MessageHeader *message)
64 {
65 }
66
67
68 /**
69  * Client asked for transmission to a peer.  Process the request.
70  *
71  * @param cls unused
72  * @param client the client
73  * @param message the send message that was sent
74  */
75 void
76 GST_clients_handle_send (void *cls,
77                          struct GNUNET_SERVER_Client *client,
78                          const struct GNUNET_MessageHeader *message)
79 {
80 }
81
82
83 /**
84  * Client asked for a quota change for a particular peer.  Process the request.
85  *
86  * @param cls unused
87  * @param client the client
88  * @param message the quota changing message
89  */
90 void
91 GST_clients_handle_set_quota (void *cls,
92                               struct GNUNET_SERVER_Client *client,
93                               const struct GNUNET_MessageHeader *message)
94 {
95 }
96
97
98 /**
99  * Client asked to resolve an address.  Process the request.
100  *
101  * @param cls unused
102  * @param client the client
103  * @param message the resolution request
104  */
105 void
106 GST_clients_handle_address_lookup (void *cls,
107                                    struct GNUNET_SERVER_Client *client,
108                                    const struct GNUNET_MessageHeader *message)
109 {
110 }
111
112
113 /**
114  * Client asked to obtain information about a peer's addresses.
115  * Process the request.
116  *
117  * @param cls unused
118  * @param client the client
119  * @param message the peer address information request
120  */
121 void
122 GST_clients_handle_peer_address_lookup (void *cls,
123                                         struct GNUNET_SERVER_Client *client,
124                                         const struct GNUNET_MessageHeader *message)
125 {
126 }
127
128
129 /**
130  * Client asked to obtain information about all addresses.
131  * Process the request.
132  *
133  * @param cls unused
134  * @param client the client
135  * @param message the peer address information request
136  */
137 void
138 GST_clients_handle_address_iterate (void *cls,
139                                     struct GNUNET_SERVER_Client *client,
140                                     const struct GNUNET_MessageHeader *message)
141 {
142 }
143
144
145 /**
146  * Broadcast the given message to all of our clients.
147  *
148  * @param msg message to broadcast
149  * @param candrop GNUNET_YES if the message can be dropped
150  */
151 void
152 GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
153                        int candrop)
154 {
155   
156 }
157
158
159 /**
160  * Send the given message to a particular client
161  *
162  * @param client target of the message
163  * @param msg message to transmit
164  * @param candrop GNUNET_YES if the message can be dropped
165  */
166 void
167 GST_clients_unicast (struct GNUNET_SERVER_Client *client,
168                      const struct GNUNET_MessageHeader *msg,
169                      int candrop)
170 {
171 }
172
173
174 /* end of file gnunet-service-transport_clients.c */