memcached.h | memcached.h | |||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
/* Public defines */ | /* Public defines */ | |||
#define MEMCACHED_DEFAULT_PORT 11211 | #define MEMCACHED_DEFAULT_PORT 11211 | |||
#define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ | #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ | |||
#define MEMCACHED_MAX_BUFFER 8196 | #define MEMCACHED_MAX_BUFFER 8196 | |||
#define MEMCACHED_MAX_HOST_LENGTH 64 | #define MEMCACHED_MAX_HOST_LENGTH 64 | |||
#define MEMCACHED_WHEEL_SIZE 1024 | #define MEMCACHED_WHEEL_SIZE 1024 | |||
#define MEMCACHED_STRIDE 4 | #define MEMCACHED_STRIDE 4 | |||
#define MEMCACHED_DEFAULT_TIMEOUT INT32_MAX | #define MEMCACHED_DEFAULT_TIMEOUT INT32_MAX | |||
/* string value */ | /* string value */ | |||
#define LIBMEMCACHED_VERSION_STRING "0.16" | #define LIBMEMCACHED_VERSION_STRING "0.17" | |||
typedef enum { | typedef enum { | |||
MEMCACHED_SUCCESS, | MEMCACHED_SUCCESS, | |||
MEMCACHED_FAILURE, | MEMCACHED_FAILURE, | |||
MEMCACHED_HOST_LOOKUP_FAILURE, | MEMCACHED_HOST_LOOKUP_FAILURE, | |||
MEMCACHED_CONNECTION_FAILURE, | MEMCACHED_CONNECTION_FAILURE, | |||
MEMCACHED_CONNECTION_BIND_FAILURE, | MEMCACHED_CONNECTION_BIND_FAILURE, | |||
MEMCACHED_WRITE_FAILURE, | MEMCACHED_WRITE_FAILURE, | |||
MEMCACHED_READ_FAILURE, | MEMCACHED_READ_FAILURE, | |||
MEMCACHED_UNKNOWN_READ_FAILURE, | MEMCACHED_UNKNOWN_READ_FAILURE, | |||
skipping to change at line 84 | skipping to change at line 84 | |||
typedef struct memcached_st memcached_st; | typedef struct memcached_st memcached_st; | |||
typedef struct memcached_stat_st memcached_stat_st; | typedef struct memcached_stat_st memcached_stat_st; | |||
typedef struct memcached_result_st memcached_result_st; | typedef struct memcached_result_st memcached_result_st; | |||
typedef struct memcached_string_st memcached_string_st; | typedef struct memcached_string_st memcached_string_st; | |||
typedef struct memcached_server_st memcached_server_st; | typedef struct memcached_server_st memcached_server_st; | |||
typedef memcached_return (*memcached_clone_func)(memcached_st *parent, memc ached_st *clone); | typedef memcached_return (*memcached_clone_func)(memcached_st *parent, memc ached_st *clone); | |||
typedef memcached_return (*memcached_cleanup_func)(memcached_st *ptr); | typedef memcached_return (*memcached_cleanup_func)(memcached_st *ptr); | |||
typedef void (*memcached_free_function)(memcached_st *ptr, void *mem); | typedef void (*memcached_free_function)(memcached_st *ptr, void *mem); | |||
typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t size); | typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t size); | |||
typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, c onst size_t size); | typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, c onst size_t size); | |||
typedef memcached_return (*memcached_execute_function)(memcached_st *ptr, m | ||||
emcached_result_st *result, void *context); | ||||
typedef memcached_return (*memcached_server_function)(memcached_st *ptr, me | ||||
mcached_server_st *server, void *context); | ||||
typedef enum { | typedef enum { | |||
MEMCACHED_DISTRIBUTION_MODULA, | MEMCACHED_DISTRIBUTION_MODULA, | |||
MEMCACHED_DISTRIBUTION_CONSISTENT, | MEMCACHED_DISTRIBUTION_CONSISTENT, | |||
} memcached_server_distribution; | } memcached_server_distribution; | |||
typedef enum { | typedef enum { | |||
MEMCACHED_BEHAVIOR_NO_BLOCK, | MEMCACHED_BEHAVIOR_NO_BLOCK, | |||
MEMCACHED_BEHAVIOR_TCP_NODELAY, | MEMCACHED_BEHAVIOR_TCP_NODELAY, | |||
MEMCACHED_BEHAVIOR_HASH, | MEMCACHED_BEHAVIOR_HASH, | |||
MEMCACHED_BEHAVIOR_KETAMA, | MEMCACHED_BEHAVIOR_KETAMA, | |||
MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, | MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, | |||
MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, | MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, | |||
MEMCACHED_BEHAVIOR_CACHE_LOOKUPS, | MEMCACHED_BEHAVIOR_CACHE_LOOKUPS, | |||
MEMCACHED_BEHAVIOR_SUPPORT_CAS, | MEMCACHED_BEHAVIOR_SUPPORT_CAS, | |||
MEMCACHED_BEHAVIOR_POLL_TIMEOUT, | MEMCACHED_BEHAVIOR_POLL_TIMEOUT, | |||
MEMCACHED_BEHAVIOR_DISTRIBUTION, | MEMCACHED_BEHAVIOR_DISTRIBUTION, | |||
MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, | MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, | |||
MEMCACHED_BEHAVIOR_USER_DATA, | ||||
MEMCACHED_BEHAVIOR_SORT_HOSTS, | MEMCACHED_BEHAVIOR_SORT_HOSTS, | |||
MEMCACHED_BEHAVIOR_VERIFY_KEY, | MEMCACHED_BEHAVIOR_VERIFY_KEY, | |||
MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, | ||||
} memcached_behavior; | } memcached_behavior; | |||
typedef enum { | typedef enum { | |||
MEMCACHED_CALLBACK_USER_DATA, | MEMCACHED_CALLBACK_USER_DATA, | |||
MEMCACHED_CALLBACK_CLEANUP_FUNCTION, | MEMCACHED_CALLBACK_CLEANUP_FUNCTION, | |||
MEMCACHED_CALLBACK_CLONE_FUNCTION, | MEMCACHED_CALLBACK_CLONE_FUNCTION, | |||
MEMCACHED_CALLBACK_MALLOC_FUNCTION, | MEMCACHED_CALLBACK_MALLOC_FUNCTION, | |||
MEMCACHED_CALLBACK_REALLOC_FUNCTION, | MEMCACHED_CALLBACK_REALLOC_FUNCTION, | |||
MEMCACHED_CALLBACK_FREE_FUNCTION, | MEMCACHED_CALLBACK_FREE_FUNCTION, | |||
} memcached_callback; | } memcached_callback; | |||
skipping to change at line 220 | skipping to change at line 222 | |||
struct memcached_st { | struct memcached_st { | |||
memcached_allocated is_allocated; | memcached_allocated is_allocated; | |||
memcached_server_st *hosts; | memcached_server_st *hosts; | |||
unsigned int number_of_hosts; | unsigned int number_of_hosts; | |||
unsigned int cursor_server; | unsigned int cursor_server; | |||
int cached_errno; | int cached_errno; | |||
uint32_t flags; | uint32_t flags; | |||
int send_size; | int send_size; | |||
int recv_size; | int recv_size; | |||
int32_t poll_timeout; | int32_t poll_timeout; | |||
int32_t connect_timeout; | ||||
memcached_result_st result; | memcached_result_st result; | |||
memcached_hash hash; | memcached_hash hash; | |||
memcached_server_distribution distribution; | memcached_server_distribution distribution; | |||
void *user_data; | void *user_data; | |||
unsigned int wheel[MEMCACHED_WHEEL_SIZE]; | unsigned int wheel[MEMCACHED_WHEEL_SIZE]; | |||
memcached_clone_func on_clone; | memcached_clone_func on_clone; | |||
memcached_cleanup_func on_cleanup; | memcached_cleanup_func on_cleanup; | |||
memcached_free_function call_free; | memcached_free_function call_free; | |||
memcached_malloc_function call_malloc; | memcached_malloc_function call_malloc; | |||
memcached_realloc_function call_realloc; | memcached_realloc_function call_realloc; | |||
skipping to change at line 261 | skipping to change at line 264 | |||
uint32_t offset, | uint32_t offset, | |||
uint64_t *value); | uint64_t *value); | |||
void memcached_stat_free(memcached_st *, memcached_stat_st *); | void memcached_stat_free(memcached_st *, memcached_stat_st *); | |||
memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_ return *error); | memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_ return *error); | |||
memcached_return memcached_stat_servername(memcached_stat_st *stat, char *a rgs, | memcached_return memcached_stat_servername(memcached_stat_st *stat, char *a rgs, | |||
char *hostname, unsigned int por t); | char *hostname, unsigned int por t); | |||
memcached_return memcached_flush(memcached_st *ptr, time_t expiration); | memcached_return memcached_flush(memcached_st *ptr, time_t expiration); | |||
memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos ity); | memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos ity); | |||
void memcached_quit(memcached_st *ptr); | void memcached_quit(memcached_st *ptr); | |||
char *memcached_strerror(memcached_st *ptr, memcached_return rc); | char *memcached_strerror(memcached_st *ptr, memcached_return rc); | |||
memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi | memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi | |||
or flag, void *data); | or flag, uint64_t data); | |||
unsigned long long memcached_behavior_get(memcached_st *ptr, memcached_beha | uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag) | |||
vior flag); | ; | |||
/* All of the functions for adding data to the server */ | /* All of the functions for adding data to the server */ | |||
memcached_return memcached_set(memcached_st *ptr, char *key, size_t key_len gth, | memcached_return memcached_set(memcached_st *ptr, char *key, size_t key_len gth, | |||
char *value, size_t value_length, | char *value, size_t value_length, | |||
time_t expiration, | time_t expiration, | |||
uint32_t flags); | uint32_t flags); | |||
memcached_return memcached_add(memcached_st *ptr, char *key, size_t key_len gth, | memcached_return memcached_add(memcached_st *ptr, char *key, size_t key_len gth, | |||
char *value, size_t value_length, | char *value, size_t value_length, | |||
time_t expiration, | time_t expiration, | |||
uint32_t flags); | uint32_t flags); | |||
skipping to change at line 409 | skipping to change at line 412 | |||
unsigned int number_of_callbac ks | unsigned int number_of_callbac ks | |||
); | ); | |||
memcached_return memcached_callback_set(memcached_st *ptr, | memcached_return memcached_callback_set(memcached_st *ptr, | |||
memcached_callback flag, | memcached_callback flag, | |||
void *data); | void *data); | |||
void *memcached_callback_get(memcached_st *ptr, | void *memcached_callback_get(memcached_st *ptr, | |||
memcached_callback flag, | memcached_callback flag, | |||
memcached_return *error); | memcached_return *error); | |||
memcached_return memcached_server_cursor(memcached_st *ptr, | ||||
memcached_server_function *callbac | ||||
k, | ||||
void *context, | ||||
unsigned int number_of_callbacks); | ||||
/* Result Struct */ | /* Result Struct */ | |||
void memcached_result_free(memcached_result_st *result); | void memcached_result_free(memcached_result_st *result); | |||
memcached_result_st *memcached_result_create(memcached_st *ptr, | memcached_result_st *memcached_result_create(memcached_st *ptr, | |||
memcached_result_st *result); | memcached_result_st *result); | |||
#define memcached_result_key_value(A) (A)->key | #define memcached_result_key_value(A) (A)->key | |||
#define memcached_result_key_length(A) (A)->key_length | #define memcached_result_key_length(A) (A)->key_length | |||
#ifdef FIX | #ifdef FIX | |||
#define memcached_result_value(A) memcached_string_value((A)->value) | #define memcached_result_value(A) memcached_string_value((A)->value) | |||
#define memcached_result_length(A) memcached_string_length((A)->value) | #define memcached_result_length(A) memcached_string_length((A)->value) | |||
#else | #else | |||
End of changes. 7 change blocks. | ||||
6 lines changed or deleted | 17 lines changed or added | |||