glitch in the license text detected by hyazinthe, thank you!
[oweals/gnunet.git] / src / ats / gnunet-service-ats_scheduling.h
1 /*
2      This file is part of GNUnet.
3      Copyright (C) 2011 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
16 /**
17  * @file ats/gnunet-service-ats_scheduling.h
18  * @brief ats service, interaction with 'scheduling' API
19  * @author Matthias Wachs
20  * @author Christian Grothoff
21  */
22 #ifndef GNUNET_SERVICE_ATS_SCHEDULING_H
23 #define GNUNET_SERVICE_ATS_SCHEDULING_H
24
25 #include "gnunet_util_lib.h"
26
27
28 /**
29  * Register a new scheduling client.
30  *
31  * @param client handle of the new client
32  * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
33  */
34 int
35 GAS_scheduling_add_client (struct GNUNET_SERVICE_Client *client);
36
37
38 /**
39  * Unregister a client (which may have been a scheduling client,
40  * but this is not assured).
41  *
42  * @param client handle of the (now dead) client
43  */
44 void
45 GAS_scheduling_remove_client (struct GNUNET_SERVICE_Client *client);
46
47
48 /**
49  * Transmit the given address suggestion and bandwidth update to all scheduling
50  * clients.
51  *
52  * @param peer peer for which this is an address suggestion
53  * @param session_id session ID to use
54  * @param bandwidth_out assigned outbound bandwidth
55  * @param bandwidth_in assigned inbound bandwidth
56  */
57 void
58 GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *peer,
59                                             uint32_t session_id,
60                                             struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
61                                             struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in);
62
63
64 /**
65  * Handle 'address add' messages from clients.
66  *
67  * @param client client that sent the request
68  * @param m the request message
69  */
70 void
71 GAS_handle_address_add (const struct AddressAddMessage *m);
72
73
74 /**
75  * Handle 'address update' messages from clients.
76  *
77  * @param m the request message
78  */
79 void
80 GAS_handle_address_update (const struct AddressUpdateMessage *m);
81
82
83 /**
84  * Handle 'address destroyed' messages from clients.
85  *
86  * @param m the request message
87  */
88 void
89 GAS_handle_address_destroyed (const struct AddressDestroyedMessage *m);
90
91
92 #endif
93 /* end of gnunet-service-ats_scheduling.h */