Updating for 1.0.2 release
[awesomized/libmemcached] / libhashkit-1.0 / function.h
1 /* HashKit
2 * Copyright (C) 2010 Brian Aker
3 * All rights reserved.
4 *
5 * Use and distribution licensed under the BSD license. See
6 * the COPYING file in the parent directory for full text.
7 */
8
9 #pragma once
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 /**
16 This sets/gets the default function we will be using.
17 */
18 HASHKIT_API
19 hashkit_return_t hashkit_set_function(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm);
20
21 HASHKIT_API
22 hashkit_return_t hashkit_set_custom_function(hashkit_st *hash, hashkit_hash_fn function, void *context);
23
24 HASHKIT_API
25 hashkit_hash_algorithm_t hashkit_get_function(const hashkit_st *hash);
26
27 /**
28 This sets/gets the function we use for distribution.
29 */
30 HASHKIT_API
31 hashkit_return_t hashkit_set_distribution_function(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm);
32
33 HASHKIT_API
34 hashkit_return_t hashkit_set_custom_distribution_function(hashkit_st *self, hashkit_hash_fn function, void *context);
35
36 HASHKIT_API
37 hashkit_hash_algorithm_t hashkit_get_distribution_function(const hashkit_st *self);
38
39 #ifdef __cplusplus
40 }
41 #endif