]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.h
dispose http(s) 416 error page as non-content
[apt.git] / apt-pkg / deb / debmetaindex.h
index bbeba159894b570c73febdcd6d93b112950ae3bf..94d00576034a2d91736f8ae9fd107f2252cc3383 100644 (file)
 
 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<std::string, std::vector<debSectionEntry const*> > 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<pkgIndexFile *> *GetIndexFiles() {
+      return Indexes;
+   }
+   virtual bool IsTrusted() const {
+      return true;
+   }
+   debDebFileMetaIndex(std::string const &DebFile);
+   virtual ~debDebFileMetaIndex() {};
+
+};
+
 #endif