Update tests, move to be version specific.
[m6w6/libmemcached] / libmemcached-1.0 / memcached.h
1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
2 *
3 * Libmemcached library
4 *
5 * Copyright (C) 2011 Data Differential, http://datadifferential.com/
6 * Copyright (C) 2006-2009 Brian Aker 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 #include <inttypes.h>
41 #include <stdlib.h>
42 #include <sys/types.h>
43
44
45 #if !defined(__cplusplus)
46 # include <stdbool.h>
47 #endif
48
49 #include <libmemcached-1.0/visibility.h>
50 #include <libmemcached-1.0/configure.h>
51 #include <libmemcached-1.0/platform.h>
52
53 #include <libmemcached-1.0/limits.h>
54 #include <libmemcached-1.0/defaults.h>
55
56 #include <libmemcached-1.0/types/behavior.h>
57 #include <libmemcached-1.0/types/callback.h>
58 #include <libmemcached-1.0/types/connection.h>
59 #include <libmemcached-1.0/types/hash.h>
60 #include <libmemcached-1.0/types/return.h>
61 #include <libmemcached-1.0/types/server_distribution.h>
62
63 #include <libmemcached-1.0/return.h>
64
65 #include <libmemcached-1.0/types.h>
66 #include <libmemcached-1.0/callbacks.h>
67 #include <libmemcached-1.0/alloc.h>
68 #include <libmemcached-1.0/triggers.h>
69
70 #include <libhashkit-1.0/hashkit.h>
71
72 #include <libmemcached-1.0/struct/callback.h>
73 #include <libmemcached-1.0/struct/string.h>
74 #include <libmemcached-1.0/struct/result.h>
75 #include <libmemcached-1.0/struct/allocator.h>
76 #include <libmemcached-1.0/struct/sasl.h>
77 #include <libmemcached-1.0/struct/memcached.h>
78 #include <libmemcached-1.0/struct/server.h>
79 #include <libmemcached-1.0/struct/stat.h>
80
81 #include <libmemcached-1.0/basic_string.h>
82 #include <libmemcached-1.0/error.h>
83 #include <libmemcached-1.0/stats.h>
84
85 // Everything above this line must be in the order specified.
86 #include <libmemcached-1.0/allocators.h>
87 #include <libmemcached-1.0/analyze.h>
88 #include <libmemcached-1.0/auto.h>
89 #include <libmemcached-1.0/behavior.h>
90 #include <libmemcached-1.0/callback.h>
91 #include <libmemcached-1.0/delete.h>
92 #include <libmemcached-1.0/dump.h>
93 #include <libmemcached-1.0/exist.h>
94 #include <libmemcached-1.0/fetch.h>
95 #include <libmemcached-1.0/flush.h>
96 #include <libmemcached-1.0/flush_buffers.h>
97 #include <libmemcached-1.0/get.h>
98 #include <libmemcached-1.0/hash.h>
99 #include <libmemcached-1.0/options.h>
100 #include <libmemcached-1.0/parse.h>
101 #include <libmemcached-1.0/quit.h>
102 #include <libmemcached-1.0/result.h>
103 #include <libmemcached-1.0/server.h>
104 #include <libmemcached-1.0/server_list.h>
105 #include <libmemcached-1.0/storage.h>
106 #include <libmemcached-1.0/strerror.h>
107 #include <libmemcached-1.0/touch.h>
108 #include <libmemcached-1.0/verbosity.h>
109 #include <libmemcached-1.0/version.h>
110 #include <libmemcached-1.0/sasl.h>
111
112 #include <libmemcached-1.0/deprecated_types.h>
113
114 #ifdef __cplusplus
115 extern "C" {
116 #endif
117
118 LIBMEMCACHED_API
119 void memcached_servers_reset(memcached_st *ptr);
120
121 LIBMEMCACHED_API
122 memcached_st *memcached_create(memcached_st *ptr);
123
124 LIBMEMCACHED_API
125 memcached_st *memcached(const char *string, size_t string_length);
126
127 LIBMEMCACHED_API
128 void memcached_free(memcached_st *ptr);
129
130 LIBMEMCACHED_API
131 memcached_return_t memcached_reset(memcached_st *ptr);
132
133 LIBMEMCACHED_API
134 void memcached_reset_last_disconnected_server(memcached_st *ptr);
135
136 LIBMEMCACHED_API
137 memcached_st *memcached_clone(memcached_st *clone, const memcached_st *ptr);
138
139 LIBMEMCACHED_API
140 void *memcached_get_user_data(const memcached_st *ptr);
141
142 LIBMEMCACHED_API
143 void *memcached_set_user_data(memcached_st *ptr, void *data);
144
145 LIBMEMCACHED_API
146 memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source);
147
148 LIBMEMCACHED_API
149 memcached_server_instance_st memcached_server_instance_by_position(const memcached_st *ptr, uint32_t server_key);
150
151 LIBMEMCACHED_API
152 uint32_t memcached_server_count(const memcached_st *);
153
154 LIBMEMCACHED_API
155 uint64_t memcached_query_id(const memcached_st *);
156
157 #ifdef __cplusplus
158 } // extern "C"
159 #endif