954ad3bf44a0e0af89bb681e4aea0f756647f17b
[tools/librpm-tizen.git] / python / hash.h
1 #ifndef H_HASH
2 #define H_HASH
3
4 struct hash_table;
5 typedef struct hash_table * hashTable;
6
7 struct ht_iterator {
8     int bucket;
9     int item;
10 };
11
12 typedef struct ht_iterator htIterator;
13
14 struct hash_table *htNewTable(int size);
15 void htFreeHashTable(struct hash_table *ht);
16 int htInTable(struct hash_table *t,  const char * dir, const char * base);
17 void htAddToTable(struct hash_table *t, const char * dir, const char * base);
18 void htPrintHashStats(struct hash_table *t);
19 int htNumEntries(struct hash_table *t);
20 void htRemoveFromTable(struct hash_table *t, const char * dir, 
21                        const char * base);
22
23 /* these use static storage */
24 void htIterStart(htIterator * iter);
25 int htIterGetNext(struct hash_table * t, htIterator * iter, 
26                   const char ** dir, const char ** base);
27
28 #endif