aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_container_lib.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2013-11-05 00:08:13 +0000
committerFlorian Dold <florian.dold@gmail.com>2013-11-05 00:08:13 +0000
commitca2c7bdfa64a30c0013598f0718dcfe7e6d98b2a (patch)
tree3bedd0e18f88371c2e75bd1953e0bc321629c828 /src/include/gnunet_container_lib.h
parent6c3bf6b3486fd31402ab991f5ddef76bf9cd93c4 (diff)
downloadgnunet-ca2c7bdfa64a30c0013598f0718dcfe7e6d98b2a.tar.gz
gnunet-ca2c7bdfa64a30c0013598f0718dcfe7e6d98b2a.zip
- implemented missing set functionality
- secretsharing api changes
Diffstat (limited to 'src/include/gnunet_container_lib.h')
-rw-r--r--src/include/gnunet_container_lib.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index 9b7f8ecd1..6e782871a 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -1082,6 +1082,14 @@ struct GNUNET_CONTAINER_MultiHashMap32;
1082 1082
1083/** 1083/**
1084 * @ingroup hashmap 1084 * @ingroup hashmap
1085 * Opaque handle to an iterator over
1086 * a 32-bit key multihashmap.
1087 */
1088struct GNUNET_CONTAINER_MultiHashMap32Iterator;
1089
1090
1091/**
1092 * @ingroup hashmap
1085 * Iterator over hash map entries. 1093 * Iterator over hash map entries.
1086 * 1094 *
1087 * @param cls closure 1095 * @param cls closure
@@ -1267,6 +1275,49 @@ GNUNET_CONTAINER_multihashmap32_get_multiple (const struct GNUNET_CONTAINER_Mult
1267 void *it_cls); 1275 void *it_cls);
1268 1276
1269 1277
1278/**
1279 * Create an iterator for a 32-bit multihashmap.
1280 * The iterator can be used to retrieve all the elements in the multihashmap
1281 * one by one, without having to handle all elements at once (in contrast to
1282 * #GNUNET_CONTAINER_multihashmap32_iterate). Note that the iterator can not be
1283 * used anymore if elements have been removed from 'map' after the creation of
1284 * the iterator, or 'map' has been destroyed. Adding elements to 'map' may
1285 * result in skipped or repeated elements.
1286 *
1287 * @param map the map to create an iterator for
1288 * @return an iterator over the given multihashmap map
1289 */
1290struct GNUNET_CONTAINER_MultiHashMap32Iterator *
1291GNUNET_CONTAINER_multihashmap32_iterator_create (const struct GNUNET_CONTAINER_MultiHashMap32 *map);
1292
1293
1294/**
1295 * Retrieve the next element from the hash map at the iterator's position.
1296 * If there are no elements left, GNUNET_NO is returned, and 'key' and 'value'
1297 * are not modified.
1298 * This operation is only allowed if no elements have been removed from the
1299 * multihashmap since the creation of 'iter', and the map has not been destroyed.
1300 * Adding elements may result in repeating or skipping elements.
1301 *
1302 * @param iter the iterator to get the next element from
1303 * @param key pointer to store the key in, can be NULL
1304 * @param value pointer to store the value in, can be NULL
1305 * @return #GNUNET_YES we returned an element,
1306 * #GNUNET_NO if we are out of elements
1307 */
1308int
1309GNUNET_CONTAINER_multihashmap32_iterator_next (struct GNUNET_CONTAINER_MultiHashMap32Iterator *iter,
1310 uint32_t *key,
1311 const void **value);
1312
1313
1314/**
1315 * Destroy a 32-bit multihashmap iterator.
1316 *
1317 * @param iter the iterator to destroy
1318 */
1319void
1320GNUNET_CONTAINER_multihashmap32_iterator_destroy (struct GNUNET_CONTAINER_MultiHashMapIterator *iter);
1270 1321
1271 1322
1272/* ******************** doubly-linked list *************** */ 1323/* ******************** doubly-linked list *************** */