13e0218d9adb4f6513ce1c5ca9296ba8f0a6297a
[awesomized/libmemcached] / libmemcached-1.2 / auto.h
1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * Libmemcached library
4 *
5 * Copyright (C) 2011 Data Differential, http://datadifferential.com/
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above
16 * copyright notice, this list of conditions and the following disclaimer
17 * in the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
22 * written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 */
37
38 #pragma once
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 LIBMEMCACHED_API
45 memcached_return_t memcached_increment(memcached_st *ptr,
46 const char *key, size_t key_length,
47 uint32_t offset,
48 uint64_t *value);
49 LIBMEMCACHED_API
50 memcached_return_t memcached_decrement(memcached_st *ptr,
51 const char *key, size_t key_length,
52 uint32_t offset,
53 uint64_t *value);
54
55 LIBMEMCACHED_API
56 memcached_return_t memcached_increment_by_key(memcached_st *ptr,
57 const char *group_key, size_t group_key_length,
58 const char *key, size_t key_length,
59 uint64_t offset,
60 uint64_t *value);
61
62 LIBMEMCACHED_API
63 memcached_return_t memcached_decrement_by_key(memcached_st *ptr,
64 const char *group_key, size_t group_key_length,
65 const char *key, size_t key_length,
66 uint64_t offset,
67 uint64_t *value);
68
69 LIBMEMCACHED_API
70 memcached_return_t memcached_increment_with_initial(memcached_st *ptr,
71 const char *key,
72 size_t key_length,
73 uint64_t offset,
74 uint64_t initial,
75 time_t expiration,
76 uint64_t *value);
77
78 LIBMEMCACHED_API
79 memcached_return_t memcached_decrement_with_initial(memcached_st *ptr,
80 const char *key,
81 size_t key_length,
82 uint64_t offset,
83 uint64_t initial,
84 time_t expiration,
85 uint64_t *value);
86
87 LIBMEMCACHED_API
88 memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr,
89 const char *group_key,
90 size_t group_key_length,
91 const char *key,
92 size_t key_length,
93 uint64_t offset,
94 uint64_t initial,
95 time_t expiration,
96 uint64_t *value);
97
98 LIBMEMCACHED_API
99 memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr,
100 const char *group_key,
101 size_t group_key_length,
102 const char *key,
103 size_t key_length,
104 uint64_t offset,
105 uint64_t initial,
106 time_t expiration,
107 uint64_t *value);
108
109 #ifdef __cplusplus
110 }
111 #endif