memcache/request.h
changeset 42 0e503189af2f
parent 41 540737bf6bac
child 43 e5b714190dee
--- a/memcache/request.h	Wed Aug 27 21:30:32 2008 +0300
+++ b/memcache/request.h	Wed Aug 27 22:42:27 2008 +0300
@@ -13,6 +13,9 @@
     // the command to execute
     enum memcache_command cmd_type;
 
+    // the reply we have received, or MEMCACHE_REPLY_INVALID
+    enum memcache_reply reply_type;
+
     // our key/obj
     struct memcache_key key;
     struct memcache_obj obj;
@@ -36,7 +39,6 @@
  */
 struct memcache_req *memcache_req_alloc (struct memcache *mc, enum memcache_command cmd_type, const struct memcache_key *key, void *cb_arg);
 
-
 /*
  * An error occurred, and the request must be abandoned. This will assume that the req is not active or enqueued
  * anymore, and the req should not be accessed by memcache_* code after this.
@@ -44,6 +46,28 @@
 void memcache_req_error (struct memcache_req *req);
 
 /*
+ * The request has been queued.
+ */
+void memcache_req_queued (struct memcache_req *req);
+
+/*
+ * The request is being sent.
+ */
+void memcache_req_send (struct memcache_req *req);
+
+/*
+ * The response has been received, although if the respones also contains data, that will be notified separately
+ */
+void memcache_req_reply (struct memcache_req *req, enum memcache_reply reply_type);
+
+/*
+ * The request was sent and is now done, and is not associated with the connection anymore.
+ *
+ * This will be called before req_reply/req_data, but not before/after req_error.
+ */
+void memcache_req_done (struct memcache_req *req);
+
+/*
  * Free an unused req. Should always be called by the user, not via internal means.
  */
 void memcache_req_free (struct memcache_req *req);