memcache/command.h
changeset 41 540737bf6bac
child 43 e5b714190dee
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/memcache/command.h	Wed Aug 27 21:30:32 2008 +0300
@@ -0,0 +1,18 @@
+#ifndef MEMCACHE_COMMAND_H
+#define MEMCACHE_COMMAND_H
+
+#include <event2/util.h>
+#include <event2/buffer.h>
+
+#include "../memcache.h"
+
+struct memcache_cmd {
+    struct evbuffer *req_header;
+};
+
+int memcache_cmd_init (struct memcache_cmd *cmd, enum memcache_command cmd_type, struct memcache_key *key, struct memcache_obj *obj);
+
+int memcache_cmd_format_header (struct evbuffer *buf, enum memcache_command cmd_type, struct memcache_key *key, struct memcache_obj *obj);
+int memcache_cmd_parse_header (struct evbuffer *buf, char **header_data, enum memcache_reply *reply_type, struct memcache_key *key, struct memcache_obj *obj, int *has_data);
+
+#endif /* MEMCACHE_COMMAND_H */