diff options
author | Gabor X Toth <*@tg-x.net> | 2013-09-25 17:46:03 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-09-25 17:46:03 +0000 |
commit | 303d6a97bc552a337c992944c3151ea53c1f74dc (patch) | |
tree | 295d478fd8e82879830588da0c47778512ffad9b /src/include/gnunet_psycstore_service.h | |
parent | ffc11bb1c2c09cda9e7bed84e56cedb8ed49d46c (diff) | |
download | gnunet-303d6a97bc552a337c992944c3151ea53c1f74dc.tar.gz gnunet-303d6a97bc552a337c992944c3151ea53c1f74dc.zip |
psycstore: single counters function for master & slave
Diffstat (limited to 'src/include/gnunet_psycstore_service.h')
-rw-r--r-- | src/include/gnunet_psycstore_service.h | 73 |
1 files changed, 22 insertions, 51 deletions
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h index fcccfc304..8032223c8 100644 --- a/src/include/gnunet_psycstore_service.h +++ b/src/include/gnunet_psycstore_service.h | |||
@@ -282,72 +282,43 @@ GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h, | |||
282 | /** | 282 | /** |
283 | * Callback used to return the latest value of counters for the channel master. | 283 | * Callback used to return the latest value of counters for the channel master. |
284 | * | 284 | * |
285 | * @see GNUNET_PSYCSTORE_counters_get_master() | 285 | * @see GNUNET_PSYCSTORE_counters_get() |
286 | * | 286 | * |
287 | * @param cls Closure. | 287 | * @param cls Closure. |
288 | * @param fragment_id Latest message fragment ID, used by multicast. | 288 | * @param max_fragment_id Latest message fragment ID, used by multicast. |
289 | * @param message_id Latest message ID, used by PSYC. | 289 | * @param max_message_id Latest message ID, used by PSYC. |
290 | * @param group_generation Latest group generation, used by PSYC. | 290 | * @param max_group_generation Latest group generation, used by PSYC. |
291 | * @param max_state_message_id Latest message ID containing state modifiers that | ||
292 | * was applied to the state store. Used for the state sync process. | ||
291 | */ | 293 | */ |
292 | typedef void | 294 | typedef void |
293 | (*GNUNET_PSYCSTORE_MasterCountersCallback) (void *cls, | 295 | (*GNUNET_PSYCSTORE_CountersCallback) (void *cls, |
294 | uint64_t fragment_id, | 296 | uint64_t max_fragment_id, |
295 | uint64_t message_id, | 297 | uint64_t max_message_id, |
296 | uint64_t group_generation); | 298 | uint64_t max_group_generation, |
299 | uint64_t max_state_message_id); | ||
297 | 300 | ||
298 | 301 | ||
299 | /** | 302 | /** |
300 | * Callback used to return the latest value of counters for a channel slave. | 303 | * Retrieve latest values of counters for a channel. |
301 | * | 304 | * |
302 | * @see GNUNET_PSYCSTORE_counters_get_slave() | 305 | * The current value of counters are needed |
303 | * | 306 | * - when a channel master is restarted, so that it can continue incrementing |
304 | * @param cls Closure. | 307 | * the counters from their last value. |
305 | * @param max_state_msg_id Latest message ID containing state modifiers that was | 308 | * - when a channel slave rejoins and starts the state synchronization process. |
306 | * applied to the state store. Used for the state sync process. | ||
307 | */ | ||
308 | typedef void | ||
309 | (*GNUNET_PSYCSTORE_SlaveCountersCallback) (void *cls, | ||
310 | uint64_t max_state_msg_id); | ||
311 | |||
312 | |||
313 | /** | ||
314 | * Retrieve latest values of counters for a channel master. | ||
315 | * | ||
316 | * The current value of counters are needed when a channel master is restarted, | ||
317 | * so that it can continue incrementing the counters from their last value. | ||
318 | * | ||
319 | * @param h Handle for the PSYCstore. | ||
320 | * @param channel_key Public key that identifies the channel. | ||
321 | * @param mccb Callback to call with the result. | ||
322 | * @param mccb_cls Closure for the callback. | ||
323 | * | ||
324 | * @return Handle that can be used to cancel the operation. | ||
325 | */ | ||
326 | struct GNUNET_PSYCSTORE_OperationHandle * | ||
327 | GNUNET_PSYCSTORE_counters_get_master (struct GNUNET_PSYCSTORE_Handle *h, | ||
328 | struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, | ||
329 | GNUNET_PSYCSTORE_MasterCountersCallback mccb, | ||
330 | void *mccb_cls); | ||
331 | |||
332 | |||
333 | /** | ||
334 | * Retrieve latest values of counters for a channel slave. | ||
335 | * | ||
336 | * The current value of counters are needed when a channel slave rejoins | ||
337 | * and starts the state synchronization process. | ||
338 | * | 309 | * |
339 | * @param h Handle for the PSYCstore. | 310 | * @param h Handle for the PSYCstore. |
340 | * @param channel_key Public key that identifies the channel. | 311 | * @param channel_key Public key that identifies the channel. |
341 | * @param sccb Callback to call with the result. | 312 | * @param ccb Callback to call with the result. |
342 | * @param sccb_cls Closure for the callback. | 313 | * @param ccb_cls Closure for the callback. |
343 | * | 314 | * |
344 | * @return Handle that can be used to cancel the operation. | 315 | * @return Handle that can be used to cancel the operation. |
345 | */ | 316 | */ |
346 | struct GNUNET_PSYCSTORE_OperationHandle * | 317 | struct GNUNET_PSYCSTORE_OperationHandle * |
347 | GNUNET_PSYCSTORE_counters_get_slave (struct GNUNET_PSYCSTORE_Handle *h, | 318 | GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h, |
348 | struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, | 319 | struct GNUNET_CRYPTO_EccPublicSignKey *channel_key, |
349 | GNUNET_PSYCSTORE_SlaveCountersCallback sccb, | 320 | GNUNET_PSYCSTORE_CountersCallback ccb, |
350 | void *sccb_cls); | 321 | void *ccb_cls); |
351 | 322 | ||
352 | 323 | ||
353 | /** | 324 | /** |