diff options
author | Gabor X Toth <*@tg-x.net> | 2015-05-07 12:15:58 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2015-05-07 12:15:58 +0000 |
commit | 4725d59b468f1f30ba2910992333ca157682ce29 (patch) | |
tree | 23715ee20879c94a3363e28ea184370a4a71e44d /src/include/gnunet_psycstore_service.h | |
parent | a5edf8ac9f03a368c87ea6163994d4ac3d62af06 (diff) | |
download | gnunet-4725d59b468f1f30ba2910992333ca157682ce29.tar.gz gnunet-4725d59b468f1f30ba2910992333ca157682ce29.zip |
psyc/social: request history & state from psycstore; more documentation, tests, cleanup
Diffstat (limited to 'src/include/gnunet_psycstore_service.h')
-rw-r--r-- | src/include/gnunet_psycstore_service.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h index 2cb155f69..40acdae61 100644 --- a/src/include/gnunet_psycstore_service.h +++ b/src/include/gnunet_psycstore_service.h | |||
@@ -107,15 +107,20 @@ struct GNUNET_PSYCSTORE_OperationHandle; | |||
107 | /** | 107 | /** |
108 | * Function called with the result of an asynchronous operation. | 108 | * Function called with the result of an asynchronous operation. |
109 | * | 109 | * |
110 | * @param cls | ||
111 | * Closure. | ||
110 | * @param result | 112 | * @param result |
111 | * #GNUNET_YES on success or if the peer was a member, | 113 | * Result of the operation. |
112 | * #GNUNET_NO if the peer was not a member, | 114 | * @param err_msg |
113 | * #GNUNET_SYSERR on error, | 115 | * Error message, or NULL if there's no error. |
116 | * @param err_msg_size | ||
117 | * Size of @a err_msg | ||
114 | */ | 118 | */ |
115 | typedef void | 119 | typedef void |
116 | (*GNUNET_PSYCSTORE_ResultCallback) (void *cls, | 120 | (*GNUNET_PSYCSTORE_ResultCallback) (void *cls, |
117 | int64_t result, | 121 | int64_t result, |
118 | const char *err_msg); | 122 | const char *err_msg, |
123 | uint16_t err_msg_size); | ||
119 | 124 | ||
120 | 125 | ||
121 | /** | 126 | /** |
@@ -318,15 +323,15 @@ GNUNET_PSYCSTORE_fragment_get_latest (struct GNUNET_PSYCSTORE_Handle *h, | |||
318 | * @param channel_key | 323 | * @param channel_key |
319 | * The channel we are interested in. | 324 | * The channel we are interested in. |
320 | * @param slave_key | 325 | * @param slave_key |
321 | * The slave requesting the message. If not NULL, a membership test is | 326 | * The slave requesting the message. |
322 | * performed first and the message is only returned if the slave has | 327 | * If not NULL, a membership test is performed first |
323 | * access to it. | 328 | * and the message is only returned if the slave has access to it. |
324 | * @param first_message_id | 329 | * @param first_message_id |
325 | * First message ID to retrieve. | 330 | * First message ID to retrieve. |
326 | * Use 0 to get the latest message. | ||
327 | * @param last_message_id | 331 | * @param last_message_id |
328 | * Last consecutive message ID to retrieve. | 332 | * Last consecutive message ID to retrieve. |
329 | * Use 0 to get the latest message. | 333 | * @param method_prefix |
334 | * Retrieve only messages with a matching method prefix. | ||
330 | * @param fragment_cb | 335 | * @param fragment_cb |
331 | * Callback to call with the retrieved fragments. | 336 | * Callback to call with the retrieved fragments. |
332 | * @param result_cb | 337 | * @param result_cb |
@@ -342,6 +347,7 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
342 | const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, | 347 | const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, |
343 | uint64_t first_message_id, | 348 | uint64_t first_message_id, |
344 | uint64_t last_message_id, | 349 | uint64_t last_message_id, |
350 | const char *method_prefix, | ||
345 | GNUNET_PSYCSTORE_FragmentCallback fragment_cb, | 351 | GNUNET_PSYCSTORE_FragmentCallback fragment_cb, |
346 | GNUNET_PSYCSTORE_ResultCallback result_cb, | 352 | GNUNET_PSYCSTORE_ResultCallback result_cb, |
347 | void *cls); | 353 | void *cls); |
@@ -355,14 +361,16 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
355 | * @param channel_key | 361 | * @param channel_key |
356 | * The channel we are interested in. | 362 | * The channel we are interested in. |
357 | * @param slave_key | 363 | * @param slave_key |
358 | * The slave requesting the message. If not NULL, a membership test is | 364 | * The slave requesting the message. |
359 | * performed first and the message is only returned if the slave has | 365 | * If not NULL, a membership test is performed first |
360 | * access to it. | 366 | * and the message is only returned if the slave has access to it. |
361 | * @param message_limit | 367 | * @param message_limit |
362 | * Maximum number of messages to retrieve. | 368 | * Maximum number of messages to retrieve. |
369 | * @param method_prefix | ||
370 | * Retrieve only messages with a matching method prefix. | ||
363 | * @param fragment_cb | 371 | * @param fragment_cb |
364 | * Callback to call with the retrieved fragments. | 372 | * Callback to call with the retrieved fragments. |
365 | * @param rcb | 373 | * @param result_cb |
366 | * Callback to call with the result of the operation. | 374 | * Callback to call with the result of the operation. |
367 | * @param cls | 375 | * @param cls |
368 | * Closure for the callbacks. | 376 | * Closure for the callbacks. |
@@ -374,6 +382,7 @@ GNUNET_PSYCSTORE_message_get_latest (struct GNUNET_PSYCSTORE_Handle *h, | |||
374 | const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key, | 382 | const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key, |
375 | const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, | 383 | const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key, |
376 | uint64_t message_limit, | 384 | uint64_t message_limit, |
385 | const char *method_prefix, | ||
377 | GNUNET_PSYCSTORE_FragmentCallback fragment_cb, | 386 | GNUNET_PSYCSTORE_FragmentCallback fragment_cb, |
378 | GNUNET_PSYCSTORE_ResultCallback rcb, | 387 | GNUNET_PSYCSTORE_ResultCallback rcb, |
379 | void *cls); | 388 | void *cls); |