aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-16 16:03:20 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-16 16:03:20 +0000
commit16a6919a9f98ee9fa1fee9dd262906c321004a19 (patch)
treee09d4fe5191dc329b3e1b667f2914f8313bcba59 /src/fs/gnunet-service-fs_pr.h
parent4d7904c62bb867c44e90b8e9f7cdbb4b283abc44 (diff)
downloadgnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.tar.gz
gnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.zip
even nicer indentation, thanks to LRN's indent patch
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.h')
-rw-r--r--src/fs/gnunet-service-fs_pr.h89
1 files changed, 41 insertions, 48 deletions
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index f2e7bcf62..b68989be7 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -201,33 +201,19 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls,
201 * @param rh_cls closure for rh 201 * @param rh_cls closure for rh
202 * @return handle for the new pending request 202 * @return handle for the new pending request
203 */ 203 */
204struct GSF_PendingRequest *GSF_pending_request_create_ (enum 204struct GSF_PendingRequest *
205 GSF_PendingRequestOptions 205GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
206 options, 206 enum GNUNET_BLOCK_Type type,
207 enum GNUNET_BLOCK_Type 207 const GNUNET_HashCode * query,
208 type, 208 const GNUNET_HashCode * namespace,
209 const GNUNET_HashCode * 209 const struct GNUNET_PeerIdentity *target,
210 query, 210 const char *bf_data, size_t bf_size,
211 const GNUNET_HashCode * 211 uint32_t mingle, uint32_t anonymity_level,
212 namespace, 212 uint32_t priority, int32_t ttl,
213 const struct 213 GNUNET_PEER_Id sender_pid,
214 GNUNET_PeerIdentity 214 const GNUNET_HashCode * replies_seen,
215 *target, 215 unsigned int replies_seen_count,
216 const char *bf_data, 216 GSF_PendingRequestReplyHandler rh, void *rh_cls);
217 size_t bf_size,
218 uint32_t mingle,
219 uint32_t
220 anonymity_level,
221 uint32_t priority,
222 int32_t ttl,
223 GNUNET_PEER_Id
224 sender_pid,
225 const GNUNET_HashCode *
226 replies_seen,
227 unsigned int
228 replies_seen_count,
229 GSF_PendingRequestReplyHandler
230 rh, void *rh_cls);
231 217
232 218
233/** 219/**
@@ -238,9 +224,10 @@ struct GSF_PendingRequest *GSF_pending_request_create_ (enum
238 * @param replies_seen hash codes of replies that we've seen 224 * @param replies_seen hash codes of replies that we've seen
239 * @param replies_seen_count size of the replies_seen array 225 * @param replies_seen_count size of the replies_seen array
240 */ 226 */
241void GSF_pending_request_update_ (struct GSF_PendingRequest *pr, 227void
242 const GNUNET_HashCode * replies_seen, 228GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
243 unsigned int replies_seen_count); 229 const GNUNET_HashCode * replies_seen,
230 unsigned int replies_seen_count);
244 231
245 232
246/** 233/**
@@ -249,9 +236,8 @@ void GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
249 * @param pr pending request 236 * @param pr pending request
250 * @return associated public data 237 * @return associated public data
251 */ 238 */
252struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct 239struct GSF_PendingRequestData *
253 GSF_PendingRequest 240GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
254 *pr);
255 241
256 242
257/** 243/**
@@ -263,8 +249,9 @@ struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct
263 * @param pra another pending request 249 * @param pra another pending request
264 * @return GNUNET_OK if the requests are compatible 250 * @return GNUNET_OK if the requests are compatible
265 */ 251 */
266int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, 252int
267 struct GSF_PendingRequest *prb); 253GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
254 struct GSF_PendingRequest *prb);
268 255
269 256
270/** 257/**
@@ -276,9 +263,9 @@ int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
276 * @param buf where to copy the message (can be NULL) 263 * @param buf where to copy the message (can be NULL)
277 * @return number of bytes needed (if buf_size too small) or used 264 * @return number of bytes needed (if buf_size too small) or used
278 */ 265 */
279size_t GSF_pending_request_get_message_ (struct GSF_PendingRequest 266size_t
280 *pr, size_t buf_size, 267GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
281 void *buf); 268 size_t buf_size, void *buf);
282 269
283 270
284/** 271/**
@@ -287,8 +274,8 @@ size_t GSF_pending_request_get_message_ (struct GSF_PendingRequest
287 * @param pr request to cancel 274 * @param pr request to cancel
288 * @param full_cleanup fully purge the request 275 * @param full_cleanup fully purge the request
289 */ 276 */
290void GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, 277void
291 int full_cleanup); 278GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup);
292 279
293 280
294/** 281/**
@@ -311,7 +298,8 @@ typedef int (*GSF_PendingRequestIterator) (void *cls,
311 * @param it function to call for each request 298 * @param it function to call for each request
312 * @param cls closure for it 299 * @param cls closure for it
313 */ 300 */
314void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls); 301void
302GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
315 303
316 304
317/** 305/**
@@ -327,8 +315,9 @@ void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
327 * GNUNET_SYSERR if the message was malformed (close connection, 315 * GNUNET_SYSERR if the message was malformed (close connection,
328 * do not cache under any circumstances) 316 * do not cache under any circumstances)
329 */ 317 */
330int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp, 318int
331 const struct GNUNET_MessageHeader *message); 319GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
320 const struct GNUNET_MessageHeader *message);
332 321
333 322
334/** 323/**
@@ -336,7 +325,8 @@ int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
336 * 325 *
337 * @param pr the pending request to process 326 * @param pr the pending request to process
338 */ 327 */
339void GSF_dht_lookup_ (struct GSF_PendingRequest *pr); 328void
329GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
340 330
341 331
342/** 332/**
@@ -360,20 +350,23 @@ typedef void (*GSF_LocalLookupContinuation) (void *cls,
360 * @param cont function to call at the end 350 * @param cont function to call at the end
361 * @param cont_cls closure for cont 351 * @param cont_cls closure for cont
362 */ 352 */
363void GSF_local_lookup_ (struct GSF_PendingRequest *pr, 353void
364 GSF_LocalLookupContinuation cont, void *cont_cls); 354GSF_local_lookup_ (struct GSF_PendingRequest *pr,
355 GSF_LocalLookupContinuation cont, void *cont_cls);
365 356
366 357
367/** 358/**
368 * Setup the subsystem. 359 * Setup the subsystem.
369 */ 360 */
370void GSF_pending_request_init_ (void); 361void
362GSF_pending_request_init_ (void);
371 363
372 364
373/** 365/**
374 * Shutdown the subsystem. 366 * Shutdown the subsystem.
375 */ 367 */
376void GSF_pending_request_done_ (void); 368void
369GSF_pending_request_done_ (void);
377 370
378 371
379#endif 372#endif