Go to the documentation of this file.00001 #ifndef H_RPMHASH
00002 #define H_RPMHASH
00003
00011 typedef struct hashTable_s * hashTable;
00012
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016
00024 typedef uint32_t (*hashFunctionType) (uint32_t h, const void * data, size_t size)
00025 ;
00026
00033 typedef int (*hashEqualityType) (const void * key1, const void * key2)
00034 ;
00035
00047 hashTable htCreate(int numBuckets, size_t keySize, int freeData,
00048 hashFunctionType fn, hashEqualityType eq)
00049 ;
00050
00056
00057 hashTable htFree( hashTable ht)
00058 ;
00059
00066 void htAddEntry(hashTable ht, const void * key,
00067 const void * data)
00068 ;
00069
00079 int htGetEntry(hashTable ht, const void * key,
00080 const void * data,
00081 int * dataCount,
00082 const void * tableKey)
00083 ;
00084
00091
00092 int htHasEntry(hashTable ht, const void * key)
00093 ;
00094
00095 #ifdef __cplusplus
00096 }
00097 #endif
00098
00099 #endif