X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/864a3375f7bf0b3772f4f2ae212b802f6cab5ff9..6bf93605fdb8e858d3f0a79a124c1d39f760094d:/apt-pkg/srcrecords.h diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h index 58a5e242f..c931e17b7 100644 --- a/apt-pkg/srcrecords.h +++ b/apt-pkg/srcrecords.h @@ -14,6 +14,7 @@ #define PKGLIB_SRCRECORDS_H #include +#include #include #include @@ -29,16 +30,22 @@ class pkgSrcRecords { public: +APT_IGNORE_DEPRECATED_PUSH // Describes a single file struct File { - std::string MD5Hash; - std::string Hash; - unsigned long Size; + APT_DEPRECATED std::string MD5Hash; + APT_DEPRECATED unsigned long Size; std::string Path; std::string Type; }; - + struct File2 : public File + { + unsigned long long FileSize; + HashStringList Hashes; + }; +APT_IGNORE_DEPRECATED_POP + // Abstract parser for each source record class Parser { @@ -78,6 +85,7 @@ class pkgSrcRecords static const char *BuildDepType(unsigned char const &Type) APT_PURE; virtual bool Files(std::vector &F) = 0; + bool Files2(std::vector &F); Parser(const pkgIndexFile *Index) : iIndex(Index) {}; virtual ~Parser() {}; @@ -96,8 +104,13 @@ class pkgSrcRecords // Reset the search bool Restart(); - // Locate a package by name - Parser *Find(const char *Package,bool const &SrcOnly = false); + // Step to the next SourcePackage and return pointer to the + // next SourceRecord. The pointer is owned by libapt. + const Parser* Step(); + + // Locate a package by name and return pointer to the Parser. + // The pointer is owned by libapt. + Parser* Find(const char *Package,bool const &SrcOnly = false); pkgSrcRecords(pkgSourceList &List); virtual ~pkgSrcRecords();