aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_psycstore_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_psycstore_service.h')
-rw-r--r--src/include/gnunet_psycstore_service.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h
index 8032223c8..25d4339a3 100644
--- a/src/include/gnunet_psycstore_service.h
+++ b/src/include/gnunet_psycstore_service.h
@@ -18,7 +18,7 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21/** 21/**
22 * @file include/gnunet_psycstore_service.h 22 * @file include/gnunet_psycstore_service.h
23 * @brief PSYCstore service; implements persistent storage for the PSYC service 23 * @brief PSYCstore service; implements persistent storage for the PSYC service
24 * @author Gabor X Toth 24 * @author Gabor X Toth
@@ -40,7 +40,7 @@ extern "C"
40#include "gnunet_multicast_service.h" 40#include "gnunet_multicast_service.h"
41#include "gnunet_psyc_service.h" 41#include "gnunet_psyc_service.h"
42 42
43/** 43/**
44 * Version number of GNUnet PSYCstore API. 44 * Version number of GNUnet PSYCstore API.
45 */ 45 */
46#define GNUNET_PSYCSTORE_VERSION 0x00000000 46#define GNUNET_PSYCSTORE_VERSION 0x00000000
@@ -67,13 +67,13 @@ enum GNUNET_PSYCSTORE_MessageFlags
67}; 67};
68 68
69 69
70/** 70/**
71 * Handle for a PSYCstore 71 * Handle for a PSYCstore
72 */ 72 */
73struct GNUNET_PSYCSTORE_Handle; 73struct GNUNET_PSYCSTORE_Handle;
74 74
75 75
76/** 76/**
77 * Connect to the PSYCstore service. 77 * Connect to the PSYCstore service.
78 * 78 *
79 * @param cfg Configuration to use. 79 * @param cfg Configuration to use.
@@ -84,7 +84,7 @@ struct GNUNET_PSYCSTORE_Handle *
84GNUNET_PSYCSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); 84GNUNET_PSYCSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
85 85
86 86
87/** 87/**
88 * Disconnect from the PSYCstore service. 88 * Disconnect from the PSYCstore service.
89 * 89 *
90 * @param h Handle for the connection. 90 * @param h Handle for the connection.
@@ -93,15 +93,15 @@ void
93GNUNET_PSYCSTORE_disconnect (struct GNUNET_PSYCSTORE_Handle *h); 93GNUNET_PSYCSTORE_disconnect (struct GNUNET_PSYCSTORE_Handle *h);
94 94
95 95
96/** 96/**
97 * Handle for an operation on the PSYCSTORE (useful to cancel the operation). 97 * Handle for an operation on the PSYCSTORE (useful to cancel the operation).
98 */ 98 */
99struct GNUNET_PSYCSTORE_OperationHandle; 99struct GNUNET_PSYCSTORE_OperationHandle;
100 100
101 101
102/** 102/**
103 * Function called with the result of an asynchronous operation. 103 * Function called with the result of an asynchronous operation.
104 * 104 *
105 * @param result #GNUNET_SYSERR on error, 105 * @param result #GNUNET_SYSERR on error,
106 * #GNUNET_YES on success or if the peer was a member, 106 * #GNUNET_YES on success or if the peer was a member,
107 * #GNUNET_NO if the peer was not a member 107 * #GNUNET_NO if the peer was not a member
@@ -112,7 +112,7 @@ typedef void
112 const char *err_msg); 112 const char *err_msg);
113 113
114 114
115/** 115/**
116 * Store join/leave events for a PSYC channel in order to be able to answer 116 * Store join/leave events for a PSYC channel in order to be able to answer
117 * membership test queries later. 117 * membership test queries later.
118 * 118 *
@@ -143,7 +143,7 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
143 void *rcb_cls); 143 void *rcb_cls);
144 144
145 145
146/** 146/**
147 * Test if a member was admitted to the channel at the given message ID. 147 * Test if a member was admitted to the channel at the given message ID.
148 * 148 *
149 * This is useful when relaying and replaying messages to check if a particular 149 * This is useful when relaying and replaying messages to check if a particular
@@ -173,7 +173,7 @@ GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
173 void *rcb_cls); 173 void *rcb_cls);
174 174
175 175
176/** 176/**
177 * Store a message fragment sent to a channel. 177 * Store a message fragment sent to a channel.
178 * 178 *
179 * @param h Handle for the PSYCstore. 179 * @param h Handle for the PSYCstore.
@@ -183,7 +183,7 @@ GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
183 * state modifiers. 183 * state modifiers.
184 * @param rcb Callback to call with the result of the operation. 184 * @param rcb Callback to call with the result of the operation.
185 * @param rcb_cls Closure for the callback. 185 * @param rcb_cls Closure for the callback.
186 * 186 *
187 * @return Handle that can be used to cancel the operation. 187 * @return Handle that can be used to cancel the operation.
188 */ 188 */
189struct GNUNET_PSYCSTORE_OperationHandle * 189struct GNUNET_PSYCSTORE_OperationHandle *
@@ -195,7 +195,7 @@ GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h,
195 void *rcb_cls); 195 void *rcb_cls);
196 196
197 197
198/** 198/**
199 * Function called with one message fragment, as the result of a 199 * Function called with one message fragment, as the result of a
200 * GNUNET_PSYCSTORE_fragment_get() or GNUNET_PSYCSTORE_message_get() call. 200 * GNUNET_PSYCSTORE_fragment_get() or GNUNET_PSYCSTORE_message_get() call.
201 * 201 *
@@ -213,7 +213,7 @@ typedef int
213 enum GNUNET_PSYCSTORE_MessageFlags psycstore_flags); 213 enum GNUNET_PSYCSTORE_MessageFlags psycstore_flags);
214 214
215 215
216/** 216/**
217 * Retrieve a message fragment by fragment ID. 217 * Retrieve a message fragment by fragment ID.
218 * 218 *
219 * @param h Handle for the PSYCstore. 219 * @param h Handle for the PSYCstore.
@@ -222,7 +222,7 @@ typedef int
222 * @param fcb Callback to call with the retrieved fragment. 222 * @param fcb Callback to call with the retrieved fragment.
223 * @param rcb Callback to call with the result of the operation. 223 * @param rcb Callback to call with the result of the operation.
224 * @param cls Closure for the callbacks. 224 * @param cls Closure for the callbacks.
225 * 225 *
226 * @return Handle that can be used to cancel the operation. 226 * @return Handle that can be used to cancel the operation.
227 */ 227 */
228struct GNUNET_PSYCSTORE_OperationHandle * 228struct GNUNET_PSYCSTORE_OperationHandle *
@@ -234,7 +234,7 @@ GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
234 void *cls); 234 void *cls);
235 235
236 236
237/** 237/**
238 * Retrieve all fragments of a message. 238 * Retrieve all fragments of a message.
239 * 239 *
240 * @param h Handle for the PSYCstore. 240 * @param h Handle for the PSYCstore.
@@ -243,7 +243,7 @@ GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
243 * @param fcb Callback to call with the retrieved fragments. 243 * @param fcb Callback to call with the retrieved fragments.
244 * @param rcb Callback to call with the result of the operation. 244 * @param rcb Callback to call with the result of the operation.
245 * @param cls Closure for the callbacks. 245 * @param cls Closure for the callbacks.
246 * 246 *
247 * @return Handle that can be used to cancel the operation. 247 * @return Handle that can be used to cancel the operation.
248 */ 248 */
249struct GNUNET_PSYCSTORE_OperationHandle * 249struct GNUNET_PSYCSTORE_OperationHandle *
@@ -255,7 +255,7 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
255 void *cls); 255 void *cls);
256 256
257 257
258/** 258/**
259 * Retrieve a fragment of message specified by its message ID and fragment 259 * Retrieve a fragment of message specified by its message ID and fragment
260 * offset. 260 * offset.
261 * 261 *
@@ -266,7 +266,7 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
266 * @param fcb Callback to call with the retrieved fragments. 266 * @param fcb Callback to call with the retrieved fragments.
267 * @param rcb Callback to call with the result of the operation. 267 * @param rcb Callback to call with the result of the operation.
268 * @param cls Closure for the callbacks. 268 * @param cls Closure for the callbacks.
269 * 269 *
270 * @return Handle that can be used to cancel the operation. 270 * @return Handle that can be used to cancel the operation.
271 */ 271 */
272struct GNUNET_PSYCSTORE_OperationHandle * 272struct GNUNET_PSYCSTORE_OperationHandle *
@@ -279,7 +279,7 @@ GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h,
279 void *cls); 279 void *cls);
280 280
281 281
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() 285 * @see GNUNET_PSYCSTORE_counters_get()
@@ -299,7 +299,7 @@ typedef void
299 uint64_t max_state_message_id); 299 uint64_t max_state_message_id);
300 300
301 301
302/** 302/**
303 * Retrieve latest values of counters for a channel. 303 * Retrieve latest values of counters for a channel.
304 * 304 *
305 * The current value of counters are needed 305 * The current value of counters are needed
@@ -311,7 +311,7 @@ typedef void
311 * @param channel_key Public key that identifies the channel. 311 * @param channel_key Public key that identifies the channel.
312 * @param ccb Callback to call with the result. 312 * @param ccb Callback to call with the result.
313 * @param ccb_cls Closure for the callback. 313 * @param ccb_cls Closure for the callback.
314 * 314 *
315 * @return Handle that can be used to cancel the operation. 315 * @return Handle that can be used to cancel the operation.
316 */ 316 */
317struct GNUNET_PSYCSTORE_OperationHandle * 317struct GNUNET_PSYCSTORE_OperationHandle *
@@ -321,7 +321,7 @@ GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
321 void *ccb_cls); 321 void *ccb_cls);
322 322
323 323
324/** 324/**
325 * Apply modifiers of a message to the current channel state. 325 * Apply modifiers of a message to the current channel state.
326 * 326 *
327 * An error is returned if there are missing messages containing state 327 * An error is returned if there are missing messages containing state
@@ -335,7 +335,7 @@ GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
335 * @param modifiers List of modifiers to apply. 335 * @param modifiers List of modifiers to apply.
336 * @param rcb Callback to call with the result of the operation. 336 * @param rcb Callback to call with the result of the operation.
337 * @param rcb_cls Closure for the callback. 337 * @param rcb_cls Closure for the callback.
338 * 338 *
339 * @return Handle that can be used to cancel the operation. 339 * @return Handle that can be used to cancel the operation.
340 */ 340 */
341struct GNUNET_PSYCSTORE_OperationHandle * 341struct GNUNET_PSYCSTORE_OperationHandle *
@@ -349,7 +349,7 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
349 void *rcb_cls); 349 void *rcb_cls);
350 350
351 351
352/** 352/**
353 * Store synchronized state. 353 * Store synchronized state.
354 * 354 *
355 * @param h Handle for the PSYCstore. 355 * @param h Handle for the PSYCstore.
@@ -359,7 +359,7 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
359 * @param modifiers Full state to store. 359 * @param modifiers Full state to store.
360 * @param rcb Callback to call with the result of the operation. 360 * @param rcb Callback to call with the result of the operation.
361 * @param rcb_cls Closure for the callback. 361 * @param rcb_cls Closure for the callback.
362 * 362 *
363 * @return Handle that can be used to cancel the operation. 363 * @return Handle that can be used to cancel the operation.
364 */ 364 */
365struct GNUNET_PSYCSTORE_OperationHandle * 365struct GNUNET_PSYCSTORE_OperationHandle *
@@ -373,7 +373,7 @@ GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
373 373
374 374
375 375
376/** 376/**
377 * Reset the state of a channel. 377 * Reset the state of a channel.
378 * 378 *
379 * Delete all state variables stored for the given channel. 379 * Delete all state variables stored for the given channel.
@@ -382,7 +382,7 @@ GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
382 * @param channel_key The channel we are interested in. 382 * @param channel_key The channel we are interested in.
383 * @param rcb Callback to call with the result of the operation. 383 * @param rcb Callback to call with the result of the operation.
384 * @param rcb_cls Closure for the callback. 384 * @param rcb_cls Closure for the callback.
385 * 385 *
386 * @return Handle that can be used to cancel the operation. 386 * @return Handle that can be used to cancel the operation.
387 */ 387 */
388struct GNUNET_PSYCSTORE_OperationHandle * 388struct GNUNET_PSYCSTORE_OperationHandle *
@@ -393,7 +393,7 @@ GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
393 void *rcb_cls); 393 void *rcb_cls);
394 394
395 395
396/** 396/**
397 * Update signed values of state variables in the state store. 397 * Update signed values of state variables in the state store.
398 * 398 *
399 * @param h Handle for the PSYCstore. 399 * @param h Handle for the PSYCstore.
@@ -413,7 +413,7 @@ GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
413 void *rcb_cls); 413 void *rcb_cls);
414 414
415 415
416/** 416/**
417 * Function called with the value of a state variable. 417 * Function called with the value of a state variable.
418 * 418 *
419 * @param cls Closure. 419 * @param cls Closure.
@@ -430,7 +430,7 @@ typedef int
430 const void *value, size_t value_size); 430 const void *value, size_t value_size);
431 431
432 432
433/** 433/**
434 * Retrieve the best matching state variable. 434 * Retrieve the best matching state variable.
435 * 435 *
436 * @param h Handle for the PSYCstore. 436 * @param h Handle for the PSYCstore.
@@ -439,7 +439,7 @@ typedef int
439 * @param scb Callback to return the matching state variable. 439 * @param scb Callback to return the matching state variable.
440 * @param rcb Callback to call with the result of the operation. 440 * @param rcb Callback to call with the result of the operation.
441 * @param cls Closure for the callbacks. 441 * @param cls Closure for the callbacks.
442 * 442 *
443 * @return Handle that can be used to cancel the operation. 443 * @return Handle that can be used to cancel the operation.
444 */ 444 */
445struct GNUNET_PSYCSTORE_OperationHandle * 445struct GNUNET_PSYCSTORE_OperationHandle *
@@ -451,7 +451,7 @@ GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
451 void *cls); 451 void *cls);
452 452
453 453
454/** 454/**
455 * Retrieve all state variables for a channel with the given prefix. 455 * Retrieve all state variables for a channel with the given prefix.
456 * 456 *
457 * @param h Handle for the PSYCstore. 457 * @param h Handle for the PSYCstore.
@@ -460,7 +460,7 @@ GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
460 * @param scb Callback to return matching state variables. 460 * @param scb Callback to return matching state variables.
461 * @param rcb Callback to call with the result of the operation. 461 * @param rcb Callback to call with the result of the operation.
462 * @param cls Closure for the callbacks. 462 * @param cls Closure for the callbacks.
463 * 463 *
464 * @return Handle that can be used to cancel the operation. 464 * @return Handle that can be used to cancel the operation.
465 */ 465 */
466struct GNUNET_PSYCSTORE_OperationHandle * 466struct GNUNET_PSYCSTORE_OperationHandle *
@@ -472,7 +472,7 @@ GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h,
472 void *cls); 472 void *cls);
473 473
474 474
475/** 475/**
476 * Cancel an operation. 476 * Cancel an operation.
477 * 477 *
478 * @param op Handle for the operation to cancel. 478 * @param op Handle for the operation to cancel.