aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-31 21:23:23 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-31 21:23:23 +0000
commita78990b412db2c0ead2da8061c4f454f068991d1 (patch)
tree2e87adae62fd1ca3cd5a9f4c69248986f78bb106 /src/fs/gnunet-service-fs_pr.h
parent406c7d2d2d126c994a1fff13470b1f96439c6f9d (diff)
downloadgnunet-a78990b412db2c0ead2da8061c4f454f068991d1.tar.gz
gnunet-a78990b412db2c0ead2da8061c4f454f068991d1.zip
converting FS to new MQ-based core API
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.h')
-rw-r--r--src/fs/gnunet-service-fs_pr.h62
1 files changed, 27 insertions, 35 deletions
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index 2765f9b3d..fe4297414 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -40,34 +40,34 @@ enum GSF_PendingRequestOptions
40 */ 40 */
41 GSF_PRO_DEFAULTS = 0, 41 GSF_PRO_DEFAULTS = 0,
42 42
43 /** 43 /**
44 * Request must only be processed locally. 44 * Request must only be processed locally.
45 */ 45 */
46 GSF_PRO_LOCAL_ONLY = 1, 46 GSF_PRO_LOCAL_ONLY = 1,
47 47
48 /** 48 /**
49 * Request must only be forwarded (no routing) 49 * Request must only be forwarded (no routing)
50 */ 50 */
51 GSF_PRO_FORWARD_ONLY = 2, 51 GSF_PRO_FORWARD_ONLY = 2,
52 52
53 /** 53 /**
54 * Request persists indefinitely (no expiration). 54 * Request persists indefinitely (no expiration).
55 */ 55 */
56 GSF_PRO_REQUEST_NEVER_EXPIRES = 4, 56 GSF_PRO_REQUEST_NEVER_EXPIRES = 4,
57 57
58 /** 58 /**
59 * Request is allowed to refresh bloomfilter and change mingle value. 59 * Request is allowed to refresh bloomfilter and change mingle value.
60 */ 60 */
61 GSF_PRO_BLOOMFILTER_FULL_REFRESH = 8, 61 GSF_PRO_BLOOMFILTER_FULL_REFRESH = 8,
62 62
63 /** 63 /**
64 * Request priority is allowed to be exceeded. 64 * Request priority is allowed to be exceeded.
65 */ 65 */
66 GSF_PRO_PRIORITY_UNLIMITED = 16, 66 GSF_PRO_PRIORITY_UNLIMITED = 16,
67 67
68 /** 68 /**
69 * Option mask for typical local requests. 69 * Option mask for typical local requests.
70 */ 70 */
71 GSF_PRO_LOCAL_REQUEST = 71 GSF_PRO_LOCAL_REQUEST =
72 (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED | GSF_PRO_REQUEST_NEVER_EXPIRES) 72 (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED | GSF_PRO_REQUEST_NEVER_EXPIRES)
73}; 73};
@@ -288,17 +288,13 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
288 288
289/** 289/**
290 * Generate the message corresponding to the given pending request for 290 * Generate the message corresponding to the given pending request for
291 * transmission to other peers (or at least determine its size). 291 * transmission to other peers.
292 * 292 *
293 * @param pr request to generate the message for 293 * @param pr request to generate the message for
294 * @param buf_size number of bytes available in @a buf 294 * @return envelope with the request message
295 * @param buf where to copy the message (can be NULL)
296 * @return number of bytes needed (if @a buf_size too small) or used
297 */ 295 */
298size_t 296struct GNUNET_MQ_Envelope *
299GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr, 297GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr);
300 size_t buf_size,
301 void *buf);
302 298
303 299
304/** 300/**
@@ -344,16 +340,12 @@ GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it,
344 * this content and possibly passes it on (to local clients or other 340 * this content and possibly passes it on (to local clients or other
345 * peers). Does NOT perform migration (content caching at this peer). 341 * peers). Does NOT perform migration (content caching at this peer).
346 * 342 *
347 * @param cp the other peer involved (sender or receiver, NULL 343 * @param cls the other peer involved (sender)
348 * for loopback messages where we are both sender and receiver) 344 * @param put the actual message
349 * @param message the actual message
350 * @return #GNUNET_OK if the message was well-formed,
351 * #GNUNET_SYSERR if the message was malformed (close connection,
352 * do not cache under any circumstances)
353 */ 345 */
354int 346void
355GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp, 347handle_p2p_put (void *cls,
356 const struct GNUNET_MessageHeader *message); 348 const struct PutMessage *put);
357 349
358 350
359/** 351/**