increase version number to 0.1
[ecparse.git] / CollectionReader.h
index c01d00b..023b226 100644 (file)
@@ -4,8 +4,13 @@
 
 #pragma once
 
+#include <stdint.h>
 #include "ReaderInput.h"
 #include "ED2KLink.h"
+#include "GrowingBuffer.h"
+#include "StringTag.h"
+#include "BlobTag.h"
+#include "HashTag.h"
 
 class CollectionReader {
 
@@ -16,7 +21,23 @@ public:
        ED2KLink* getNextLink();
 
 private:
+       void identifyCollectionType();
+       bool isLineBreakPresent();
+       bool ensureBufferCapacity(size_t byteCount);
+       void readMoreBytes();
+
+       BlobTag* readBlobTag(bool header = false);
+       StringTag* readStringTag(bool header = false);
+       HashTag* readHashTag();
+
+private:
        ReaderInput* readerInput;
+       GrowingBuffer growingBuffer;
+       uint32_t version;
+       bool firstLink;
+       bool isTextCollection;
+       uint32_t fileCollectionCount;
+       uint32_t collectionFileIndex;
 
 };