6f87e4380ebed70e982c9f1f46060e08c400062a
[m6w6/libmemcached] / include / libmemcached-1.0 / memcached.h
1 /*
2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
14 */
15
16 #pragma once
17
18 /* This seems to be required for older compilers @note
19 * http://stackoverflow.com/questions/8132399/how-to-printf-uint64-t */
20 #ifndef __STDC_FORMAT_MACROS
21 # define __STDC_FORMAT_MACROS
22 #endif
23
24 #ifdef __cplusplus
25 # include <cinttypes>
26 # include <cstddef>
27 # include <cstdlib>
28 #else
29 # include <inttypes.h>
30 # include <stddef.h>
31 # include <stdlib.h>
32 # include <stdbool.h>
33 #endif
34
35 #include <sys/types.h>
36
37 #ifndef HAVE_PID_T
38 typedef int pid_t;
39 #endif
40 #ifndef HAVE_SSIZE_T
41 typedef long int ssize_t;
42 #endif
43
44 #include "libmemcached-1.0/visibility.h"
45 #include "libmemcached-1.0/configure.h"
46 #include "libmemcached-1.0/platform.h"
47
48 #include "libmemcached-1.0/limits.h"
49 #include "libmemcached-1.0/defaults.h"
50
51 #include "libmemcached-1.0/types/behavior.h"
52 #include "libmemcached-1.0/types/callback.h"
53 #include "libmemcached-1.0/types/connection.h"
54 #include "libmemcached-1.0/types/hash.h"
55 #include "libmemcached-1.0/types/return.h"
56 #include "libmemcached-1.0/types/server_distribution.h"
57
58 #include "libmemcached-1.0/return.h"
59
60 #include "libmemcached-1.0/types.h"
61 #include "libmemcached-1.0/callbacks.h"
62 #include "libmemcached-1.0/alloc.h"
63 #include "libmemcached-1.0/triggers.h"
64
65 #include "libhashkit-1.0/hashkit.h"
66
67 #include "libmemcached-1.0/struct/callback.h"
68 #include "libmemcached-1.0/struct/string.h"
69 #include "libmemcached-1.0/struct/result.h"
70 #include "libmemcached-1.0/struct/allocator.h"
71 #include "libmemcached-1.0/struct/sasl.h"
72 #include "libmemcached-1.0/struct/memcached.h"
73 #include "libmemcached-1.0/struct/server.h"
74 #include "libmemcached-1.0/struct/stat.h"
75
76 #include "libmemcached-1.0/basic_string.h"
77 #include "libmemcached-1.0/error.h"
78 #include "libmemcached-1.0/stats.h"
79
80 // Everything above this line must be in the order specified.
81 #include "libmemcached-1.0/allocators.h"
82 #include "libmemcached-1.0/analyze.h"
83 #include "libmemcached-1.0/auto.h"
84 #include "libmemcached-1.0/behavior.h"
85 #include "libmemcached-1.0/callback.h"
86 #include "libmemcached-1.0/delete.h"
87 #include "libmemcached-1.0/dump.h"
88 #include "libmemcached-1.0/encoding_key.h"
89 #include "libmemcached-1.0/exist.h"
90 #include "libmemcached-1.0/fetch.h"
91 #include "libmemcached-1.0/flush.h"
92 #include "libmemcached-1.0/flush_buffers.h"
93 #include "libmemcached-1.0/get.h"
94 #include "libmemcached-1.0/hash.h"
95 #include "libmemcached-1.0/options.h"
96 #include "libmemcached-1.0/parse.h"
97 #include "libmemcached-1.0/quit.h"
98 #include "libmemcached-1.0/result.h"
99 #include "libmemcached-1.0/server.h"
100 #include "libmemcached-1.0/server_list.h"
101 #include "libmemcached-1.0/storage.h"
102 #include "libmemcached-1.0/strerror.h"
103 #include "libmemcached-1.0/touch.h"
104 #include "libmemcached-1.0/verbosity.h"
105 #include "libmemcached-1.0/version.h"
106 #include "libmemcached-1.0/sasl.h"
107
108 #include "libmemcached-1.0/deprecated_types.h"
109
110 #ifdef __cplusplus
111 extern "C" {
112 #endif
113
114 LIBMEMCACHED_API
115 void memcached_servers_reset(memcached_st *ptr);
116
117 LIBMEMCACHED_API
118 memcached_st *memcached_create(memcached_st *ptr);
119
120 LIBMEMCACHED_API
121 memcached_st *memcached(const char *string, size_t string_length);
122
123 LIBMEMCACHED_API
124 void memcached_free(memcached_st *ptr);
125
126 LIBMEMCACHED_API
127 memcached_return_t memcached_reset(memcached_st *ptr);
128
129 LIBMEMCACHED_API
130 void memcached_reset_last_disconnected_server(memcached_st *ptr);
131
132 LIBMEMCACHED_API
133 memcached_st *memcached_clone(memcached_st *clone, const memcached_st *ptr);
134
135 LIBMEMCACHED_API
136 void *memcached_get_user_data(const memcached_st *ptr);
137
138 LIBMEMCACHED_API
139 void *memcached_set_user_data(memcached_st *ptr, void *data);
140
141 LIBMEMCACHED_API
142 memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source);
143
144 LIBMEMCACHED_API
145 const memcached_instance_st *memcached_server_instance_by_position(const memcached_st *ptr,
146 uint32_t server_key);
147
148 LIBMEMCACHED_API
149 uint32_t memcached_server_count(const memcached_st *);
150
151 LIBMEMCACHED_API
152 uint64_t memcached_query_id(const memcached_st *);
153
154 #ifdef __cplusplus
155 } // extern "C"
156 #endif