tizen 2.3.1 release
[external/curl.git] / lib / hash.h
index 993aaed..aa935d4 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __HASH_H
-#define __HASH_H
+#ifndef HEADER_CURL_HASH_H
+#define HEADER_CURL_HASH_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 
-#include "setup.h"
+#include "curl_setup.h"
 
 #include <stddef.h>
 
@@ -62,6 +62,11 @@ struct curl_hash_element {
   size_t key_len;
 };
 
+struct curl_hash_iterator {
+  struct curl_hash *hash;
+  int slot_index;
+  struct curl_llist_element *current_element;
+};
 
 int Curl_hash_init(struct curl_hash *h,
                    int slots,
@@ -89,4 +94,13 @@ size_t Curl_hash_str(void* key, size_t key_length, size_t slots_num);
 size_t Curl_str_key_compare(void*k1, size_t key1_len, void*k2,
                             size_t key2_len);
 
-#endif
+void Curl_hash_start_iterate(struct curl_hash *hash,
+                             struct curl_hash_iterator *iter);
+struct curl_hash_element *
+Curl_hash_next_element(struct curl_hash_iterator *iter);
+
+void Curl_hash_print(struct curl_hash *h,
+                     void (*func)(void *));
+
+
+#endif /* HEADER_CURL_HASH_H */