Minor code code cleanup, plus modification to while() loop around poll in
[m6w6/libmemcached] / libmemcached / storage.h
1 /* LibMemcached
2 * Copyright (C) 2006-2009 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 * Summary: Storage related functions, aka set, replace,..
9 *
10 */
11
12 #ifndef __LIBMEMCACHED_STORAGE_H__
13 #define __LIBMEMCACHED_STORAGE_H__
14
15 #include "libmemcached/memcached.h"
16
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20
21 /* All of the functions for adding data to the server */
22 LIBMEMCACHED_API
23 memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length,
24 const char *value, size_t value_length,
25 time_t expiration,
26 uint32_t flags);
27 LIBMEMCACHED_API
28 memcached_return_t memcached_add(memcached_st *ptr, const char *key, size_t key_length,
29 const char *value, size_t value_length,
30 time_t expiration,
31 uint32_t flags);
32 LIBMEMCACHED_API
33 memcached_return_t memcached_replace(memcached_st *ptr, const char *key, size_t key_length,
34 const char *value, size_t value_length,
35 time_t expiration,
36 uint32_t flags);
37 LIBMEMCACHED_API
38 memcached_return_t memcached_append(memcached_st *ptr,
39 const char *key, size_t key_length,
40 const char *value, size_t value_length,
41 time_t expiration,
42 uint32_t flags);
43 LIBMEMCACHED_API
44 memcached_return_t memcached_prepend(memcached_st *ptr,
45 const char *key, size_t key_length,
46 const char *value, size_t value_length,
47 time_t expiration,
48 uint32_t flags);
49 LIBMEMCACHED_API
50 memcached_return_t memcached_cas(memcached_st *ptr,
51 const char *key, size_t key_length,
52 const char *value, size_t value_length,
53 time_t expiration,
54 uint32_t flags,
55 uint64_t cas);
56
57 LIBMEMCACHED_API
58 memcached_return_t memcached_set_by_key(memcached_st *ptr,
59 const char *master_key, size_t master_key_length,
60 const char *key, size_t key_length,
61 const char *value, size_t value_length,
62 time_t expiration,
63 uint32_t flags);
64
65 LIBMEMCACHED_API
66 memcached_return_t memcached_add_by_key(memcached_st *ptr,
67 const char *master_key, size_t master_key_length,
68 const char *key, size_t key_length,
69 const char *value, size_t value_length,
70 time_t expiration,
71 uint32_t flags);
72
73 LIBMEMCACHED_API
74 memcached_return_t memcached_replace_by_key(memcached_st *ptr,
75 const char *master_key, size_t master_key_length,
76 const char *key, size_t key_length,
77 const char *value, size_t value_length,
78 time_t expiration,
79 uint32_t flags);
80
81 LIBMEMCACHED_API
82 memcached_return_t memcached_prepend_by_key(memcached_st *ptr,
83 const char *master_key, size_t master_key_length,
84 const char *key, size_t key_length,
85 const char *value, size_t value_length,
86 time_t expiration,
87 uint32_t flags);
88
89 LIBMEMCACHED_API
90 memcached_return_t memcached_append_by_key(memcached_st *ptr,
91 const char *master_key, size_t master_key_length,
92 const char *key, size_t key_length,
93 const char *value, size_t value_length,
94 time_t expiration,
95 uint32_t flags);
96
97 LIBMEMCACHED_API
98 memcached_return_t memcached_cas_by_key(memcached_st *ptr,
99 const char *master_key, size_t master_key_length,
100 const char *key, size_t key_length,
101 const char *value, size_t value_length,
102 time_t expiration,
103 uint32_t flags,
104 uint64_t cas);
105
106 #ifdef __cplusplus
107 }
108 #endif
109
110 #endif /* __LIBMEMCACHED_STORAGE_H__ */