X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/89d88ac3ef3f82fdfeac6d8d231deddeeb0f02e9..dce45dbe97531de6806707445da97d3f22285db8:/apt-pkg/deb/debrecords.h diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 9c7ea6b48..7091c38e6 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -17,36 +17,40 @@ #include #include #include +#include -class debRecordParser : public pkgRecords::Parser +#include + +#ifndef APT_8_CLEANER_HEADERS +#include +#endif + +class APT_HIDDEN debRecordParser : public pkgRecords::Parser { /** \brief dpointer placeholder (for later in case we need it) */ void *d; - + + protected: FileFd File; pkgTagFile Tags; pkgTagSection Section; - protected: - virtual bool Jump(pkgCache::VerFileIterator const &Ver); virtual bool Jump(pkgCache::DescFileIterator const &Desc); - public: + public: // These refer to the archive file for the Version virtual std::string FileName(); - virtual std::string MD5Hash(); - virtual std::string SHA1Hash(); - virtual std::string SHA256Hash(); - virtual std::string SHA512Hash(); virtual std::string SourcePkg(); virtual std::string SourceVer(); - + + virtual HashStringList Hashes() const; + // These are some general stats about the package virtual std::string Maintainer(); - virtual std::string ShortDesc(); - virtual std::string LongDesc(); + virtual std::string ShortDesc(std::string const &lang); + virtual std::string LongDesc(std::string const &lang); virtual std::string Name(); virtual std::string Homepage(); @@ -56,7 +60,18 @@ class debRecordParser : public pkgRecords::Parser virtual void GetRec(const char *&Start,const char *&Stop); debRecordParser(std::string FileName,pkgCache &Cache); - virtual ~debRecordParser() {}; + virtual ~debRecordParser(); +}; + +// custom record parser that reads deb files directly +class APT_HIDDEN debDebFileRecordParser : public debRecordParser +{ + public: + virtual std::string FileName() { + return File.Name(); + } + debDebFileRecordParser(std::string FileName,pkgCache &Cache) + : debRecordParser(FileName, Cache) {}; }; #endif