aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_datastore_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-09-11 14:21:00 +0000
committerChristian Grothoff <christian@grothoff.org>2009-09-11 14:21:00 +0000
commitbeb7e51b1c1606856e2a8cbe2d6f5d64a56ca3b8 (patch)
treee2706394d267f7f4ed7d925c5d9461e2657bca1d /src/include/gnunet_datastore_service.h
parent34d2cace7259c408fdb0526dedd0d44a1a11929e (diff)
downloadgnunet-beb7e51b1c1606856e2a8cbe2d6f5d64a56ca3b8.tar.gz
gnunet-beb7e51b1c1606856e2a8cbe2d6f5d64a56ca3b8.zip
better datastore API
Diffstat (limited to 'src/include/gnunet_datastore_service.h')
-rw-r--r--src/include/gnunet_datastore_service.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index 7c1fd1961..bcc89a8e1 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -218,7 +218,10 @@ typedef void (*GNUNET_DATASTORE_Iterator) (void *cls,
218 218
219/** 219/**
220 * Iterate over the results for a particular key 220 * Iterate over the results for a particular key
221 * in the datastore. 221 * in the datastore. The iterator will only be called
222 * once initially; if the first call did contain a
223 * result, further results can be obtained by calling
224 * "GNUNET_DATASTORE_get_next" with the given argument.
222 * 225 *
223 * @param h handle to the datastore 226 * @param h handle to the datastore
224 * @param key maybe NULL (to match all entries) 227 * @param key maybe NULL (to match all entries)
@@ -232,11 +235,25 @@ void
232GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h, 235GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
233 const GNUNET_HashCode * key, 236 const GNUNET_HashCode * key,
234 uint32_t type, 237 uint32_t type,
235 GNUNET_DATASTORE_Iterator iter, void *iter_cls, 238 GNUNET_DATASTORE_Iterator iter,
239 void *iter_cls,
236 struct GNUNET_TIME_Relative timeout); 240 struct GNUNET_TIME_Relative timeout);
237 241
238 242
239/** 243/**
244 * Function called to trigger obtaining the next result
245 * from the datastore.
246 *
247 * @param h handle to the datastore
248 * @param more GNUNET_YES to get moxre results, GNUNET_NO to abort
249 * iteration (with a final call to "iter" with key/data == NULL).
250 */
251void
252GNUNET_DATASTORE_get_next (struct GNUNET_DATASTORE_Handle *h,
253 int more);
254
255
256/**
240 * Get a random value from the datastore. 257 * Get a random value from the datastore.
241 * 258 *
242 * @param h handle to the datastore 259 * @param h handle to the datastore