summaryrefslogtreecommitdiff
path: root/src/include/gnunet_datastore_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_datastore_service.h')
-rw-r--r--src/include/gnunet_datastore_service.h117
1 files changed, 59 insertions, 58 deletions
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index e4cd4a915..57b813225 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -72,7 +72,7 @@ struct GNUNET_DATASTORE_Handle;
72 * @return handle to use to access the service 72 * @return handle to use to access the service
73 */ 73 */
74struct GNUNET_DATASTORE_Handle * 74struct GNUNET_DATASTORE_Handle *
75GNUNET_DATASTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg); 75GNUNET_DATASTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
76 76
77 77
78/** 78/**
@@ -83,8 +83,8 @@ GNUNET_DATASTORE_connect(const struct GNUNET_CONFIGURATION_Handle *cfg);
83 * @param drop set to #GNUNET_YES to delete all data in datastore (!) 83 * @param drop set to #GNUNET_YES to delete all data in datastore (!)
84 */ 84 */
85void 85void
86GNUNET_DATASTORE_disconnect(struct GNUNET_DATASTORE_Handle *h, 86GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h,
87 int drop); 87 int drop);
88 88
89 89
90/** 90/**
@@ -103,7 +103,8 @@ GNUNET_DATASTORE_disconnect(struct GNUNET_DATASTORE_Handle *h,
103typedef void 103typedef void
104(*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls, 104(*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls,
105 int32_t success, 105 int32_t success,
106 struct GNUNET_TIME_Absolute min_expiration, 106 struct GNUNET_TIME_Absolute
107 min_expiration,
107 const char *msg); 108 const char *msg);
108 109
109 110
@@ -123,11 +124,11 @@ typedef void
123 * (or rather, will already have been invoked) 124 * (or rather, will already have been invoked)
124 */ 125 */
125struct GNUNET_DATASTORE_QueueEntry * 126struct GNUNET_DATASTORE_QueueEntry *
126GNUNET_DATASTORE_reserve(struct GNUNET_DATASTORE_Handle *h, 127GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h,
127 uint64_t amount, 128 uint64_t amount,
128 uint32_t entries, 129 uint32_t entries,
129 GNUNET_DATASTORE_ContinuationWithStatus cont, 130 GNUNET_DATASTORE_ContinuationWithStatus cont,
130 void *cont_cls); 131 void *cont_cls);
131 132
132 133
133/** 134/**
@@ -156,20 +157,20 @@ GNUNET_DATASTORE_reserve(struct GNUNET_DATASTORE_Handle *h,
156 * (or rather, will already have been invoked) 157 * (or rather, will already have been invoked)
157 */ 158 */
158struct GNUNET_DATASTORE_QueueEntry * 159struct GNUNET_DATASTORE_QueueEntry *
159GNUNET_DATASTORE_put(struct GNUNET_DATASTORE_Handle *h, 160GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h,
160 uint32_t rid, 161 uint32_t rid,
161 const struct GNUNET_HashCode *key, 162 const struct GNUNET_HashCode *key,
162 size_t size, 163 size_t size,
163 const void *data, 164 const void *data,
164 enum GNUNET_BLOCK_Type type, 165 enum GNUNET_BLOCK_Type type,
165 uint32_t priority, 166 uint32_t priority,
166 uint32_t anonymity, 167 uint32_t anonymity,
167 uint32_t replication, 168 uint32_t replication,
168 struct GNUNET_TIME_Absolute expiration, 169 struct GNUNET_TIME_Absolute expiration,
169 unsigned int queue_priority, 170 unsigned int queue_priority,
170 unsigned int max_queue_size, 171 unsigned int max_queue_size,
171 GNUNET_DATASTORE_ContinuationWithStatus cont, 172 GNUNET_DATASTORE_ContinuationWithStatus cont,
172 void *cont_cls); 173 void *cont_cls);
173 174
174 175
175/** 176/**
@@ -193,11 +194,11 @@ GNUNET_DATASTORE_put(struct GNUNET_DATASTORE_Handle *h,
193 * (or rather, will already have been invoked) 194 * (or rather, will already have been invoked)
194 */ 195 */
195struct GNUNET_DATASTORE_QueueEntry * 196struct GNUNET_DATASTORE_QueueEntry *
196GNUNET_DATASTORE_release_reserve(struct GNUNET_DATASTORE_Handle *h, 197GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
197 uint32_t rid, unsigned int queue_priority, 198 uint32_t rid, unsigned int queue_priority,
198 unsigned int max_queue_size, 199 unsigned int max_queue_size,
199 GNUNET_DATASTORE_ContinuationWithStatus cont, 200 GNUNET_DATASTORE_ContinuationWithStatus cont,
200 void *cont_cls); 201 void *cont_cls);
201 202
202 203
203/** 204/**
@@ -220,14 +221,14 @@ GNUNET_DATASTORE_release_reserve(struct GNUNET_DATASTORE_Handle *h,
220 * (or rather, will already have been invoked) 221 * (or rather, will already have been invoked)
221 */ 222 */
222struct GNUNET_DATASTORE_QueueEntry * 223struct GNUNET_DATASTORE_QueueEntry *
223GNUNET_DATASTORE_remove(struct GNUNET_DATASTORE_Handle *h, 224GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
224 const struct GNUNET_HashCode *key, 225 const struct GNUNET_HashCode *key,
225 size_t size, 226 size_t size,
226 const void *data, 227 const void *data,
227 unsigned int queue_priority, 228 unsigned int queue_priority,
228 unsigned int max_queue_size, 229 unsigned int max_queue_size,
229 GNUNET_DATASTORE_ContinuationWithStatus cont, 230 GNUNET_DATASTORE_ContinuationWithStatus cont,
230 void *cont_cls); 231 void *cont_cls);
231 232
232 233
233/** 234/**
@@ -277,15 +278,15 @@ typedef void
277 * cancel 278 * cancel
278 */ 279 */
279struct GNUNET_DATASTORE_QueueEntry * 280struct GNUNET_DATASTORE_QueueEntry *
280GNUNET_DATASTORE_get_key(struct GNUNET_DATASTORE_Handle *h, 281GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
281 uint64_t next_uid, 282 uint64_t next_uid,
282 bool random, 283 bool random,
283 const struct GNUNET_HashCode *key, 284 const struct GNUNET_HashCode *key,
284 enum GNUNET_BLOCK_Type type, 285 enum GNUNET_BLOCK_Type type,
285 unsigned int queue_priority, 286 unsigned int queue_priority,
286 unsigned int max_queue_size, 287 unsigned int max_queue_size,
287 GNUNET_DATASTORE_DatumProcessor proc, 288 GNUNET_DATASTORE_DatumProcessor proc,
288 void *proc_cls); 289 void *proc_cls);
289 290
290 291
291/** 292/**
@@ -305,13 +306,13 @@ GNUNET_DATASTORE_get_key(struct GNUNET_DATASTORE_Handle *h,
305 * cancel 306 * cancel
306 */ 307 */
307struct GNUNET_DATASTORE_QueueEntry * 308struct GNUNET_DATASTORE_QueueEntry *
308GNUNET_DATASTORE_get_zero_anonymity(struct GNUNET_DATASTORE_Handle *h, 309GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
309 uint64_t next_uid, 310 uint64_t next_uid,
310 unsigned int queue_priority, 311 unsigned int queue_priority,
311 unsigned int max_queue_size, 312 unsigned int max_queue_size,
312 enum GNUNET_BLOCK_Type type, 313 enum GNUNET_BLOCK_Type type,
313 GNUNET_DATASTORE_DatumProcessor proc, 314 GNUNET_DATASTORE_DatumProcessor proc,
314 void *proc_cls); 315 void *proc_cls);
315 316
316 317
317/** 318/**
@@ -333,11 +334,11 @@ GNUNET_DATASTORE_get_zero_anonymity(struct GNUNET_DATASTORE_Handle *h,
333 * cancel 334 * cancel
334 */ 335 */
335struct GNUNET_DATASTORE_QueueEntry * 336struct GNUNET_DATASTORE_QueueEntry *
336GNUNET_DATASTORE_get_for_replication(struct GNUNET_DATASTORE_Handle *h, 337GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
337 unsigned int queue_priority, 338 unsigned int queue_priority,
338 unsigned int max_queue_size, 339 unsigned int max_queue_size,
339 GNUNET_DATASTORE_DatumProcessor proc, 340 GNUNET_DATASTORE_DatumProcessor proc,
340 void *proc_cls); 341 void *proc_cls);
341 342
342 343
343 344
@@ -348,7 +349,7 @@ GNUNET_DATASTORE_get_for_replication(struct GNUNET_DATASTORE_Handle *h,
348 * @param qe operation to cancel 349 * @param qe operation to cancel
349 */ 350 */
350void 351void
351GNUNET_DATASTORE_cancel(struct GNUNET_DATASTORE_QueueEntry *qe); 352GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
352 353
353 354
354#if 0 /* keep Emacsens' auto-indent happy */ 355#if 0 /* keep Emacsens' auto-indent happy */