projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Remove sample.cnf
[m6w6/libmemcached]
/
libmemcached
/
protocol_handler.h
diff --git
a/libmemcached/protocol_handler.h
b/libmemcached/protocol_handler.h
index fe92a2cc1f75632a8121424fdd6476b2d436b283..9f61187f562174041989d67811e67791a26b9476 100644
(file)
--- a/
libmemcached/protocol_handler.h
+++ b/
libmemcached/protocol_handler.h
@@
-1,16
+1,25
@@
-/*
- * 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
*
* Author: Trond Norbye
+ *
*/
*/
-#ifndef MEMCACHED_PROTOCOL_H
-#define MEMCACHED_PROTOCOL_H
+
+#ifndef __LIBMEMCACHED_PROTOCOL_H__
+#define __LIBMEMCACHED_PROTOCOL_H__
#include <sys/types.h>
#include <sys/types.h>
-#include <stdbool.h>
+#if !defined(__cplusplus)
+# include <stdbool.h>
+#endif
+#include <libmemcached/platform.h>
#include <libmemcached/memcached/protocol_binary.h>
#include <libmemcached/visibility.h>
#include <libmemcached/protocol/callback.h>
#include <libmemcached/memcached/protocol_binary.h>
#include <libmemcached/visibility.h>
#include <libmemcached/protocol/callback.h>
@@
-24,6
+33,10
@@
typedef struct memcached_protocol_st memcached_protocol_st;
typedef struct memcached_protocol_client_st memcached_protocol_client_st;
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)
/**
* Function the protocol handler should call to receive data.
* This function should behave exactly like read(2)
@@
-36,7
+49,7
@@
typedef struct memcached_protocol_client_st memcached_protocol_client_st;
* or -1 upon error (errno should contain more information)
*/
typedef ssize_t (*memcached_protocol_recv_func)(const void *cookie,
* or -1 upon error (errno should contain more information)
*/
typedef ssize_t (*memcached_protocol_recv_func)(const void *cookie,
-
in
t fd,
+
memcached_socket_
t fd,
void *buf,
size_t nbuf);
void *buf,
size_t nbuf);
@@
-52,7
+65,7
@@
typedef ssize_t (*memcached_protocol_recv_func)(const void *cookie,
* or -1 upon error (errno should contain more information)
*/
typedef ssize_t (*memcached_protocol_send_func)(const void *cookie,
* or -1 upon error (errno should contain more information)
*/
typedef ssize_t (*memcached_protocol_send_func)(const void *cookie,
-
in
t fd,
+
memcached_socket_
t fd,
const void *buf,
size_t nbuf);
const void *buf,
size_t nbuf);
@@
-127,7
+140,7
@@
void memached_protocol_set_io_functions(memcached_protocol_st *instance,
* @return NULL if allocation fails, otherwise an instance
*/
LIBMEMCACHED_API
* @return NULL if allocation fails, otherwise an instance
*/
LIBMEMCACHED_API
-memcached_protocol_client_st *memcached_protocol_create_client(memcached_protocol_st *instance,
in
t sock);
+memcached_protocol_client_st *memcached_protocol_create_client(memcached_protocol_st *instance,
memcached_socket_
t sock);
/**
* Destroy a client handle.
/**
* Destroy a client handle.
@@
-179,7
+192,7
@@
memcached_protocol_event_t memcached_protocol_client_work(memcached_protocol_cli
* @return the socket handle
*/
LIBMEMCACHED_API
* @return the socket handle
*/
LIBMEMCACHED_API
-
in
t memcached_protocol_client_get_socket(memcached_protocol_client_st *client);
+
memcached_socket_
t memcached_protocol_client_get_socket(memcached_protocol_client_st *client);
/**
* Get the error id socket attached to a client handle
/**
* Get the error id socket attached to a client handle
@@
-197,4
+210,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);
*/
LIBMEMCACHED_API
memcached_binary_protocol_raw_response_handler memcached_binary_protocol_get_raw_response_handler(const void *cookie);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif
#endif