diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-02-08 22:57:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-02-08 22:57:06 +0000 |
commit | 6cf52d591c8a72c1fd5b71850e3abe85ffe3433a (patch) | |
tree | abc4def5826a72aee5dfeefa55b6b378e77b525b /src/fs/gnunet-service-fs_pr.h | |
parent | eda4a5ba9aadcbf554f511c58db8bc51f0638d71 (diff) | |
download | gnunet-6cf52d591c8a72c1fd5b71850e3abe85ffe3433a.tar.gz gnunet-6cf52d591c8a72c1fd5b71850e3abe85ffe3433a.zip |
stuff
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.h')
-rw-r--r-- | src/fs/gnunet-service-fs_pr.h | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index ee5124a90..5fb9d2a5a 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h | |||
@@ -63,10 +63,61 @@ enum GSF_PendingRequestOptions | |||
63 | * Option mask for typical local requests. | 63 | * Option mask for typical local requests. |
64 | */ | 64 | */ |
65 | GSF_PRO_LOCAL_REQUEST = (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED) | 65 | GSF_PRO_LOCAL_REQUEST = (GSF_PRO_BLOOMFILTER_FULL_REFRESH | GSF_PRO_PRIORITY_UNLIMITED) |
66 | |||
66 | }; | 67 | }; |
67 | 68 | ||
68 | 69 | ||
69 | /** | 70 | /** |
71 | * Public data associated with each pending request. | ||
72 | */ | ||
73 | struct GSF_PendingRequestData | ||
74 | { | ||
75 | |||
76 | /** | ||
77 | * Primary query hash for this request. | ||
78 | */ | ||
79 | GNUNET_HashCode query; | ||
80 | |||
81 | /** | ||
82 | * Namespace to query, only set if the type is SBLOCK. | ||
83 | */ | ||
84 | GNUNET_HashCode namespace; | ||
85 | |||
86 | /** | ||
87 | * Identity of a peer hosting the content, only set if | ||
88 | * 'has_target' is GNUNET_YES. | ||
89 | */ | ||
90 | struct GNUNET_PeerIdentity target; | ||
91 | |||
92 | /** | ||
93 | * Desired anonymity level. | ||
94 | */ | ||
95 | uint32_t anonymity_level; | ||
96 | |||
97 | /** | ||
98 | * Priority that this request (still) has for us. | ||
99 | */ | ||
100 | uint32_t priority; | ||
101 | |||
102 | /** | ||
103 | * Options for the request. | ||
104 | */ | ||
105 | enum GSF_PendingRequestOptions options; | ||
106 | |||
107 | /** | ||
108 | * Type of the requested block. | ||
109 | */ | ||
110 | enum GNUNET_BLOCK_Type type; | ||
111 | |||
112 | /** | ||
113 | * Is the 'target' value set to a valid peer identity? | ||
114 | */ | ||
115 | int has_target; | ||
116 | |||
117 | }; | ||
118 | |||
119 | |||
120 | /** | ||
70 | * Handle a reply to a pending request. Also called if a request | 121 | * Handle a reply to a pending request. Also called if a request |
71 | * expires (then with data == NULL). The handler may be called | 122 | * expires (then with data == NULL). The handler may be called |
72 | * many times (depending on the request type), but will not be | 123 | * many times (depending on the request type), but will not be |
@@ -109,7 +160,7 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, | |||
109 | const GNUNET_HashCode *query, | 160 | const GNUNET_HashCode *query, |
110 | const GNUNET_HashCode *namespace, | 161 | const GNUNET_HashCode *namespace, |
111 | const struct GNUNET_PeerIdentity *target, | 162 | const struct GNUNET_PeerIdentity *target, |
112 | struct GNUNET_CONTAINER_BloomFilter *bf, | 163 | const struct GNUNET_CONTAINER_BloomFilter *bf, |
113 | int32_t mingle, | 164 | int32_t mingle, |
114 | uint32_t anonymity_level, | 165 | uint32_t anonymity_level, |
115 | uint32_t priority, | 166 | uint32_t priority, |