From: Brian Aker Date: Thu, 17 Dec 2009 23:46:32 +0000 (-0800) Subject: Added .h for dump. X-Git-Tag: 0.37~59 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=824533fd2626b1060855e543aaad381675ae2695;p=awesomized%2Flibmemcached Added .h for dump. --- diff --git a/libmemcached/Makefile.am b/libmemcached/Makefile.am index e85fecb7..0a21a5df 100644 --- a/libmemcached/Makefile.am +++ b/libmemcached/Makefile.am @@ -23,6 +23,7 @@ pkginclude_HEADERS= \ behavior.h \ callback.h \ constants.h \ + dump.h \ exception.hpp \ get.h \ memcached.h \ diff --git a/libmemcached/dump.c b/libmemcached/dump.c index a79f95c5..3db6784d 100644 --- a/libmemcached/dump.c +++ b/libmemcached/dump.c @@ -88,4 +88,3 @@ memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *callback return ascii_dump(ptr, callback, context, number_of_callbacks); } - diff --git a/libmemcached/dump.h b/libmemcached/dump.h new file mode 100644 index 00000000..3b3d11df --- /dev/null +++ b/libmemcached/dump.h @@ -0,0 +1,27 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Simple method for dumping data from Memcached. + * + */ + +#ifndef __MEMCACHED_DUMP_H__ +#define __MEMCACHED_DUMP_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks); + + +#ifdef __cplusplus +} +#endif + +#endif /* __MEMCACHED_DUMP_H__ */ diff --git a/libmemcached/memcached.h b/libmemcached/memcached.h index 4ef76fd5..ddde6952 100644 --- a/libmemcached/memcached.h +++ b/libmemcached/memcached.h @@ -31,6 +31,7 @@ // Everything above this line must be in the order specified. #include #include +#include #include #include #include @@ -126,6 +127,7 @@ struct memcached_st { void *user_data; time_t next_distribution_rebuild; size_t prefix_key_length; + uint32_t number_of_replicas; memcached_hash_t distribution_hash; memcached_result_st result; memcached_continuum_item_st *continuum; @@ -137,9 +139,8 @@ struct memcached_st { memcached_calloc_fn call_calloc; memcached_trigger_key_fn get_key_failure; memcached_trigger_delete_key_fn delete_trigger; - char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; - uint32_t number_of_replicas; memcached_callback_st *callbacks; + char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; }; LIBMEMCACHED_API @@ -321,10 +322,6 @@ memcached_return_t memcached_fetch_execute(memcached_st *ptr, void *context, unsigned int number_of_callbacks); -LIBMEMCACHED_API -memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks); - - LIBMEMCACHED_API memcached_return_t memcached_set_memory_allocators(memcached_st *ptr, memcached_malloc_fn mem_malloc,