rpm  4.5
rpmhash.h
Go to the documentation of this file.
1 #ifndef H_RPMHASH
2 #define H_RPMHASH
3 
11 typedef /*@abstract@*/ struct hashTable_s * hashTable;
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
24 typedef uint32_t (*hashFunctionType) (uint32_t h, const void * data, size_t size)
25  /*@*/;
26 
33 typedef int (*hashEqualityType) (const void * key1, const void * key2)
34  /*@*/;
35 
47 hashTable htCreate(int numBuckets, int keySize, int freeData,
48  /*@null@*/ hashFunctionType fn, /*@null@*/ hashEqualityType eq)
49  /*@*/;
50 
56 /*@null@*/
57 hashTable htFree( /*@only@*/ hashTable ht)
58  /*@modifies ht @*/;
59 
66 void htAddEntry(hashTable ht, /*@owned@*/ const void * key,
67  /*@owned@*/ const void * data)
68  /*@modifies ht */;
69 
79 int htGetEntry(hashTable ht, const void * key,
80  /*@null@*/ /*@out@*/ const void *** data,
81  /*@null@*/ /*@out@*/ int * dataCount,
82  /*@null@*/ /*@out@*/ const void ** tableKey)
83  /*@modifies *data, *dataCount, *tableKey @*/;
84 
91 /*@unused@*/
92 int htHasEntry(hashTable ht, const void * key)
93  /*@*/;
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif