aboutsummaryrefslogtreecommitdiff
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.h47
1 files changed, 6 insertions, 41 deletions
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index f594d8fa6..830e7da86 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -201,33 +201,6 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
201 201
202 202
203/** 203/**
204 * Update a value in the datastore.
205 *
206 * @param h handle to the datastore
207 * @param uid identifier for the value
208 * @param priority how much to increase the priority of the value
209 * @param expiration new expiration value should be MAX of existing and this argument
210 * @param queue_priority ranking of this request in the priority queue
211 * @param max_queue_size at what queue size should this request be dropped
212 * (if other requests of higher priority are in the queue)
213 * @param cont continuation to call when done
214 * @param cont_cls closure for @a cont
215 * @return NULL if the entry was not queued, otherwise a handle that can be used to
216 * cancel; note that even if NULL is returned, the callback will be invoked
217 * (or rather, will already have been invoked)
218 */
219struct GNUNET_DATASTORE_QueueEntry *
220GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
221 uint64_t uid,
222 uint32_t priority,
223 struct GNUNET_TIME_Absolute expiration,
224 unsigned int queue_priority,
225 unsigned int max_queue_size,
226 GNUNET_DATASTORE_ContinuationWithStatus cont,
227 void *cont_cls);
228
229
230/**
231 * Explicitly remove some content from the database. @a cont will be 204 * Explicitly remove some content from the database. @a cont will be
232 * called with status #GNUNET_OK if content was removed, #GNUNET_NO if 205 * called with status #GNUNET_OK if content was removed, #GNUNET_NO if
233 * no matching entry was found and #GNUNET_SYSERR on all other types 206 * no matching entry was found and #GNUNET_SYSERR on all other types
@@ -288,10 +261,8 @@ typedef void
288 * will only be called once. 261 * will only be called once.
289 * 262 *
290 * @param h handle to the datastore 263 * @param h handle to the datastore
291 * @param offset offset of the result (modulo num-results); set to 264 * @param next_uid return the result with lowest uid >= next_uid
292 * a random 64-bit value initially; then increment by 265 * @param random if true, return a random result instead of using next_uid
293 * one each time; detect that all results have been found by uid
294 * being again the first uid ever returned.
295 * @param key maybe NULL (to match all entries) 266 * @param key maybe NULL (to match all entries)
296 * @param type desired type, 0 for any 267 * @param type desired type, 0 for any
297 * @param queue_priority ranking of this request in the priority queue 268 * @param queue_priority ranking of this request in the priority queue
@@ -305,7 +276,8 @@ typedef void
305 */ 276 */
306struct GNUNET_DATASTORE_QueueEntry * 277struct GNUNET_DATASTORE_QueueEntry *
307GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, 278GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
308 uint64_t offset, 279 uint64_t next_uid,
280 bool random,
309 const struct GNUNET_HashCode *key, 281 const struct GNUNET_HashCode *key,
310 enum GNUNET_BLOCK_Type type, 282 enum GNUNET_BLOCK_Type type,
311 unsigned int queue_priority, 283 unsigned int queue_priority,
@@ -316,16 +288,9 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
316 288
317/** 289/**
318 * Get a single zero-anonymity value from the datastore. 290 * Get a single zero-anonymity value from the datastore.
319 * Note that some implementations can ignore the 'offset' and
320 * instead return a random zero-anonymity value. In that case,
321 * detecting the wrap-around based on a repeating UID is at best
322 * probabilistic.
323 * 291 *
324 * @param h handle to the datastore 292 * @param h handle to the datastore
325 * @param offset offset of the result (modulo num-results); set to 293 * @param next_uid return the result with lowest uid >= next_uid
326 * a random 64-bit value initially; then increment by
327 * one each time; detect that all results have been found by uid
328 * being again the first uid ever returned.
329 * @param queue_priority ranking of this request in the priority queue 294 * @param queue_priority ranking of this request in the priority queue
330 * @param max_queue_size at what queue size should this request be dropped 295 * @param max_queue_size at what queue size should this request be dropped
331 * (if other requests of higher priority are in the queue) 296 * (if other requests of higher priority are in the queue)
@@ -339,7 +304,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
339 */ 304 */
340struct GNUNET_DATASTORE_QueueEntry * 305struct GNUNET_DATASTORE_QueueEntry *
341GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h, 306GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
342 uint64_t offset, 307 uint64_t next_uid,
343 unsigned int queue_priority, 308 unsigned int queue_priority,
344 unsigned int max_queue_size, 309 unsigned int max_queue_size,
345 enum GNUNET_BLOCK_Type type, 310 enum GNUNET_BLOCK_Type type,