diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-16 16:03:20 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-16 16:03:20 +0000 |
commit | 16a6919a9f98ee9fa1fee9dd262906c321004a19 (patch) | |
tree | e09d4fe5191dc329b3e1b667f2914f8313bcba59 /src/fs/gnunet-service-fs_cp.h | |
parent | 4d7904c62bb867c44e90b8e9f7cdbb4b283abc44 (diff) | |
download | gnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.tar.gz gnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.zip |
even nicer indentation, thanks to LRN's indent patch
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.h')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.h | 115 |
1 files changed, 59 insertions, 56 deletions
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 84165d8b7..3f25363f1 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h | |||
@@ -170,11 +170,9 @@ struct GSF_PeerTransmitHandle; | |||
170 | * @param atsi performance data for the connection | 170 | * @param atsi performance data for the connection |
171 | * @return handle to connected peer entry | 171 | * @return handle to connected peer entry |
172 | */ | 172 | */ |
173 | struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct | 173 | struct GSF_ConnectedPeer * |
174 | GNUNET_PeerIdentity *peer, | 174 | GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer, |
175 | const struct | 175 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); |
176 | GNUNET_TRANSPORT_ATS_Information | ||
177 | *atsi); | ||
178 | 176 | ||
179 | 177 | ||
180 | /** | 178 | /** |
@@ -183,8 +181,8 @@ struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct | |||
183 | * @param peer peer's identity | 181 | * @param peer peer's identity |
184 | * @return NULL if this peer is not currently connected | 182 | * @return NULL if this peer is not currently connected |
185 | */ | 183 | */ |
186 | struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity | 184 | struct GSF_ConnectedPeer * |
187 | *peer); | 185 | GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer); |
188 | 186 | ||
189 | 187 | ||
190 | /** | 188 | /** |
@@ -201,13 +199,10 @@ struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity | |||
201 | * @param gmc_cls closure for gmc | 199 | * @param gmc_cls closure for gmc |
202 | * @return handle to cancel request | 200 | * @return handle to cancel request |
203 | */ | 201 | */ |
204 | struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, | 202 | struct GSF_PeerTransmitHandle * |
205 | int is_query, | 203 | GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, int is_query, |
206 | uint32_t priority, | 204 | uint32_t priority, struct GNUNET_TIME_Relative timeout, |
207 | struct GNUNET_TIME_Relative | 205 | size_t size, GSF_GetMessageCallback gmc, void *gmc_cls); |
208 | timeout, size_t size, | ||
209 | GSF_GetMessageCallback gmc, | ||
210 | void *gmc_cls); | ||
211 | 206 | ||
212 | 207 | ||
213 | /** | 208 | /** |
@@ -215,7 +210,8 @@ struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, | |||
215 | * | 210 | * |
216 | * @param pth request to cancel | 211 | * @param pth request to cancel |
217 | */ | 212 | */ |
218 | void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth); | 213 | void |
214 | GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth); | ||
219 | 215 | ||
220 | 216 | ||
221 | /** | 217 | /** |
@@ -225,9 +221,10 @@ void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth); | |||
225 | * @param request_time time at which the original query was transmitted | 221 | * @param request_time time at which the original query was transmitted |
226 | * @param request_priority priority of the original request | 222 | * @param request_priority priority of the original request |
227 | */ | 223 | */ |
228 | void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, | 224 | void |
229 | struct GNUNET_TIME_Absolute request_time, | 225 | GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, |
230 | uint32_t request_priority); | 226 | struct GNUNET_TIME_Absolute request_time, |
227 | uint32_t request_priority); | ||
231 | 228 | ||
232 | 229 | ||
233 | /** | 230 | /** |
@@ -237,9 +234,9 @@ void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, | |||
237 | * @param cp responding peer (will be updated) | 234 | * @param cp responding peer (will be updated) |
238 | * @param initiator_client local client on responsible for query | 235 | * @param initiator_client local client on responsible for query |
239 | */ | 236 | */ |
240 | void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, | 237 | void |
241 | struct GSF_LocalClient | 238 | GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, |
242 | *initiator_client); | 239 | struct GSF_LocalClient *initiator_client); |
243 | 240 | ||
244 | 241 | ||
245 | /** | 242 | /** |
@@ -249,9 +246,10 @@ void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, | |||
249 | * @param cp responding peer (will be updated) | 246 | * @param cp responding peer (will be updated) |
250 | * @param initiator_peer other peer responsible for query | 247 | * @param initiator_peer other peer responsible for query |
251 | */ | 248 | */ |
252 | void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | 249 | void |
253 | const struct GSF_ConnectedPeer | 250 | GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, |
254 | *initiator_peer); | 251 | const struct GSF_ConnectedPeer |
252 | *initiator_peer); | ||
255 | 253 | ||
256 | 254 | ||
257 | /** | 255 | /** |
@@ -265,13 +263,12 @@ void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | |||
265 | * unless we see some further activity from it | 263 | * unless we see some further activity from it |
266 | * @param atsi status information | 264 | * @param atsi status information |
267 | */ | 265 | */ |
268 | void GSF_peer_status_handler_ (void *cls, | 266 | void |
269 | const struct GNUNET_PeerIdentity *peer, | 267 | GSF_peer_status_handler_ (void *cls, const struct GNUNET_PeerIdentity *peer, |
270 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 268 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
271 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 269 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
272 | struct GNUNET_TIME_Absolute timeout, | 270 | struct GNUNET_TIME_Absolute timeout, |
273 | const struct GNUNET_TRANSPORT_ATS_Information | 271 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); |
274 | *atsi); | ||
275 | 272 | ||
276 | 273 | ||
277 | /** | 274 | /** |
@@ -285,11 +282,12 @@ void GSF_peer_status_handler_ (void *cls, | |||
285 | * @return GNUNET_OK to keep the connection open, | 282 | * @return GNUNET_OK to keep the connection open, |
286 | * GNUNET_SYSERR to close it (signal serious error) | 283 | * GNUNET_SYSERR to close it (signal serious error) |
287 | */ | 284 | */ |
288 | int GSF_handle_p2p_migration_stop_ (void *cls, | 285 | int |
289 | const struct GNUNET_PeerIdentity *other, | 286 | GSF_handle_p2p_migration_stop_ (void *cls, |
290 | const struct GNUNET_MessageHeader *message, | 287 | const struct GNUNET_PeerIdentity *other, |
291 | const struct | 288 | const struct GNUNET_MessageHeader *message, |
292 | GNUNET_TRANSPORT_ATS_Information *atsi); | 289 | const struct GNUNET_TRANSPORT_ATS_Information |
290 | *atsi); | ||
293 | 291 | ||
294 | 292 | ||
295 | /** | 293 | /** |
@@ -303,11 +301,9 @@ int GSF_handle_p2p_migration_stop_ (void *cls, | |||
303 | * @param message the actual message | 301 | * @param message the actual message |
304 | * @return pending request handle, NULL on error | 302 | * @return pending request handle, NULL on error |
305 | */ | 303 | */ |
306 | struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct | 304 | struct GSF_PendingRequest * |
307 | GNUNET_PeerIdentity *other, | 305 | GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, |
308 | const struct | 306 | const struct GNUNET_MessageHeader *message); |
309 | GNUNET_MessageHeader | ||
310 | *message); | ||
311 | 307 | ||
312 | 308 | ||
313 | /** | 309 | /** |
@@ -316,9 +312,8 @@ struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct | |||
316 | * @param cp peer to query | 312 | * @param cp peer to query |
317 | * @return performance data record for the peer | 313 | * @return performance data record for the peer |
318 | */ | 314 | */ |
319 | struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct | 315 | struct GSF_PeerPerformanceData * |
320 | GSF_ConnectedPeer | 316 | GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp); |
321 | *cp); | ||
322 | 317 | ||
323 | 318 | ||
324 | /** | 319 | /** |
@@ -328,8 +323,9 @@ struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct | |||
328 | * @param cp peer to ask | 323 | * @param cp peer to ask |
329 | * @param block_time until when to block | 324 | * @param block_time until when to block |
330 | */ | 325 | */ |
331 | void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | 326 | void |
332 | struct GNUNET_TIME_Relative block_time); | 327 | GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, |
328 | struct GNUNET_TIME_Relative block_time); | ||
333 | 329 | ||
334 | 330 | ||
335 | /** | 331 | /** |
@@ -339,8 +335,9 @@ void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | |||
339 | * @param cls unused | 335 | * @param cls unused |
340 | * @param peer identity of peer that connected | 336 | * @param peer identity of peer that connected |
341 | */ | 337 | */ |
342 | void GSF_peer_disconnect_handler_ (void *cls, | 338 | void |
343 | const struct GNUNET_PeerIdentity *peer); | 339 | GSF_peer_disconnect_handler_ (void *cls, |
340 | const struct GNUNET_PeerIdentity *peer); | ||
344 | 341 | ||
345 | 342 | ||
346 | /** | 343 | /** |
@@ -349,7 +346,8 @@ void GSF_peer_disconnect_handler_ (void *cls, | |||
349 | * | 346 | * |
350 | * @param lc handle to the local client (henceforth invalid) | 347 | * @param lc handle to the local client (henceforth invalid) |
351 | */ | 348 | */ |
352 | void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc); | 349 | void |
350 | GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc); | ||
353 | 351 | ||
354 | 352 | ||
355 | /** | 353 | /** |
@@ -361,8 +359,9 @@ void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc); | |||
361 | * @param cp peer to reserve bandwidth from | 359 | * @param cp peer to reserve bandwidth from |
362 | * @param pref preference change | 360 | * @param pref preference change |
363 | */ | 361 | */ |
364 | void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | 362 | void |
365 | uint64_t pref); | 363 | GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, |
364 | uint64_t pref); | ||
366 | 365 | ||
367 | 366 | ||
368 | /** | 367 | /** |
@@ -371,8 +370,9 @@ void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | |||
371 | * @param cp peer to reserve bandwidth from | 370 | * @param cp peer to reserve bandwidth from |
372 | * @param id identity to set (written to) | 371 | * @param id identity to set (written to) |
373 | */ | 372 | */ |
374 | void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, | 373 | void |
375 | struct GNUNET_PeerIdentity *id); | 374 | GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, |
375 | struct GNUNET_PeerIdentity *id); | ||
376 | 376 | ||
377 | 377 | ||
378 | /** | 378 | /** |
@@ -381,19 +381,22 @@ void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, | |||
381 | * @param it function to call for each peer | 381 | * @param it function to call for each peer |
382 | * @param it_cls closure for it | 382 | * @param it_cls closure for it |
383 | */ | 383 | */ |
384 | void GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls); | 384 | void |
385 | GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls); | ||
385 | 386 | ||
386 | 387 | ||
387 | /** | 388 | /** |
388 | * Initialize peer management subsystem. | 389 | * Initialize peer management subsystem. |
389 | */ | 390 | */ |
390 | void GSF_connected_peer_init_ (void); | 391 | void |
392 | GSF_connected_peer_init_ (void); | ||
391 | 393 | ||
392 | 394 | ||
393 | /** | 395 | /** |
394 | * Shutdown peer management subsystem. | 396 | * Shutdown peer management subsystem. |
395 | */ | 397 | */ |
396 | void GSF_connected_peer_done_ (void); | 398 | void |
399 | GSF_connected_peer_done_ (void); | ||
397 | 400 | ||
398 | 401 | ||
399 | #endif | 402 | #endif |