Cleanup's for Tim. Also dropping support back to ipv4 only while I find out
[awesomized/libmemcached] / include / memcached.h
index 8e90d6edb1d813746a31eb0c38ec72c4395fbc88..605c4a4cbcb6a8655de0747fe377b2c001e44074 100644 (file)
@@ -25,13 +25,13 @@ typedef struct memcached_result_st memcached_result_st;
 typedef struct memcached_string_st memcached_string_st;
 typedef struct memcached_server_st memcached_server_st;
 
-#define MEMCACHED_VERSION_STRING 12
+/* These are Private and should not be used by applications */
+#define MEMCACHED_VERSION_STRING_LENGTH 12
+
+/* Public defines */
 #define MEMCACHED_DEFAULT_PORT 11211
-#define MEMCACHED_DEFAULT_COMMAND_SIZE 350
-#define SMALL_STRING_LEN 1024
-#define HUGE_STRING_LEN 8196
 #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */
-#define MEMCACHED_MAX_BUFFER HUGE_STRING_LEN
+#define MEMCACHED_MAX_BUFFER 8196
 #define MEMCACHED_MAX_HOST_LENGTH 64
 #define MEMCACHED_WHEEL_SIZE 1024
 #define MEMCACHED_STRIDE 4
@@ -69,6 +69,7 @@ typedef enum {
   MEMCACHED_NO_KEY_PROVIDED,
   MEMCACHED_FETCH_NOTFINISHED,
   MEMCACHED_TIMEOUT,
+  MEMCACHED_BUFFERED,
   MEMCACHED_MAXIMUM_RETURN, /* Always add new error code before */
 } memcached_return;
 
@@ -88,6 +89,8 @@ typedef enum {
   MEMCACHED_BEHAVIOR_SUPPORT_CAS,
   MEMCACHED_BEHAVIOR_POLL_TIMEOUT,
   MEMCACHED_BEHAVIOR_DISTRIBUTION,
+  MEMCACHED_BEHAVIOR_BUFFER_REQUESTS,
+  MEMCACHED_BEHAVIOR_USER_DATA,
 } memcached_behavior;
 
 typedef enum {
@@ -160,7 +163,7 @@ struct memcached_stat_st {
   uint64_t evictions;
   uint64_t bytes_read;
   uint64_t bytes_written;
-  char version[MEMCACHED_VERSION_STRING];
+  char version[MEMCACHED_VERSION_STRING_LENGTH];
 };
 
 struct memcached_string_st {
@@ -197,6 +200,7 @@ struct memcached_st {
   memcached_result_st result;
   memcached_hash hash;
   memcached_server_distribution distribution;
+  void *user_data;
   unsigned int wheel[MEMCACHED_WHEEL_SIZE];
 #ifdef NOT_USED /* Future Use */
   uint8_t replicas;
@@ -362,6 +366,23 @@ memcached_return memcached_delete_by_key(memcached_st *ptr,
                                          char *key, size_t key_length,
                                          time_t expiration);
 
+memcached_return memcached_mdelete(memcached_st *ptr, 
+                                   char **key, size_t *key_length,
+                                   unsigned int number_of_keys,
+                                   time_t expiration);
+
+memcached_return memcached_mdelete_by_key(memcached_st *ptr, 
+                                          char *master_key, size_t master_key_length,
+                                          char **key, size_t *key_length,
+                                          unsigned int number_of_keys,
+                                          time_t expiration);
+
+memcached_return memcached_fetch_execute(memcached_st *ptr, 
+                                             unsigned int (*callback[])(memcached_st *ptr, memcached_result_st *result, void *context),
+                                             void *context,
+                                             unsigned int number_of_callbacks
+                                             );
+
 /* Result Struct */
 void memcached_result_free(memcached_result_st *result);
 memcached_result_st *memcached_result_create(memcached_st *ptr,