WIP
[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 #include "libmemcached-1.0/visibility.h"
38 #include "libmemcached-1.0/configure.h"
39 #include "libmemcached-1.0/platform.h"
40
41 #include "libmemcached-1.0/limits.h"
42 #include "libmemcached-1.0/defaults.h"
43
44 #include "libmemcached-1.0/types/behavior.h"
45 #include "libmemcached-1.0/types/callback.h"
46 #include "libmemcached-1.0/types/connection.h"
47 #include "libmemcached-1.0/types/hash.h"
48 #include "libmemcached-1.0/types/return.h"
49 #include "libmemcached-1.0/types/server_distribution.h"
50
51 #include "libmemcached-1.0/return.h"
52
53 #include "libmemcached-1.0/types.h"
54 #include "libmemcached-1.0/callbacks.h"
55 #include "libmemcached-1.0/alloc.h"
56 #include "libmemcached-1.0/triggers.h"
57
58 #include "libhashkit-1.0/hashkit.h"
59
60 #include "libmemcached-1.0/struct/callback.h"
61 #include "libmemcached-1.0/struct/string.h"
62 #include "libmemcached-1.0/struct/result.h"
63 #include "libmemcached-1.0/struct/allocator.h"
64 #include "libmemcached-1.0/struct/sasl.h"
65 #include "libmemcached-1.0/struct/memcached.h"
66 #include "libmemcached-1.0/struct/server.h"
67 #include "libmemcached-1.0/struct/stat.h"
68
69 #include "libmemcached-1.0/basic_string.h"
70 #include "libmemcached-1.0/error.h"
71 #include "libmemcached-1.0/stats.h"
72
73 // Everything above this line must be in the order specified.
74 #include "libmemcached-1.0/allocators.h"
75 #include "libmemcached-1.0/analyze.h"
76 #include "libmemcached-1.0/auto.h"
77 #include "libmemcached-1.0/behavior.h"
78 #include "libmemcached-1.0/callback.h"
79 #include "libmemcached-1.0/delete.h"
80 #include "libmemcached-1.0/dump.h"
81 #include "libmemcached-1.0/encoding_key.h"
82 #include "libmemcached-1.0/exist.h"
83 #include "libmemcached-1.0/fetch.h"
84 #include "libmemcached-1.0/flush.h"
85 #include "libmemcached-1.0/flush_buffers.h"
86 #include "libmemcached-1.0/get.h"
87 #include "libmemcached-1.0/hash.h"
88 #include "libmemcached-1.0/options.h"
89 #include "libmemcached-1.0/parse.h"
90 #include "libmemcached-1.0/quit.h"
91 #include "libmemcached-1.0/result.h"
92 #include "libmemcached-1.0/server.h"
93 #include "libmemcached-1.0/server_list.h"
94 #include "libmemcached-1.0/storage.h"
95 #include "libmemcached-1.0/strerror.h"
96 #include "libmemcached-1.0/touch.h"
97 #include "libmemcached-1.0/verbosity.h"
98 #include "libmemcached-1.0/version.h"
99 #include "libmemcached-1.0/sasl.h"
100
101 #include "libmemcached-1.0/deprecated_types.h"
102
103 #ifdef __cplusplus
104 extern "C" {
105 #endif
106
107 LIBMEMCACHED_API
108 void memcached_servers_reset(memcached_st *ptr);
109
110 LIBMEMCACHED_API
111 memcached_st *memcached_create(memcached_st *ptr);
112
113 LIBMEMCACHED_API
114 memcached_st *memcached(const char *string, size_t string_length);
115
116 LIBMEMCACHED_API
117 void memcached_free(memcached_st *ptr);
118
119 LIBMEMCACHED_API
120 memcached_return_t memcached_reset(memcached_st *ptr);
121
122 LIBMEMCACHED_API
123 void memcached_reset_last_disconnected_server(memcached_st *ptr);
124
125 LIBMEMCACHED_API
126 memcached_st *memcached_clone(memcached_st *clone, const memcached_st *ptr);
127
128 LIBMEMCACHED_API
129 void *memcached_get_user_data(const memcached_st *ptr);
130
131 LIBMEMCACHED_API
132 void *memcached_set_user_data(memcached_st *ptr, void *data);
133
134 LIBMEMCACHED_API
135 memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source);
136
137 LIBMEMCACHED_API
138 const memcached_instance_st *memcached_server_instance_by_position(const memcached_st *ptr,
139 uint32_t server_key);
140
141 LIBMEMCACHED_API
142 uint32_t memcached_server_count(const memcached_st *);
143
144 LIBMEMCACHED_API
145 uint64_t memcached_query_id(const memcached_st *);
146
147 #ifdef __cplusplus
148 } // extern "C"
149 #endif