Add support for SASL
[m6w6/libmemcached] / libmemcached / protocol_handler.h
index fe92a2cc1f75632a8121424fdd6476b2d436b283..78eda07745a4d86a55b214d8d49c905bfe1b3b56 100644 (file)
@@ -1,15 +1,23 @@
-/*
- * Summary: Definition of the callback interface to the protocol handler
+/* LibMemcached
+ * Copyright (C) 2006-2009 Brian Aker
+ * All rights reserved.
+ *
+ * Use and distribution licensed under the BSD license.  See
+ * the COPYING file in the parent directory for full text.
  *
- * Copy: See Copyright for the status of this software.
+ * Summary: Definition of the callback interface to the protocol handler
  *
  * Author: Trond Norbye
+ *
  */
-#ifndef MEMCACHED_PROTOCOL_H
-#define MEMCACHED_PROTOCOL_H
+
+#ifndef __LIBMEMCACHED_PROTOCOL_H__
+#define __LIBMEMCACHED_PROTOCOL_H__
 
 #include <sys/types.h>
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
 
 #include <libmemcached/memcached/protocol_binary.h>
 #include <libmemcached/visibility.h>
 typedef struct memcached_protocol_st memcached_protocol_st;
 typedef struct memcached_protocol_client_st memcached_protocol_client_st;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Function the protocol handler should call to receive data.
  * This function should behave exactly like read(2)
@@ -197,4 +209,9 @@ int memcached_protocol_client_get_errno(memcached_protocol_client_st *client);
  */
 LIBMEMCACHED_API
 memcached_binary_protocol_raw_response_handler memcached_binary_protocol_get_raw_response_handler(const void *cookie);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif