/*
This file is part of GNUnet.
- (C) 2001-2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001-2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* iterate,
* #GNUNET_NO if not.
*/
-typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls,
- const struct GNUNET_HashCode *key,
- void *value);
+typedef int
+(*GNUNET_CONTAINER_HashMapIterator) (void *cls,
+ const struct GNUNET_HashCode *key,
+ void *value);
/**
const struct GNUNET_HashCode *key);
+/**
+ * @ingroup hashmap
+ * Remove all entries from the map.
+ * Note that the values would not be "freed".
+ *
+ * @param map the map
+ * @return number of values removed
+ */
+unsigned int
+GNUNET_CONTAINER_multihashmap_clear (struct GNUNET_CONTAINER_MultiHashMap *map);
+
+
/**
* @ingroup hashmap
* Check if the map contains any value under the given
* @return the number of key value pairs
*/
unsigned int
-GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
- *map);
+GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap *map);
/**
* #GNUNET_SYSERR if it aborted iteration
*/
int
-GNUNET_CONTAINER_multihashmap_iterate (const struct
- GNUNET_CONTAINER_MultiHashMap *map,
+GNUNET_CONTAINER_multihashmap_iterate (const struct GNUNET_CONTAINER_MultiHashMap *map,
GNUNET_CONTAINER_HashMapIterator it,
void *it_cls);
* iterate,
* #GNUNET_NO if not.
*/
-typedef int (*GNUNET_CONTAINER_PeerMapIterator) (void *cls,
- const struct GNUNET_PeerIdentity *key,
- void *value);
+typedef int
+(*GNUNET_CONTAINER_PeerMapIterator) (void *cls,
+ const struct GNUNET_PeerIdentity *key,
+ void *value);
struct GNUNET_CONTAINER_MultiPeerMap;