- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# rpmio/rpmhash.h

Go to the documentation of this file.

    00001 #ifndef H_RPMHASH
    00002 #define H_RPMHASH
    00003
    00011 typedef /*@abstract@*/ 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                 /*@null@*/ hashFunctionType fn, /*@null@*/ hashEqualityType eq)
    00049         /*@*/;
    00050
    00056 /*@null@*/
    00057 hashTable htFree( /*@only@*/ hashTable ht)
    00058         /*@modifies ht @*/;
    00059
    00066 void htAddEntry(hashTable ht, /*@owned@*/ const void * key,
    00067                 /*@owned@*/ const void * data)
    00068         /*@modifies ht */;
    00069
    00079 int htGetEntry(hashTable ht, const void * key,
    00080                 /*@null@*/ /*@out@*/ const void * data,
    00081                 /*@null@*/ /*@out@*/ int * dataCount,
    00082                 /*@null@*/ /*@out@*/ const void * tableKey)
    00083         /*@modifies *data, *dataCount, *tableKey @*/;
    00084
    00091 /*@unused@*/
    00092 int htHasEntry(hashTable ht, const void * key)
    00093         /*@*/;
    00094
    00095 #ifdef __cplusplus
    00096 }
    00097 #endif
    00098
    00099 #endif