X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/472ff00ef2e48383805d281c6364ec27839e3f4d..19fb04e82cdc90d429777fcc4c7a2b33e34d20e5:/apt-pkg/deb/debmetaindex.h?ds=sidebyside diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 0cba2d8a8..7091c198f 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -3,11 +3,24 @@ #define PKGLIB_DEBMETAINDEX_H #include +#include #include #include #include +#ifndef APT_8_CLEANER_HEADERS +#include +#endif +#ifndef APT_10_CLEANER_HEADERS +#include +#endif + +class pkgAcquire; +class pkgIndexFile; +class debDebPkgFileIndex; +class IndexTarget; + class debReleaseIndex : public metaIndex { public: @@ -33,11 +46,17 @@ class debReleaseIndex : public metaIndex { virtual std::string ArchiveURI(std::string const &File) const {return URI + File;}; virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const; - std::vector * ComputeIndexTargets() const; + std::vector * ComputeIndexTargets() const; std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const; + std::string MetaIndexInfo(const char *Type) const; std::string MetaIndexFile(const char *Types) const; std::string MetaIndexURI(const char *Type) const; + +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) + virtual std::string LocalFileName() const; +#endif + std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const; std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const; std::string SourceIndexURI(const char *Type, const std::string &Section) const; @@ -54,4 +73,27 @@ class debReleaseIndex : public metaIndex { void PushSectionEntry(const debSectionEntry *Entry); }; +class debDebFileMetaIndex : public metaIndex +{ + private: + std::string DebFile; + debDebPkgFileIndex *DebIndex; + public: + virtual std::string ArchiveURI(std::string const& /*File*/) const { + return DebFile; + } + virtual bool GetIndexes(pkgAcquire* /*Owner*/, const bool& /*GetAll=false*/) const { + return true; + } + virtual std::vector *GetIndexFiles() { + return Indexes; + } + virtual bool IsTrusted() const { + return true; + } + debDebFileMetaIndex(std::string const &DebFile); + virtual ~debDebFileMetaIndex() {}; + +}; + #endif