Update
[m6w6/libmemcached] / libmemcached-1.2 / 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 * 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 #include <libmemcached-1.0/constants.h>
53 #include <libmemcached-1.0/return.h>
54 #include <libmemcached-1.0/types.h>
55 #include <libmemcached-1.0/basic_string.h>
56 #include <libmemcached-1.0/string.h>
57 #include <libmemcached-1.0/error.h>
58 #include <libmemcached-1.0/stats.h>
59 #include <libhashkit-1.0/hashkit.h>
60
61 // Everything above this line must be in the order specified.
62 #include <libmemcached-1.2/allocators.h>
63 #include <libmemcached-1.2/analyze.h>
64 #include <libmemcached-1.2/auto.h>
65 #include <libmemcached-1.2/behavior.h>
66 #include <libmemcached-1.2/callback.h>
67 #include <libmemcached-1.2/delete.h>
68 #include <libmemcached-1.2/dump.h>
69 #include <libmemcached-1.2/exist.h>
70 #include <libmemcached-1.2/fetch.h>
71 #include <libmemcached-1.2/flush.h>
72 #include <libmemcached-1.2/flush_buffers.h>
73 #include <libmemcached-1.2/get.h>
74 #include <libmemcached-1.2/hash.h>
75 #include <libmemcached-1.2/options.h>
76 #include <libmemcached-1.2/parse.h>
77 #include <libmemcached-1.2/quit.h>
78 #include <libmemcached-1.2/result.h>
79 #include <libmemcached-1.2/server.h>
80 #include <libmemcached-1.2/server_list.h>
81 #include <libmemcached-1.2/storage.h>
82 #include <libmemcached-1.2/strerror.h>
83 #include <libmemcached-1.2/touch.h>
84 #include <libmemcached-1.2/verbosity.h>
85 #include <libmemcached-1.2/version.h>
86 #include <libmemcached-1.2/sasl.h>
87
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91
92 LIBMEMCACHED_API
93 void memcached_servers_reset(memcached_st *ptr);
94
95 LIBMEMCACHED_API
96 memcached_st *memcached_create(memcached_st *ptr);
97
98 LIBMEMCACHED_API
99 memcached_st *memcached(const char *string, size_t string_length);
100
101 LIBMEMCACHED_API
102 void memcached_free(memcached_st *ptr);
103
104 LIBMEMCACHED_API
105 memcached_return_t memcached_reset(memcached_st *ptr);
106
107 LIBMEMCACHED_API
108 void memcached_reset_last_disconnected_server(memcached_st *ptr);
109
110 LIBMEMCACHED_API
111 memcached_st *memcached_clone(memcached_st *clone, const memcached_st *ptr);
112
113 LIBMEMCACHED_API
114 void *memcached_get_user_data(const memcached_st *ptr);
115
116 LIBMEMCACHED_API
117 void *memcached_set_user_data(memcached_st *ptr, void *data);
118
119 LIBMEMCACHED_API
120 memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source);
121
122 LIBMEMCACHED_API
123 memcached_server_instance_st memcached_server_instance_by_position(const memcached_st *ptr, uint32_t server_key);
124
125 LIBMEMCACHED_API
126 uint32_t memcached_server_count(const memcached_st *);
127
128 LIBMEMCACHED_API
129 uint64_t memcached_query_id(const memcached_st *);
130
131 #ifdef __cplusplus
132 } // extern "C"
133 #endif