Add docs for tap, and update all other documentation.
[awesomized/libmemcached] / libmemcached / constants.h
index d6798d0d4562f96de0c0ec672a5949c1cc75e008..b4a87257957ba366e8ae188e2189e1118ec0d9f7 100644 (file)
@@ -9,6 +9,7 @@
  *
  */
 
+#pragma once
 #ifndef __LIBMEMCACHED_CONSTANTS_H__
 #define __LIBMEMCACHED_CONSTANTS_H__
 
@@ -21,7 +22,7 @@
 #define MEMCACHED_POINTS_PER_SERVER_KETAMA 160
 #define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This would then set max hosts to 100 */
 #define MEMCACHED_STRIDE 4
-#define MEMCACHED_DEFAULT_TIMEOUT 1000
+#define MEMCACHED_DEFAULT_TIMEOUT 5000
 #define MEMCACHED_DEFAULT_CONNECT_TIMEOUT 4000
 #define MEMCACHED_CONTINUUM_ADDITION 10 /* How many extra slots we should build for in the continuum */
 #define MEMCACHED_PREFIX_KEY_MAX_SIZE 128
@@ -29,7 +30,7 @@
 #define MEMCACHED_VERSION_STRING_LENGTH 24
 
 
-typedef enum {
+enum memcached_return_t {
   MEMCACHED_SUCCESS,
   MEMCACHED_FAILURE,
   MEMCACHED_HOST_LOOKUP_FAILURE,
@@ -73,18 +74,31 @@ typedef enum {
   MEMCACHED_AUTH_PROBLEM,
   MEMCACHED_AUTH_FAILURE,
   MEMCACHED_AUTH_CONTINUE,
+  MEMCACHED_PARSE_ERROR,
+  MEMCACHED_PARSE_USER_ERROR,
+  MEMCACHED_DEPRECATED,
   MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
-} memcached_return_t;
+};
 
+#ifndef __cplusplus
+typedef enum memcached_return_t memcached_return_t;
+#endif
 
-typedef enum {
+
+enum memcached_server_distribution_t {
   MEMCACHED_DISTRIBUTION_MODULA,
   MEMCACHED_DISTRIBUTION_CONSISTENT,
   MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA,
   MEMCACHED_DISTRIBUTION_RANDOM,
   MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY,
+  MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED,
+  MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET,
   MEMCACHED_DISTRIBUTION_CONSISTENT_MAX
-} memcached_server_distribution_t;
+};
+
+#ifndef __cplusplus
+typedef enum memcached_server_distribution_t memcached_server_distribution_t;
+#endif
 
 typedef enum {
   MEMCACHED_BEHAVIOR_NO_BLOCK,
@@ -121,6 +135,8 @@ typedef enum {
   MEMCACHED_BEHAVIOR_CORK,
   MEMCACHED_BEHAVIOR_TCP_KEEPALIVE,
   MEMCACHED_BEHAVIOR_TCP_KEEPIDLE,
+  MEMCACHED_BEHAVIOR_LOAD_FROM_FILE,
+  MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS,
   MEMCACHED_BEHAVIOR_MAX
 } memcached_behavior_t;