summaryrefslogtreecommitdiff
path: root/apt-pkg/metaindex.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-06 07:51:45 +0100
committerMichael Vogt <mvo@debian.org>2014-01-06 07:51:45 +0100
commit1b4560fec66a6e7b2dff9aaa19095fb8423f69a0 (patch)
tree7fb2b63e31f356ef87af4699ba87b4f1443f508c /apt-pkg/metaindex.h
parent81d183681aea972fddd453d62109f8ccda3f447a (diff)
parent74d4bb26e09146b9d5f01889a676dc58ff5d63cd (diff)
Merge branch 'debian/sid' into feature/apt-manpage
Diffstat (limited to 'apt-pkg/metaindex.h')
-rw-r--r--apt-pkg/metaindex.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/apt-pkg/metaindex.h b/apt-pkg/metaindex.h
index 5783735ff..18a90a29d 100644
--- a/apt-pkg/metaindex.h
+++ b/apt-pkg/metaindex.h
@@ -5,6 +5,7 @@
#include <string>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/indexfile.h>
+#include <apt-pkg/init.h>
#ifndef APT_8_CLEANER_HEADERS
#include <apt-pkg/srcrecords.h>
@@ -28,27 +29,36 @@ class metaIndex
public:
-
// Various accessors
virtual std::string GetURI() const {return URI;}
virtual std::string GetDist() const {return Dist;}
virtual const char* GetType() const {return Type;}
+ // interface to to query it
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
+ // returns the path of the local file (or "" if its not available)
+ virtual std::string LocalFileName() const {return "";};
+#endif
+
// Interface for acquire
- virtual std::string ArchiveURI(std::string const& /*File*/) const = 0;
+ virtual std::string ArchiveURI(std::string const& File) const = 0;
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0;
-
virtual std::vector<pkgIndexFile *> *GetIndexFiles() = 0;
virtual bool IsTrusted() const = 0;
- metaIndex(std::string const &URI, std::string const &Dist, char const * const Type) :
- Indexes(NULL), Type(Type), URI(URI), Dist(Dist) {
+ metaIndex(std::string const &URI, std::string const &Dist,
+ char const * const Type)
+ : Indexes(NULL), Type(Type), URI(URI), Dist(Dist)
+ {
+ /* nothing */
}
- virtual ~metaIndex() {
+ virtual ~metaIndex()
+ {
if (Indexes == 0)
return;
- for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I)
+ for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin();
+ I != (*Indexes).end(); ++I)
delete *I;
delete Indexes;
}