X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/a1e68c33ac15be454984b00d62c7fc331bd0b32b..5f4fcd88bdabee993dd07244d2f0f8f3658c40f2:/apt-pkg/deb/debsrcrecords.h diff --git a/apt-pkg/deb/debsrcrecords.h b/apt-pkg/deb/debsrcrecords.h index 4c8d03224..cd246d624 100644 --- a/apt-pkg/deb/debsrcrecords.h +++ b/apt-pkg/deb/debsrcrecords.h @@ -11,16 +11,22 @@ #ifndef PKGLIB_DEBSRCRECORDS_H #define PKGLIB_DEBSRCRECORDS_H - #include #include #include -class debSrcRecordParser : public pkgSrcRecords::Parser +#include +#include +#include + +class pkgIndexFile; + +class APT_HIDDEN debSrcRecordParser : public pkgSrcRecords::Parser { /** \brief dpointer placeholder (for later in case we need it) */ void *d; + protected: FileFd Fd; pkgTagFile Tags; pkgTagSection Sect; @@ -30,7 +36,7 @@ class debSrcRecordParser : public pkgSrcRecords::Parser public: - virtual bool Restart() {return Tags.Jump(Sect,0);}; + virtual bool Restart() {return Jump(0);}; virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);}; virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);}; @@ -48,11 +54,18 @@ class debSrcRecordParser : public pkgSrcRecords::Parser return std::string(Start,Stop); }; virtual bool Files(std::vector &F); + bool Files2(std::vector &F); debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) - : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), - Buffer(NULL) {} + : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400), + iOffset(0), Buffer(NULL) {} virtual ~debSrcRecordParser(); }; +class APT_HIDDEN debDscRecordParser : public debSrcRecordParser +{ + public: + debDscRecordParser(std::string const &DscFile, pkgIndexFile const *Index); +}; + #endif