X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_types.h;h=9d2537d4064f8a5804c0584a7c4e087238f35617;hb=f6c04131cc9952372e3f63de2db4edc9f8181fb2;hp=d8c68f181548f11ecc5a283359ab3ded6c5a9c28;hpb=76869574486dceca688e05b7028d8b88485a36a0;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached_types.h b/libmemcached/memcached_types.h index d8c68f18..9d2537d4 100644 --- a/libmemcached/memcached_types.h +++ b/libmemcached/memcached_types.h @@ -9,10 +9,6 @@ #ifndef LIBMEMCACHED_MEMCACHED_TYPES_H #define LIBMEMCACHED_MEMCACHED_TYPES_H -#ifndef LIBMEMCACHED_MEMCACHED_H -#error "Please include instead" -#endif - #ifdef __cplusplus extern "C" { #endif @@ -41,67 +37,11 @@ typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, typedef memcached_return (*memcached_dump_func)(memcached_st *ptr, const char *key, size_t key_length, void *context); -struct memcached_string_st { - memcached_st *root; - char *end; - char *string; - size_t current_size; - size_t block_size; - bool is_allocated; -}; - -struct memcached_result_st { - uint32_t flags; - bool is_allocated; - time_t expiration; - memcached_st *root; - size_t key_length; - uint64_t cas; - memcached_string_st value; - char key[MEMCACHED_MAX_KEY]; - /* Add result callback function */ -}; - -struct memcached_st { - uint8_t purging; - bool is_allocated; - uint8_t distribution; - uint8_t hash; - uint32_t continuum_points_counter; - memcached_server_st *hosts; - int32_t snd_timeout; - int32_t rcv_timeout; - uint32_t server_failure_limit; - uint32_t io_msg_watermark; - uint32_t io_bytes_watermark; - uint32_t io_key_prefetch; - uint32_t number_of_hosts; - uint32_t cursor_server; - int cached_errno; - uint32_t flags; - int32_t poll_timeout; - int32_t connect_timeout; - int32_t retry_timeout; - uint32_t continuum_count; - int send_size; - int recv_size; - void *user_data; - time_t next_distribution_rebuild; - size_t prefix_key_length; - memcached_hash hash_continuum; - memcached_result_st result; - memcached_continuum_item_st *continuum; - memcached_clone_func on_clone; - memcached_cleanup_func on_cleanup; - memcached_free_function call_free; - memcached_malloc_function call_malloc; - memcached_realloc_function call_realloc; - memcached_calloc_function call_calloc; - memcached_trigger_key get_key_failure; - memcached_trigger_delete_key delete_trigger; - char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; - uint32_t number_of_replicas; -}; +typedef struct { + memcached_execute_function *callback; + void *context; + unsigned int number_of_callback; +} memcached_callback_st; #ifdef __cplusplus }