aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datastore_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_datastore_plugin.h')
-rw-r--r--src/include/gnunet_datastore_plugin.h41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h
index 2295d4e72..b1c9cb7c3 100644
--- a/src/include/gnunet_datastore_plugin.h
+++ b/src/include/gnunet_datastore_plugin.h
@@ -204,9 +204,9 @@ typedef void
204 * Get one of the results for a particular key in the datastore. 204 * Get one of the results for a particular key in the datastore.
205 * 205 *
206 * @param cls closure 206 * @param cls closure
207 * @param offset offset of the result (modulo num-results); 207 * @param next_uid return the result with lowest uid >= next_uid
208 * specific ordering does not matter for the offset 208 * @param random if true, return a random result instead of using next_uid
209 * @param key key to match, never NULL 209 * @param key maybe NULL (to match all entries)
210 * @param vhash hash of the value, maybe NULL (to 210 * @param vhash hash of the value, maybe NULL (to
211 * match all values that have the right key). 211 * match all values that have the right key).
212 * Note that for DBlocks there is no difference 212 * Note that for DBlocks there is no difference
@@ -215,17 +215,18 @@ typedef void
215 * @param type entries of which type are relevant? 215 * @param type entries of which type are relevant?
216 * Use 0 for any type. 216 * Use 0 for any type.
217 * @param proc function to call on the matching value; 217 * @param proc function to call on the matching value;
218 * proc should be called with NULL if there is no result 218 * will be called with NULL if nothing matches
219 * @param proc_cls closure for @a proc 219 * @param proc_cls closure for @a proc
220 */ 220 */
221typedef void 221typedef void
222(*PluginGetKey) (void *cls, 222(*PluginGetKey) (void *cls,
223 uint64_t offset, 223 uint64_t next_uid,
224 const struct GNUNET_HashCode *key, 224 bool random,
225 const struct GNUNET_HashCode *vhash, 225 const struct GNUNET_HashCode *key,
226 enum GNUNET_BLOCK_Type type, 226 const struct GNUNET_HashCode *vhash,
227 PluginDatumProcessor proc, 227 enum GNUNET_BLOCK_Type type,
228 void *proc_cls); 228 PluginDatumProcessor proc,
229 void *proc_cls);
229 230
230 231
231/** 232/**
@@ -285,23 +286,22 @@ typedef void
285 286
286 287
287/** 288/**
288 * Select a single item from the datastore at the specified offset 289 * Select a single item from the datastore (among those applicable).
289 * (among those applicable).
290 * 290 *
291 * @param cls closure 291 * @param cls closure
292 * @param offset offset of the result (modulo num-results); 292 * @param next_uid return the result with lowest uid >= next_uid
293 * specific ordering does not matter for the offset
294 * @param type entries of which type should be considered? 293 * @param type entries of which type should be considered?
295 * Must not be zero (ANY). 294 * Must not be zero (ANY).
296 * @param proc function to call on the matching value 295 * @param proc function to call on the matching value;
296 * will be called with NULL if no value matches
297 * @param proc_cls closure for @a proc 297 * @param proc_cls closure for @a proc
298 */ 298 */
299typedef void 299typedef void
300(*PluginGetType) (void *cls, 300(*PluginGetType) (void *cls,
301 uint64_t offset, 301 uint64_t next_uid,
302 enum GNUNET_BLOCK_Type type, 302 enum GNUNET_BLOCK_Type type,
303 PluginDatumProcessor proc, 303 PluginDatumProcessor proc,
304 void *proc_cls); 304 void *proc_cls);
305 305
306 306
307/** 307/**
@@ -354,9 +354,6 @@ struct GNUNET_DATASTORE_PluginFunctions
354 354
355 /** 355 /**
356 * Get datum (of the specified type) with anonymity level zero. 356 * Get datum (of the specified type) with anonymity level zero.
357 * This function is allowed to ignore the 'offset' argument
358 * and instead return a random result (with zero anonymity of
359 * the correct type) if implementing an offset is expensive.
360 */ 357 */
361 PluginGetType get_zero_anonymity; 358 PluginGetType get_zero_anonymity;
362 359