Added prepend, append, add, replace to memcached.hh (C++ API)
author <patg@patg.net> <>
Mon, 21 Jan 2008 23:26:49 +0000 (18:26 -0500)
committer <patg@patg.net> <>
Mon, 21 Jan 2008 23:26:49 +0000 (18:26 -0500)
include/memcached.hh

index a27971c1fdb1a6d674bcdca32db1a26872c03819..9a38187f1254722afb36647cbd424cdd0281bd97 100644 (file)
@@ -35,10 +35,41 @@ public:
 
   memcached_return set(char *key, char *value, size_t value_length)
   {
-    return memcached_set(&memc, key, strlen(key), 
-                         value, value_length, 
+    return memcached_set(&memc, 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),
+                 value, value_length,
+                 (time_t)0, (uint32_t)0);
+  }
+
+  memcached_return replace(char *key, char *value, size_t value_length)
+  {
+    return memcached_replace(&memc, key, strlen(key),
+                     value, value_length,
+                     (time_t)0, (uint32_t)0);
+  }
+
+  memcached_return prepend(char *key, char *value, size_t value_length)
+  {
+    return memcached_prepend(&memc, key, strlen(key),
+                    value, value_length,
+                    (time_t)0,
+                    (uint32_t)0);
+  }
+
+
+  memcached_return  append(char *key, char *value, size_t value_length)
+  {
+    return memcached_append(&memc, key, strlen(key),
+                    value, value_length,
+                    (time_t)0,
+                    (uint32_t)0);
+  }
  ~Memcached()
  {
    memcached_free(&memc);