X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcommon.h;h=a3e4ea90310b73ae02808babd0142d6886949912;hb=f154f10002fe127f9defcf5f70f9654c2816b965;hp=477351954e9cae5de2619ac92bd17b7d3f7ee5e2;hpb=274778ed13cb7c38995dc1491d437b27db6339fb;p=awesomized%2Flibmemcached diff --git a/libmemcached/common.h b/libmemcached/common.h index 47735195..a3e4ea90 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -49,17 +49,19 @@ #include #include #include -#include +#include +#include +#include #else #include #include #include #include +#include +#include #endif -#include #include -#include #include #include @@ -71,6 +73,7 @@ #include #include +#include #include #ifdef HAVE_POLL_H @@ -79,41 +82,54 @@ #include "poll/poll.h" #endif - #ifdef __cplusplus extern "C" { #endif typedef memcached_return_t (*memcached_server_execute_fn)(memcached_st *ptr, memcached_server_write_instance_st server, void *context); -LIBMEMCACHED_LOCAL -memcached_server_write_instance_st memcached_server_instance_fetch(memcached_st *ptr, uint32_t server_key); - -LIBMEMCACHED_LOCAL -memcached_return_t memcached_server_execute(memcached_st *ptr, - memcached_server_execute_fn callback, - void *context); #ifdef __cplusplus } // extern "C" #endif +#ifdef __cplusplus +org::libmemcached::Instance* memcached_instance_fetch(memcached_st *ptr, uint32_t server_key); +#endif + +memcached_return_t memcached_server_execute(memcached_st *ptr, + memcached_server_execute_fn callback, + void *context); /* These are private not to be installed headers */ #include #include #include #ifdef __cplusplus #include +#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include #include -#include #include #include +#ifdef __cplusplus #include +#endif #include #include @@ -122,6 +138,9 @@ memcached_return_t memcached_server_execute(memcached_st *ptr, #include #include #include +#include +#include +#include #endif #include @@ -146,19 +165,21 @@ memcached_return_t memcached_server_execute(memcached_st *ptr, extern "C" { #endif -LIBMEMCACHED_LOCAL -memcached_return_t memcached_connect(memcached_server_write_instance_st ptr); - -LIBMEMCACHED_LOCAL memcached_return_t run_distribution(memcached_st *ptr); -#define memcached_server_response_increment(A) (A)->cursor_active++ -#define memcached_server_response_decrement(A) (A)->cursor_active-- -#define memcached_server_response_reset(A) (A)->cursor_active=0 +#define memcached_server_response_increment(A) (A)->cursor_active_++ +#define memcached_server_response_decrement(A) (A)->cursor_active_-- +#define memcached_server_response_reset(A) (A)->cursor_active_=0 -LIBMEMCACHED_LOCAL -memcached_return_t memcached_purge(memcached_server_write_instance_st ptr); +#define memcached_instance_response_increment(A) (A)->cursor_active_++ +#define memcached_instance_response_decrement(A) (A)->cursor_active_-- +#define memcached_instance_response_reset(A) (A)->cursor_active_=0 #ifdef __cplusplus } #endif + +#ifdef __cplusplus +bool memcached_purge(org::libmemcached::Instance*); +org::libmemcached::Instance* memcached_instance_by_position(const memcached_st *ptr, uint32_t server_key); +#endif