+
+
/*
- * $Id: MemBuf.h,v 1.5 2005/09/17 05:50:07 wessels Exp $
+ * $Id: MemBuf.h,v 1.6 2005/11/21 23:04:56 wessels Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/* use methods instead of deprecated buf and size members */
- char *content() { return buf; } // start of the added data
+ char *content() { return buf; } // start of the added data
+
+ const char *content() const { return buf; } // start of the added data
mb_size_t contentSize() const { return size; } // available data size
void terminate(); // zero-terminates the buffer w/o increasing contentSize
+ bool wasStolen() const { return stolen; }
+
/* init with specific sizes */
void init(mb_size_t szInit, mb_size_t szMax);
/* returns free() function to be used, _freezes_ the object! */
FREE *freeFunc();
-
private:
/*
* private copy constructor and assignment operator generates
unsigned stolen:
1; /* the buffer has been stolen for use by someone else */
+
+#if 0
+
+unsigned valid:
+ 1; /* to be used for debugging only! */
+#endif
};
#ifdef _USE_INLINE_