2 * Copyright (C) 2009 Brian Aker
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
12 #if !defined(__cplusplus)
16 #include <sys/types.h>
17 #include <libhashkit/visibility.h>
18 #include <libhashkit/types.h>
19 #include <libhashkit/algorithm.h>
20 #include <libhashkit/behavior.h>
21 #include <libhashkit/strerror.h>
30 hashkit_hash_fn function
;
40 hashkit_st
*hashkit_create(hashkit_st
*hash
);
43 hashkit_st
*hashkit_clone(hashkit_st
*destination
, const hashkit_st
*ptr
);
46 void hashkit_free(hashkit_st
*hash
);
49 uint32_t hashkit_generate_value(const hashkit_st
*self
, const char *key
, size_t key_length
);
52 hashkit_return_t
hashkit_set_base_function(hashkit_st
*hash
, hashkit_hash_algorithm_t hash_algorithm
);
55 hashkit_return_t
hashkit_set_base_function_custom(hashkit_st
*hash
, hashkit_hash_fn function
, void *context
);
58 uint32_t libhashkit_generate_value(const char *key
, size_t key_length
, hashkit_hash_algorithm_t hash_algorithm
);
60 #define hashkit_is_allocated(__object) ((__object)->options.is_allocated)
61 #define hashkit_is_initialized(__object) ((__object)->options.is_initialized)
69 #endif /* HASHKIT_H */