Merge from Trond
[m6w6/libmemcached] / libmemcached / memcached_storage.h
1 /*
2 * Summary: Storage functions for libmemcached
3 *
4 * Copy: See Copyright for the status of this software.
5 *
6 * Author: Brian Aker
7 */
8
9 #ifndef __MEMCACHED_STORAGE_H__
10 #define __MEMCACHED_STORAGE_H__
11
12 #include "libmemcached/memcached_types.h"
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 /* All of the functions for adding data to the server */
19 LIBMEMCACHED_API
20 memcached_return memcached_set(memcached_st *ptr, const char *key, size_t key_length,
21 const char *value, size_t value_length,
22 time_t expiration,
23 uint32_t flags);
24 LIBMEMCACHED_API
25 memcached_return memcached_add(memcached_st *ptr, const char *key, size_t key_length,
26 const char *value, size_t value_length,
27 time_t expiration,
28 uint32_t flags);
29 LIBMEMCACHED_API
30 memcached_return memcached_replace(memcached_st *ptr, const char *key, size_t key_length,
31 const char *value, size_t value_length,
32 time_t expiration,
33 uint32_t flags);
34 LIBMEMCACHED_API
35 memcached_return memcached_append(memcached_st *ptr,
36 const char *key, size_t key_length,
37 const char *value, size_t value_length,
38 time_t expiration,
39 uint32_t flags);
40 LIBMEMCACHED_API
41 memcached_return memcached_prepend(memcached_st *ptr,
42 const char *key, size_t key_length,
43 const char *value, size_t value_length,
44 time_t expiration,
45 uint32_t flags);
46 LIBMEMCACHED_API
47 memcached_return memcached_cas(memcached_st *ptr,
48 const char *key, size_t key_length,
49 const char *value, size_t value_length,
50 time_t expiration,
51 uint32_t flags,
52 uint64_t cas);
53
54 LIBMEMCACHED_API
55 memcached_return memcached_set_by_key(memcached_st *ptr,
56 const char *master_key, size_t master_key_length,
57 const char *key, size_t key_length,
58 const char *value, size_t value_length,
59 time_t expiration,
60 uint32_t flags);
61
62 LIBMEMCACHED_API
63 memcached_return memcached_add_by_key(memcached_st *ptr,
64 const char *master_key, size_t master_key_length,
65 const char *key, size_t key_length,
66 const char *value, size_t value_length,
67 time_t expiration,
68 uint32_t flags);
69
70 LIBMEMCACHED_API
71 memcached_return memcached_replace_by_key(memcached_st *ptr,
72 const char *master_key, size_t master_key_length,
73 const char *key, size_t key_length,
74 const char *value, size_t value_length,
75 time_t expiration,
76 uint32_t flags);
77
78 LIBMEMCACHED_API
79 memcached_return memcached_prepend_by_key(memcached_st *ptr,
80 const char *master_key, size_t master_key_length,
81 const char *key, size_t key_length,
82 const char *value, size_t value_length,
83 time_t expiration,
84 uint32_t flags);
85
86 LIBMEMCACHED_API
87 memcached_return memcached_append_by_key(memcached_st *ptr,
88 const char *master_key, size_t master_key_length,
89 const char *key, size_t key_length,
90 const char *value, size_t value_length,
91 time_t expiration,
92 uint32_t flags);
93
94 LIBMEMCACHED_API
95 memcached_return memcached_cas_by_key(memcached_st *ptr,
96 const char *master_key, size_t master_key_length,
97 const char *key, size_t key_length,
98 const char *value, size_t value_length,
99 time_t expiration,
100 uint32_t flags,
101 uint64_t cas);
102
103 #ifdef __cplusplus
104 }
105 #endif
106
107 #endif /* __MEMCACHED_STORAGE_H__ */