bc428c0229d37322694662bfa1f31080c7e040b4
[awesomized/libmemcached] / lib / common.h
1 /*
2 Common include file for libmemached
3 */
4
5 #ifndef __COMMON_H__
6 #define __COMMON_H__
7
8 #include <memcached.h>
9 #include <memcached_io.h>
10
11 #include <libmemcached_config.h>
12
13 #ifdef HAVE_DTRACE
14 #define _DTRACE_VERSION 1
15 #else
16 #undef _DTRACE_VERSION
17 #endif
18
19 #include "libmemcached_probes.h"
20
21 typedef enum {
22 MEM_NO_BLOCK= (1 << 0),
23 MEM_TCP_NODELAY= (1 << 1),
24 MEM_REUSE_MEMORY= (1 << 2),
25 MEM_USE_MD5= (1 << 3),
26 } memcached_flags;
27
28 void md5_signature(unsigned char *key, unsigned int length, unsigned char *result);
29 memcached_return memcached_connect(memcached_st *ptr, unsigned int server_key);
30 memcached_return memcached_response(memcached_st *ptr,
31 char *buffer, size_t buffer_length,
32 unsigned int server_key);
33 unsigned int memcached_generate_hash(memcached_st *ptr, char *key, size_t key_length);
34
35 #endif /* __COMMON_H__ */