From: Date: Wed, 30 Jan 2008 12:25:33 +0000 (-0500) Subject: - Added more methods to memcached.hh X-Git-Tag: 0.20~29^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=95513a66427c064a71845ae0643dfb28e6732bac;p=awesomized%2Flibmemcached - Added more methods to memcached.hh - Changed version string to .15 --- diff --git a/include/memcached.h b/include/memcached.h index eddc5f3c..7d86925f 100644 --- a/include/memcached.h +++ b/include/memcached.h @@ -32,7 +32,7 @@ extern "C" { #define MEMCACHED_DEFAULT_TIMEOUT INT32_MAX /* string value */ -#define LIBMEMCACHED_VERSION_STRING "0.14" +#define LIBMEMCACHED_VERSION_STRING "0.15" typedef enum { MEMCACHED_SUCCESS, diff --git a/include/memcached.hh b/include/memcached.hh index 9a38187f..82fbd3ce 100644 --- a/include/memcached.hh +++ b/include/memcached.hh @@ -33,6 +33,21 @@ public: value_length, &flags, &rc); } + char *get_by_key(char *key, char *master_key, size_t *value_length) + { + uint32_t flags; + memcached_return rc; + + return memcached_get_by_key(&memc, key, strlen(key), master_key, strlen(master_key), + value_length, &flags, &rc); + } + + memcached_return mget(char **keys, size_t *key_length, unsigned int number_of_keys) + { + + return memcached_mget(&memc, keys, key_length, number_of_keys); + } + memcached_return set(char *key, char *value, size_t value_length) { return memcached_set(&memc, key, strlen(key), @@ -40,6 +55,16 @@ public: (time_t)0, (uint32_t)0); } + memcached_return set_by_key(char *master_key, char *key, char *value, size_t value_length) + { + return memcached_set_by_key(&memc, master_key, strlen(master_key), + key, strlen(key), + value, value_length, + (time_t)0, + (uint32_t)0 ); + } + + memcached_return add(char *key, char *value, size_t value_length) { return memcached_add(&memc, key, strlen(key),