summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/bufferarray.h
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-21 19:45:40 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-21 19:45:40 -0400
commit4da93b6ad91dff1de98c3c8dd3674c0544f2958b (patch)
treeb3fc5f6b24ed52333de31296746724e6a3278088 /indra/llcorehttp/bufferarray.h
parenta066bc1994fccae7967921980332505aac97953f (diff)
SH-3177 Add streambuf/iostream adapters to BufferArray object.
Initial version that should have enough of the plumbing to produce a working adapter. Memory test is showing 8 bytes held after one of the tests so I'm going to revisit that later. But basic functionality is there going by the unit tests.
Diffstat (limited to 'indra/llcorehttp/bufferarray.h')
-rw-r--r--indra/llcorehttp/bufferarray.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llcorehttp/bufferarray.h b/indra/llcorehttp/bufferarray.h
index d0c51d3c73..1094a435b4 100644
--- a/indra/llcorehttp/bufferarray.h
+++ b/indra/llcorehttp/bufferarray.h
@@ -37,6 +37,7 @@
namespace LLCore
{
+class BufferArrayStreamBuf;
/// A very simple scatter/gather type map for bulk data. The motivation
/// for this class is the writedata callback used by libcurl. Response
@@ -65,6 +66,11 @@ namespace LLCore
class BufferArray : public LLCoreInt::RefCounted
{
public:
+ // BufferArrayStreamBuf has intimate knowledge of this
+ // implementation to implement a buffer-free adapter.
+ // Changes here will likely need to be reflected there.
+ friend class BufferArrayStreamBuf;
+
BufferArray();
protected:
@@ -114,6 +120,8 @@ public:
protected:
int findBlock(size_t pos, size_t * ret_offset);
+
+ bool getBlockStartEnd(int block, const char ** start, const char ** end);
protected:
class Block;