Merge in additional changes so that we remove a usage of std::string in the
[awesomized/libmemcached] / libmemcached / common.h
index d07edd6c0b44a1ee6b74f7c55506850d80462f6e..c4cd0e535d076e3f92550fa80915ed84438e6290 100644 (file)
   Common include file for libmemached
 */
 
-#ifndef __LIBMEMCACHED_COMMON_H__
-#define __LIBMEMCACHED_COMMON_H__
+#pragma once
 
-#include "config.h"
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <strings.h>
 #include <ctype.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
 #include <unistd.h>
 #include <limits.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <sys/un.h>
-#include <netinet/tcp.h>
 #ifdef TIME_WITH_SYS_TIME
 # include <sys/time.h>
 # include <time.h>
@@ -53,6 +46,7 @@
 
 #include "libmemcached/memcached.h"
 #include "libmemcached/watchpoint.h"
+#include "libmemcached/is.h"
 
 typedef struct memcached_server_st * memcached_server_write_instance_st;
 
@@ -71,10 +65,12 @@ memcached_return_t memcached_server_execute(memcached_st *ptr,
 #include "libmemcached/io.h"
 #include "libmemcached/do.h"
 #include "libmemcached/internal.h"
+#include "libmemcached/array.h"
 #include "libmemcached/libmemcached_probes.h"
 #include "libmemcached/memcached/protocol_binary.h"
 #include "libmemcached/byteorder.h"
 #include "libmemcached/response.h"
+#include "libmemcached/prefix_key.h"
 
 /* string value */
 struct memcached_continuum_item_st
@@ -121,16 +117,6 @@ 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
 
-// These are private 
-#define memcached_is_allocated(__object) ((__object)->options.is_allocated)
-#define memcached_is_initialized(__object) ((__object)->options.is_initialized)
-#define memcached_is_purging(__object) ((__object)->state.is_purging)
-#define memcached_is_processing_input(__object) ((__object)->state.is_processing_input)
-#define memcached_set_purging(__object, __value) ((__object)->state.is_purging= (__value))
-#define memcached_set_processing_input(__object, __value) ((__object)->state.is_processing_input= (__value))
-#define memcached_set_initialized(__object, __value) ((__object)->options.is_initialized(= (__value))
-#define memcached_set_allocated(__object, __value) ((__object)->options.is_allocated(= (__value))
-
 LIBMEMCACHED_LOCAL
 void set_last_disconnected_host(memcached_server_write_instance_st ptr);
 
@@ -231,5 +217,3 @@ static inline void *libmemcached_calloc(const memcached_st *ptr, size_t nelem, s
 #ifdef __cplusplus
 }
 #endif
-
-#endif /* __LIBMEMCACHED_COMMON_H__ */