X-Git-Url: https://git.pterodactylus.net/?p=ecparse.git;a=blobdiff_plain;f=CollectionReader.h;h=023b226cfd7ca86a17b25302587c6983b82b6f59;hp=c01d00bd9ca296796777302681ee9e85c424476f;hb=HEAD;hpb=57efcbe2b1a7e6e19590602638a6ae8bbcae9b5a diff --git a/CollectionReader.h b/CollectionReader.h index c01d00b..023b226 100644 --- a/CollectionReader.h +++ b/CollectionReader.h @@ -4,8 +4,13 @@ #pragma once +#include #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; };