X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/32228b90a72b1d130892cf7ffcd667cb192f1e70..ed793a19ec00b83254029509bc516e3ba911c75a:/apt-pkg/deb/debmetaindex.h diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index bbeba1598..94d005760 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -18,9 +18,10 @@ class pkgAcquire; class pkgIndexFile; +class debDebPkgFileIndex; class IndexTarget; -class debReleaseIndex : public metaIndex { +class APT_HIDDEN debReleaseIndex : public metaIndex { public: class debSectionEntry @@ -35,7 +36,7 @@ class debReleaseIndex : public metaIndex { /** \brief dpointer placeholder (for later in case we need it) */ void *d; std::map > ArchEntries; - enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; + enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; public: @@ -52,9 +53,10 @@ class debReleaseIndex : public metaIndex { 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; +#if APT_PKG_ABI >= 413 + virtual #endif + std::string LocalFileName() const; 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; @@ -72,4 +74,27 @@ class debReleaseIndex : public metaIndex { void PushSectionEntry(const debSectionEntry *Entry); }; +class APT_HIDDEN 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