SHUTDOWN
[oweals/gnunet.git] / src / include / gnunet_container_lib.h
index c5f46b41904302eaaab543ebc13bcaf84d873f92..26579809dd6659ce33214410f4daa5d1bb3e31e4 100644 (file)
@@ -65,6 +65,7 @@ struct GNUNET_CONTAINER_BloomFilter;
 typedef int (*GNUNET_HashCodeIterator) (void *cls,
                                        GNUNET_HashCode * next);
 
+
 /**
  * Load a bloom-filter from a file.
  *
@@ -85,6 +86,7 @@ GNUNET_CONTAINER_bloomfilter_load (const
                                   int
                                   k);
 
+
 /**
  * Create a bloom filter from raw bits.
  *
@@ -108,6 +110,7 @@ GNUNET_CONTAINER_bloomfilter_init (const
                                   int
                                   k);
 
+
 /**
  * Copy the raw data of this bloomfilter into
  * the given data array.
@@ -121,6 +124,7 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
                                                *bf, char *data,
                                                size_t size);
 
+
 /**
  * Test if an element is in the filter.
  * @param e the element
@@ -130,6 +134,7 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
 int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
                                        *bf, const GNUNET_HashCode * e);
 
+
 /**
  * Add an element to the filter
  * @param bf the filter
@@ -138,6 +143,7 @@ int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
 void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter
                                        *bf, const GNUNET_HashCode * e);
 
+
 /**
  * Remove an element from the filter.
  * @param bf the filter
@@ -146,6 +152,18 @@ void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter
 void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
                                           *bf, const GNUNET_HashCode * e);
 
+
+/**
+ * Create a copy of a bloomfilter.
+ *
+ * @param bf the filter
+ * @return copy of bf
+ */
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter *bf);
+
+
+
 /**
  * Free the space associcated with a filter
  * in memory, flush to drive if needed (do not
@@ -900,6 +918,15 @@ unsigned int
 GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap);
 
 
+/**
+ * Get the current cost of the node
+ *
+ * @param node the node to get the cost of
+ * @return cost of the node
+ */
+GNUNET_CONTAINER_HeapCostType
+GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode *node);
+
 /**
  * Iterator for heap
  *
@@ -942,7 +969,9 @@ GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
  *
  */
 void *
-GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap, uint32_t max);
+GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap, 
+                                 uint32_t max);
+
 
 /**
  * Perform a random walk of the tree.  The walk is biased
@@ -986,13 +1015,11 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
 /**
  * Removes a node from the heap.
  * 
- * @param heap heap to modify
  * @param node node to remove
  * @return element data stored at the node, NULL if heap is empty
  */
 void *
-GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_Heap *heap,
-                                  struct GNUNET_CONTAINER_HeapNode *node);
+GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode *node);
 
 
 /**