1 /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
5 * Copyright (C) 2011 Data Differential, http://datadifferential.com/
6 * Copyright (C) 2006-2009 Brian Aker All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
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
20 * * The names of its contributors may not be used to endorse or
21 * promote products derived from this software without specific prior
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.
41 typedef struct memcached_st memcached_st
;
42 typedef struct memcached_stat_st memcached_stat_st
;
43 typedef struct memcached_analysis_st memcached_analysis_st
;
44 typedef struct memcached_result_st memcached_result_st
;
45 typedef struct memcached_array_st memcached_array_st
;
46 typedef struct memcached_error_t memcached_error_t
;
48 // All of the flavors of memcache_server_st
49 typedef struct memcached_server_st memcached_server_st
;
50 typedef const struct memcached_server_st
*memcached_server_instance_st
;
51 typedef struct memcached_server_st
*memcached_server_list_st
;
53 typedef struct memcached_callback_st memcached_callback_st
;
55 // The following two structures are internal, and never exposed to users.
56 typedef struct memcached_string_st memcached_string_st
;
57 typedef struct memcached_string_t memcached_string_t
;
58 typedef struct memcached_continuum_item_st memcached_continuum_item_st
;
65 typedef memcached_return_t (*memcached_clone_fn
)(memcached_st
*destination
, const memcached_st
*source
);
66 typedef memcached_return_t (*memcached_cleanup_fn
)(const memcached_st
*ptr
);
69 Memory allocation functions.
71 typedef void (*memcached_free_fn
)(const memcached_st
*ptr
, void *mem
, void *context
);
72 typedef void *(*memcached_malloc_fn
)(const memcached_st
*ptr
, const size_t size
, void *context
);
73 typedef void *(*memcached_realloc_fn
)(const memcached_st
*ptr
, void *mem
, const size_t size
, void *context
);
74 typedef void *(*memcached_calloc_fn
)(const memcached_st
*ptr
, size_t nelem
, const size_t elsize
, void *context
);
77 typedef memcached_return_t (*memcached_execute_fn
)(const memcached_st
*ptr
, memcached_result_st
*result
, void *context
);
78 typedef memcached_return_t (*memcached_server_fn
)(const memcached_st
*ptr
, memcached_server_instance_st server
, void *context
);
79 typedef memcached_return_t (*memcached_stat_fn
)(memcached_server_instance_st server
,
80 const char *key
, size_t key_length
,
81 const char *value
, size_t value_length
,
87 typedef memcached_return_t (*memcached_trigger_key_fn
)(const memcached_st
*ptr
,
88 const char *key
, size_t key_length
,
89 memcached_result_st
*result
);
90 typedef memcached_return_t (*memcached_trigger_delete_key_fn
)(const memcached_st
*ptr
,
91 const char *key
, size_t key_length
);
93 typedef memcached_return_t (*memcached_dump_fn
)(const memcached_st
*ptr
,
103 @note The following definitions are just here for backwards compatibility.
105 typedef memcached_return_t memcached_return
;
106 typedef memcached_server_distribution_t memcached_server_distribution
;
107 typedef memcached_behavior_t memcached_behavior
;
108 typedef memcached_callback_t memcached_callback
;
109 typedef memcached_hash_t memcached_hash
;
110 typedef memcached_connection_t memcached_connection
;
111 typedef memcached_clone_fn memcached_clone_func
;
112 typedef memcached_cleanup_fn memcached_cleanup_func
;
113 typedef memcached_execute_fn memcached_execute_function
;
114 typedef memcached_server_fn memcached_server_function
;
115 typedef memcached_trigger_key_fn memcached_trigger_key
;
116 typedef memcached_trigger_delete_key_fn memcached_trigger_delete_key
;
117 typedef memcached_dump_fn memcached_dump_func
;