Update header check.
[m6w6/libmemcached] / libmemcached / common.h
index 6de9bbd1e24298026597a8de9d31353b1c8d82e8..f7559376910fc52897b30654bc665f65a266c6fe 100644 (file)
 #include <cstdlib>
 #include <cstring>
 #include <ctime>
-#include <ctype.h>
+#include <cctype>
+#include <cerrno>
+#include <climits>
 #else
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <errno.h>
+#include <limits.h>
 #endif
 
-#include <errno.h>
 #include <fcntl.h>
-#include <limits.h>
 #include <sys/types.h>
 #include <unistd.h>
 
 #include <strings.h>
 #endif
 
-#include <libmemcached/memcached.h>
+#include <libmemcached-1.0/memcached.h>
 #include <libmemcached/watchpoint.h>
 #include <libmemcached/is.h>
-#include <libmemcached/namespace.h>
 
 #include <libmemcached/server_instance.h>
 
@@ -106,7 +107,17 @@ memcached_return_t memcached_server_execute(memcached_st *ptr,
 #ifdef __cplusplus
 #include <libmemcached/string.hpp>
 #include <libmemcached/io.hpp>
+#include <libmemcached/udp.hpp>
 #include <libmemcached/do.hpp>
+#include <libmemcached/socket.hpp>
+#include <libmemcached/connect.hpp>
+#include <libmemcached/allocators.hpp>
+#include <libmemcached/hash.hpp>
+#include <libmemcached/quit.hpp>
+#include <libmemcached/server.hpp>
+#include <libmemcached/behavior.hpp>
+#include <libmemcached/sasl.hpp>
+#include <libmemcached/server_list.hpp>
 #endif
 #include <libmemcached/internal.h>
 #include <libmemcached/array.h>
@@ -114,13 +125,19 @@ memcached_return_t memcached_server_execute(memcached_st *ptr,
 #include <libmemcached/memcached/protocol_binary.h>
 #include <libmemcached/byteorder.h>
 #include <libmemcached/initialize_query.h>
+#ifdef __cplusplus
 #include <libmemcached/response.h>
+#endif
 #include <libmemcached/namespace.h>
+#include <libmemcached/virtual_bucket.h>
 
 #ifdef __cplusplus
 #include <libmemcached/backtrace.hpp>
 #include <libmemcached/assert.hpp>
 #include <libmemcached/server.hpp>
+#include <libmemcached/key.hpp>
+#include <libmemcached/encoding_key.h>
+#include <libmemcached/result.h>
 #endif
 
 #include <libmemcached/continuum.hpp>
@@ -145,9 +162,6 @@ memcached_return_t memcached_server_execute(memcached_st *ptr,
 extern "C" {
 #endif
 
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_connect(memcached_server_write_instance_st ptr);
-
 LIBMEMCACHED_LOCAL
 memcached_return_t run_distribution(memcached_st *ptr);
 
@@ -155,43 +169,9 @@ memcached_return_t run_distribution(memcached_st *ptr);
 #define memcached_server_response_decrement(A) (A)->cursor_active--
 #define memcached_server_response_reset(A) (A)->cursor_active=0
 
-#ifdef __cplusplus
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_key_test(const memcached_st& memc,
-                                      const char * const *keys,
-                                      const size_t *key_length,
-                                      size_t number_of_keys);
-#endif
-
 LIBMEMCACHED_LOCAL
 memcached_return_t memcached_purge(memcached_server_write_instance_st ptr);
 
-
-static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
-{
-  if (key_length == 0)
-  {
-    return MEMCACHED_BAD_KEY_PROVIDED;
-  }
-
-  if (binary)
-  {
-    if (key_length > 0xffff)
-    {
-      return MEMCACHED_BAD_KEY_PROVIDED;
-    }
-  }
-  else
-  {
-    if (key_length >= MEMCACHED_MAX_KEY)
-    {
-      return MEMCACHED_BAD_KEY_PROVIDED;
-    }
-  }
-
-  return MEMCACHED_SUCCESS;
-}
-
 #ifdef __cplusplus
 }
 #endif