parse header tags
[ecparse.git] / CollectionReader.h
index 5e10c51..6e8f373 100644 (file)
@@ -5,6 +5,10 @@
 #pragma once
 
 #include "ReaderInput.h"
+#include "ED2KLink.h"
+#include "GrowingBuffer.h"
+#include "StringTag.h"
+#include "BlobTag.h"
 
 class CollectionReader {
 
@@ -12,8 +16,23 @@ public:
        CollectionReader(ReaderInput* readerInput);
        ~CollectionReader();
 
+       ED2KLink* getNextLink();
+
+private:
+       void identifyCollectionType();
+       bool isLineBreakPresent();
+       bool ensureBufferCapacity(size_t byteCount);
+       void readMoreBytes();
+
+       BlobTag* readBlobTag(bool hader);
+       StringTag* readStringTag(bool header);
+
 private:
        ReaderInput* readerInput;
+       GrowingBuffer growingBuffer;
+       int version;
+       bool firstLink;
+       bool isTextCollection;
 
 };