diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-13 13:17:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-13 13:17:11 +0000 |
commit | 24bc1b853ac6aae405af8725fa089cc53b0ec9f1 (patch) | |
tree | e3650c874a20d53d7fe08738a27cdb6e2ff8803a /src/include | |
parent | e46a3d08b2d167b405e745d3854b4faf5b5c1157 (diff) | |
download | gnunet-24bc1b853ac6aae405af8725fa089cc53b0ec9f1.tar.gz gnunet-24bc1b853ac6aae405af8725fa089cc53b0ec9f1.zip |
renaming
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_ats_service.h | 48 | ||||
-rw-r--r-- | src/include/gnunet_client_lib.h | 3 |
2 files changed, 30 insertions, 21 deletions
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index 12446991a..afbb5d6c6 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h | |||
@@ -44,6 +44,12 @@ struct GNUNET_ATS_SchedulingHandle; | |||
44 | 44 | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Opaque session handle, defined by plugins. Contents not known to ATS. | ||
48 | */ | ||
49 | struct Session; | ||
50 | |||
51 | |||
52 | /** | ||
47 | * Signature of a function called by ATS with the current bandwidth | 53 | * Signature of a function called by ATS with the current bandwidth |
48 | * and address preferences as determined by ATS. | 54 | * and address preferences as determined by ATS. |
49 | * | 55 | * |
@@ -76,34 +82,34 @@ typedef void (*GNUNET_ATS_AddressSuggestionCallback) (void *cls, | |||
76 | * Initialize the ATS subsystem. | 82 | * Initialize the ATS subsystem. |
77 | * | 83 | * |
78 | * @param cfg configuration to use | 84 | * @param cfg configuration to use |
79 | * @param alloc_cb notification to call whenever the allocation changed | 85 | * @param suggest_cb notification to call whenever the suggestation changed |
80 | * @param alloc_cb_cls closure for 'alloc_cb' | 86 | * @param suggest_cb_cls closure for 'suggest_cb' |
81 | * @return ats context | 87 | * @return ats context |
82 | */ | 88 | */ |
83 | struct GNUNET_ATS_SchedulingHandle * | 89 | struct GNUNET_ATS_SchedulingHandle * |
84 | GNUNET_ATS_scheduling_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | 90 | GNUNET_ATS_scheduling_init (const struct GNUNET_CONFIGURATION_Handle *cfg, |
85 | GNUNET_ATS_AddressSuggestionCallback alloc_cb, | 91 | GNUNET_ATS_AddressSuggestionCallback suggest_cb, |
86 | void *alloc_cb_cls); | 92 | void *suggest_cb_cls); |
87 | 93 | ||
88 | 94 | ||
89 | /** | 95 | /** |
90 | * Client is done with ATS scheduling, release resources. | 96 | * Client is done with ATS scheduling, release resources. |
91 | * | 97 | * |
92 | * @param atc handle to release | 98 | * @param sh handle to release |
93 | */ | 99 | */ |
94 | void | 100 | void |
95 | GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *atc); | 101 | GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh); |
96 | 102 | ||
97 | 103 | ||
98 | /** | 104 | /** |
99 | * We would like to establish a new connection with a peer. ATS | 105 | * We would like to establish a new connection with a peer. ATS |
100 | * should suggest a good address to begin with. | 106 | * should suggest a good address to begin with. |
101 | * | 107 | * |
102 | * @param atc handle | 108 | * @param sh handle |
103 | * @param peer identity of the peer we need an address for | 109 | * @param peer identity of the peer we need an address for |
104 | */ | 110 | */ |
105 | void | 111 | void |
106 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *atc, | 112 | GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *sh, |
107 | const struct GNUNET_PeerIdentity *peer); | 113 | const struct GNUNET_PeerIdentity *peer); |
108 | 114 | ||
109 | 115 | ||
@@ -115,7 +121,7 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *atc, | |||
115 | * which case the call may be ignored or the information may be stored | 121 | * which case the call may be ignored or the information may be stored |
116 | * for later use). Update bandwidth assignments. | 122 | * for later use). Update bandwidth assignments. |
117 | * | 123 | * |
118 | * @param atc handle | 124 | * @param sh handle |
119 | * @param peer identity of the new peer | 125 | * @param peer identity of the new peer |
120 | * @param plugin_name name of the transport plugin | 126 | * @param plugin_name name of the transport plugin |
121 | * @param plugin_addr address (if available) | 127 | * @param plugin_addr address (if available) |
@@ -125,7 +131,7 @@ GNUNET_ATS_suggest_address (struct GNUNET_ATS_SchedulingHandle *atc, | |||
125 | * @param ats_count number of performance records in 'ats' | 131 | * @param ats_count number of performance records in 'ats' |
126 | */ | 132 | */ |
127 | void | 133 | void |
128 | GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *atc, | 134 | GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *sh, |
129 | const struct GNUNET_PeerIdentity *peer, | 135 | const struct GNUNET_PeerIdentity *peer, |
130 | const char *plugin_name, | 136 | const char *plugin_name, |
131 | const void *plugin_addr, size_t plugin_addr_len, | 137 | const void *plugin_addr, size_t plugin_addr_len, |
@@ -137,20 +143,20 @@ GNUNET_ATS_address_update (struct GNUNET_ATS_SchedulingHandle *atc, | |||
137 | /** | 143 | /** |
138 | * A session got destroyed, stop including it as a valid address. | 144 | * A session got destroyed, stop including it as a valid address. |
139 | * | 145 | * |
140 | * @param atc handle | 146 | * @param sh handle |
141 | * @param peer identity of the peer | 147 | * @param peer identity of the peer |
142 | * @param plugin_name name of the transport plugin | 148 | * @param plugin_name name of the transport plugin |
143 | * @param plugin_addr address (if available) | 149 | * @param plugin_addr address (if available) |
144 | * @param plugin_addr_len number of bytes in plugin_addr | 150 | * @param plugin_addr_len number of bytes in plugin_addr |
145 | * @param session session handle that is no longer valid | 151 | * @param session session handle that is no longer valid (if available) |
146 | */ | 152 | */ |
147 | void | 153 | void |
148 | GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *atc, | 154 | GNUNET_ATS_address_destroyed (struct GNUNET_ATS_SchedulingHandle *sh, |
149 | const struct GNUNET_PeerIdentity *peer, | 155 | const struct GNUNET_PeerIdentity *peer, |
150 | const char *plugin_name, | 156 | const char *plugin_name, |
151 | const void *plugin_addr, | 157 | const void *plugin_addr, |
152 | size_t plugin_addr_len, | 158 | size_t plugin_addr_len, |
153 | const struct Session *session); | 159 | struct Session *session); |
154 | 160 | ||
155 | 161 | ||
156 | /* ******************************** Performance API ***************************** */ | 162 | /* ******************************** Performance API ***************************** */ |
@@ -197,7 +203,7 @@ typedef void (*GNUNET_ATS_PeerInformationCallback) (void *cls, | |||
197 | * Get handle to access performance API of the ATS subsystem. | 203 | * Get handle to access performance API of the ATS subsystem. |
198 | * | 204 | * |
199 | * @param cfg configuration to use | 205 | * @param cfg configuration to use |
200 | * @param infocb function to call on allocation changes, can be NULL | 206 | * @param infocb function to call on performance changes, can be NULL |
201 | * @param infocb_cls closure for infocb | 207 | * @param infocb_cls closure for infocb |
202 | * @return ats performance context | 208 | * @return ats performance context |
203 | */ | 209 | */ |
@@ -210,10 +216,10 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
210 | /** | 216 | /** |
211 | * Client is done using the ATS performance subsystem, release resources. | 217 | * Client is done using the ATS performance subsystem, release resources. |
212 | * | 218 | * |
213 | * @param atc handle | 219 | * @param ph handle |
214 | */ | 220 | */ |
215 | void | 221 | void |
216 | GNUNET_ATS_performance_done (struct GNUNET_ATS_SchedulingHandle *atc); | 222 | GNUNET_ATS_performance_done (struct GNUNET_ATS_SchedulingHandle *ph); |
217 | 223 | ||
218 | 224 | ||
219 | /** | 225 | /** |
@@ -248,7 +254,7 @@ struct GNUNET_ATS_ReservationContext; | |||
248 | * the current amount of traffic we receive from the peer and ensure | 254 | * the current amount of traffic we receive from the peer and ensure |
249 | * that the peer could add 'amount' of data to its stream. | 255 | * that the peer could add 'amount' of data to its stream. |
250 | * | 256 | * |
251 | * @param h core handle | 257 | * @param ph performance handle |
252 | * @param peer identifies the peer | 258 | * @param peer identifies the peer |
253 | * @param amount reserve N bytes for receiving, negative | 259 | * @param amount reserve N bytes for receiving, negative |
254 | * amounts can be used to undo a (recent) reservation; | 260 | * amounts can be used to undo a (recent) reservation; |
@@ -258,7 +264,7 @@ struct GNUNET_ATS_ReservationContext; | |||
258 | * @deprecated will be replaced soon | 264 | * @deprecated will be replaced soon |
259 | */ | 265 | */ |
260 | struct GNUNET_ATS_ReservationContext * | 266 | struct GNUNET_ATS_ReservationContext * |
261 | GNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *h, | 267 | GNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *ph, |
262 | const struct GNUNET_PeerIdentity *peer, | 268 | const struct GNUNET_PeerIdentity *peer, |
263 | int32_t amount, | 269 | int32_t amount, |
264 | GNUNET_ATS_ReservationCallback info, | 270 | GNUNET_ATS_ReservationCallback info, |
@@ -311,12 +317,12 @@ enum GNUNET_ATS_PreferenceKind | |||
311 | * Change preferences for the given peer. Preference changes are forgotten if peers | 317 | * Change preferences for the given peer. Preference changes are forgotten if peers |
312 | * disconnect. | 318 | * disconnect. |
313 | * | 319 | * |
314 | * @param cls closure | 320 | * @param ph performance handle |
315 | * @param peer identifies the peer | 321 | * @param peer identifies the peer |
316 | * @param ... 0-terminated specification of the desired changes | 322 | * @param ... 0-terminated specification of the desired changes |
317 | */ | 323 | */ |
318 | void | 324 | void |
319 | GNUNET_ATS_change_preference (struct GNUNET_ATS_PerformanceHandle *h, | 325 | GNUNET_ATS_change_preference (struct GNUNET_ATS_PerformanceHandle *ph, |
320 | const struct GNUNET_PeerIdentity *peer, | 326 | const struct GNUNET_PeerIdentity *peer, |
321 | ...); | 327 | ...); |
322 | 328 | ||
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h index 64892de0f..a96215886 100644 --- a/src/include/gnunet_client_lib.h +++ b/src/include/gnunet_client_lib.h | |||
@@ -89,6 +89,7 @@ void | |||
89 | GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, | 89 | GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, |
90 | int finish_pending_write); | 90 | int finish_pending_write); |
91 | 91 | ||
92 | |||
92 | /** | 93 | /** |
93 | * Type of a function to call when we receive a message | 94 | * Type of a function to call when we receive a message |
94 | * from the service. | 95 | * from the service. |
@@ -100,6 +101,7 @@ typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls, | |||
100 | const struct GNUNET_MessageHeader | 101 | const struct GNUNET_MessageHeader |
101 | * msg); | 102 | * msg); |
102 | 103 | ||
104 | |||
103 | /** | 105 | /** |
104 | * Type of a function to call when we have finished shutting | 106 | * Type of a function to call when we have finished shutting |
105 | * down a service, or failed. | 107 | * down a service, or failed. |
@@ -112,6 +114,7 @@ typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls, | |||
112 | */ | 114 | */ |
113 | typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls, int reason); | 115 | typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls, int reason); |
114 | 116 | ||
117 | |||
115 | /** | 118 | /** |
116 | * Read from the service. | 119 | * Read from the service. |
117 | * | 120 | * |