diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-16 17:34:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-16 17:34:18 +0000 |
commit | 0b92336e16fd941ec085c66579486244c6bd83f4 (patch) | |
tree | bbb47f96c7bba867018003de148654fd8ca0eab5 /src/fs/gnunet-service-fs_cp.h | |
parent | f1cc760d1c98e2738430ad24d8004c5c700c1c49 (diff) | |
download | gnunet-0b92336e16fd941ec085c66579486244c6bd83f4.tar.gz gnunet-0b92336e16fd941ec085c66579486244c6bd83f4.zip |
do not poll empty database every 100ms for migration, doxygen fixes, code cleanup
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.h')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.h | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index 6b5fb4b0c..5b20c7cd2 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h | |||
@@ -158,23 +158,25 @@ struct GSF_PeerPerformanceData | |||
158 | * @param cp handle to the connected peer record | 158 | * @param cp handle to the connected peer record |
159 | * @param perf peer performance data | 159 | * @param perf peer performance data |
160 | */ | 160 | */ |
161 | typedef void (*GSF_ConnectedPeerIterator) (void *cls, | 161 | typedef void |
162 | const struct GNUNET_PeerIdentity * | 162 | (*GSF_ConnectedPeerIterator) (void *cls, |
163 | peer, struct GSF_ConnectedPeer * cp, | 163 | const struct GNUNET_PeerIdentity *peer, |
164 | const struct GSF_PeerPerformanceData | 164 | struct GSF_ConnectedPeer *cp, |
165 | * ppd); | 165 | const struct GSF_PeerPerformanceData *ppd); |
166 | 166 | ||
167 | 167 | ||
168 | /** | 168 | /** |
169 | * Function called to get a message for transmission. | 169 | * Function called to get a message for transmission. |
170 | * | 170 | * |
171 | * @param cls closure | 171 | * @param cls closure |
172 | * @param buf_size number of bytes available in buf | 172 | * @param buf_size number of bytes available in @a buf |
173 | * @param buf where to copy the message, NULL on error (peer disconnect) | 173 | * @param buf where to copy the message, NULL on error (peer disconnect) |
174 | * @return number of bytes copied to 'buf', can be 0 (without indicating an error) | 174 | * @return number of bytes copied to @a buf, can be 0 (without indicating an error) |
175 | */ | 175 | */ |
176 | typedef size_t (*GSF_GetMessageCallback) (void *cls, size_t buf_size, | 176 | typedef size_t |
177 | void *buf); | 177 | (*GSF_GetMessageCallback) (void *cls, |
178 | size_t buf_size, | ||
179 | void *buf); | ||
178 | 180 | ||
179 | 181 | ||
180 | /** | 182 | /** |
@@ -182,11 +184,12 @@ typedef size_t (*GSF_GetMessageCallback) (void *cls, size_t buf_size, | |||
182 | * | 184 | * |
183 | * @param cls closure | 185 | * @param cls closure |
184 | * @param cp handle to the connected peer record | 186 | * @param cp handle to the connected peer record |
185 | * @param success GNUNET_YES on success, GNUNET_NO on failure | 187 | * @param success #GNUNET_YES on success, #GNUNET_NO on failure |
186 | */ | 188 | */ |
187 | typedef void (*GSF_PeerReserveCallback) (void *cls, | 189 | typedef void |
188 | struct GSF_ConnectedPeer * cp, | 190 | (*GSF_PeerReserveCallback) (void *cls, |
189 | int success); | 191 | struct GSF_ConnectedPeer *cp, |
192 | int success); | ||
190 | 193 | ||
191 | 194 | ||
192 | /** | 195 | /** |
@@ -195,8 +198,9 @@ typedef void (*GSF_PeerReserveCallback) (void *cls, | |||
195 | * @param cls closure | 198 | * @param cls closure |
196 | * @param cp handle to the newly created connected peer record | 199 | * @param cp handle to the newly created connected peer record |
197 | */ | 200 | */ |
198 | typedef void (*GSF_ConnectedPeerCreationCallback) (void *cls, | 201 | typedef void |
199 | struct GSF_ConnectedPeer *cp); | 202 | (*GSF_ConnectedPeerCreationCallback) (void *cls, |
203 | struct GSF_ConnectedPeer *cp); | ||
200 | 204 | ||
201 | 205 | ||
202 | /** | 206 | /** |
@@ -255,9 +259,12 @@ GSF_update_peer_latency_ (const struct GNUNET_PeerIdentity *id, | |||
255 | * @return handle to cancel request | 259 | * @return handle to cancel request |
256 | */ | 260 | */ |
257 | struct GSF_PeerTransmitHandle * | 261 | struct GSF_PeerTransmitHandle * |
258 | GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, int is_query, | 262 | GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, |
259 | uint32_t priority, struct GNUNET_TIME_Relative timeout, | 263 | int is_query, |
260 | size_t size, GSF_GetMessageCallback gmc, void *gmc_cls); | 264 | uint32_t priority, |
265 | struct GNUNET_TIME_Relative timeout, | ||
266 | size_t size, GSF_GetMessageCallback gmc, | ||
267 | void *gmc_cls); | ||
261 | 268 | ||
262 | 269 | ||
263 | /** | 270 | /** |
@@ -314,8 +321,8 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | |||
314 | * @param other the other peer involved (sender or receiver, NULL | 321 | * @param other the other peer involved (sender or receiver, NULL |
315 | * for loopback messages where we are both sender and receiver) | 322 | * for loopback messages where we are both sender and receiver) |
316 | * @param message the actual message | 323 | * @param message the actual message |
317 | * @return GNUNET_OK to keep the connection open, | 324 | * @return #GNUNET_OK to keep the connection open, |
318 | * GNUNET_SYSERR to close it (signal serious error) | 325 | * #GNUNET_SYSERR to close it (signal serious error) |
319 | */ | 326 | */ |
320 | int | 327 | int |
321 | GSF_handle_p2p_migration_stop_ (void *cls, | 328 | GSF_handle_p2p_migration_stop_ (void *cls, |