Remove cork from being optional, just use it as we need it.
[m6w6/libmemcached] / libmemcached / options / context.h
index f7c6d5923d3a89410db3e79b6d2443dac5318ed4..9e4ecb3a32d5d873f25e2937a914a5838f0bbe30 100644 (file)
@@ -48,7 +48,8 @@ public:
     begin(NULL),
     pos(0),
     memc(NULL),
-    rc(rc_arg)
+    rc(rc_arg),
+    _end(false)
   {
     buf= option_string;
     length= option_string_length;
@@ -57,6 +58,19 @@ public:
     rc= MEMCACHED_SUCCESS;
   }
 
+  bool end()
+  {
+    return _end;
+  }
+
+  void start();
+
+  void set_end()
+  {
+    rc= MEMCACHED_SUCCESS;
+    _end= true;
+  }
+
   ~Context()
   {
     destroy_scanner();
@@ -73,4 +87,7 @@ public:
 protected:
   void init_scanner();   
   void destroy_scanner();
+
+private:
+  bool _end;
 };