aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-05 11:23:06 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-05 11:23:06 +0000
commit3066c800a6d6b6e16d6c174519025608b6f7f250 (patch)
treef6b216578bf89c7474b40c7566c267dabcdc2f0d /src/include
parente097895ea54b316c3ede8640f6dd49f864313a2d (diff)
downloadgnunet-3066c800a6d6b6e16d6c174519025608b6f7f250.tar.gz
gnunet-3066c800a6d6b6e16d6c174519025608b6f7f250.zip
-allow passing NULL for zone to iterate over all of our zones
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_namestore_plugin.h8
-rw-r--r--src/include/gnunet_namestore_service.h11
2 files changed, 11 insertions, 8 deletions
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h
index 5ab374ed0..c40d95451 100644
--- a/src/include/gnunet_namestore_plugin.h
+++ b/src/include/gnunet_namestore_plugin.h
@@ -95,7 +95,7 @@ struct GNUNET_NAMESTORE_PluginFunctions
95 * @param cls closure (internal context for the plugin) 95 * @param cls closure (internal context for the plugin)
96 * @param query hash of public key derived from the zone and the label 96 * @param query hash of public key derived from the zone and the label
97 * @param iter function to call with the result 97 * @param iter function to call with the result
98 * @param iter_cls closure for iter 98 * @param iter_cls closure for @a iter
99 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error 99 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error
100 */ 100 */
101 int (*lookup_block) (void *cls, 101 int (*lookup_block) (void *cls,
@@ -127,10 +127,10 @@ struct GNUNET_NAMESTORE_PluginFunctions
127 * datastore. Will return at most one result to the iterator. 127 * datastore. Will return at most one result to the iterator.
128 * 128 *
129 * @param cls closure (internal context for the plugin) 129 * @param cls closure (internal context for the plugin)
130 * @param zone private key of the zone 130 * @param zone private key of the zone, NULL for all zones
131 * @param offset offset in the list of all matching records 131 * @param offset offset in the list of all matching records
132 * @param iter function to call with the result 132 * @param iter function to call with the result
133 * @param iter_cls closure for iter 133 * @param iter_cls closure for @a iter
134 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error 134 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error
135 */ 135 */
136 int (*iterate_records) (void *cls, 136 int (*iterate_records) (void *cls,
@@ -147,7 +147,7 @@ struct GNUNET_NAMESTORE_PluginFunctions
147 * @param zone private key of the zone to look up in, never NULL 147 * @param zone private key of the zone to look up in, never NULL
148 * @param value_zone public key of the target zone (value), never NULL 148 * @param value_zone public key of the target zone (value), never NULL
149 * @param iter function to call with the result 149 * @param iter function to call with the result
150 * @param iter_cls closure for iter 150 * @param iter_cls closure for @a iter
151 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error 151 * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error
152 */ 152 */
153 int (*zone_to_name) (void *cls, 153 int (*zone_to_name) (void *cls,
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h
index 759b53581..0f6730d62 100644
--- a/src/include/gnunet_namestore_service.h
+++ b/src/include/gnunet_namestore_service.h
@@ -393,15 +393,18 @@ GNUNET_NAMESTORE_cancel (struct GNUNET_NAMESTORE_QueueEntry *qe);
393 393
394/** 394/**
395 * Starts a new zone iteration (used to periodically PUT all of our 395 * Starts a new zone iteration (used to periodically PUT all of our
396 * records into our DHT). @a proc will be called once immediately, and 396 * records into our DHT). This MUST lock the struct GNUNET_NAMESTORE_Handle
397 * then again after #GNUNET_NAMESTORE_zone_iterator_next is invoked. 397 * for any other calls than #GNUNET_NAMESTORE_zone_iterator_next and
398 * #GNUNET_NAMESTORE_zone_iteration_stop. @a proc will be called once
399 * immediately, and then again after
400 * #GNUNET_NAMESTORE_zone_iterator_next is invoked.
398 * 401 *
399 * @param h handle to the namestore 402 * @param h handle to the namestore
400 * @param zone zone to access 403 * @param zone zone to access, NULL for all zones
401 * @param proc function to call on each name from the zone; it 404 * @param proc function to call on each name from the zone; it
402 * will be called repeatedly with a value (if available) 405 * will be called repeatedly with a value (if available)
403 * and always once at the end with a name of NULL. 406 * and always once at the end with a name of NULL.
404 * @param proc_cls closure for proc 407 * @param proc_cls closure for @a proc
405 * @return an iterator handle to use for iteration 408 * @return an iterator handle to use for iteration
406 */ 409 */
407struct GNUNET_NAMESTORE_ZoneIterator * 410struct GNUNET_NAMESTORE_ZoneIterator *