X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=CollectionReader.h;h=770c2a8982890ce1bd994e8fb74d2c11f8c08ab6;hb=ee78f2a5fb29ac33b4d41b1d5b4b4a3e1efcf067;hp=2936e2573982ba02e594aaf11426d7b881bbf87d;hpb=e1f64147e3eedccbbc59658ddb6cf7992dbd50c1;p=ecparse.git diff --git a/CollectionReader.h b/CollectionReader.h index 2936e25..770c2a8 100644 --- a/CollectionReader.h +++ b/CollectionReader.h @@ -2,10 +2,14 @@ * © 2008 by David Roden */ -#ifndef __ECPARSE_COLLECTIONREADER_H__ -#define __ECPARSE_COLLECTIONREADER_H__ +#pragma once +#include #include "ReaderInput.h" +#include "ED2KLink.h" +#include "GrowingBuffer.h" +#include "StringTag.h" +#include "BlobTag.h" class CollectionReader { @@ -13,9 +17,25 @@ 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; + uint32_t version; + bool firstLink; + bool isTextCollection; + uint32_t fileCollectionCount; + uint32_t collectionFileIndex; }; -#endif