6
6
#include <apt-pkg/pkgcache.h>
7
7
#include <apt-pkg/indexfile.h>
8
#include <apt-pkg/init.h>
9
10
#ifndef APT_8_CLEANER_HEADERS
10
11
#include <apt-pkg/srcrecords.h>
32
32
// Various accessors
33
33
virtual std::string GetURI() const {return URI;}
34
34
virtual std::string GetDist() const {return Dist;}
35
35
virtual const char* GetType() const {return Type;}
37
// interface to to query it
38
#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
39
// returns the path of the local file (or "" if its not available)
40
virtual std::string LocalFileName() const {return "";};
37
43
// Interface for acquire
38
virtual std::string ArchiveURI(std::string const& /*File*/) const = 0;
44
virtual std::string ArchiveURI(std::string const& File) const = 0;
39
45
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0;
41
46
virtual std::vector<pkgIndexFile *> *GetIndexFiles() = 0;
42
47
virtual bool IsTrusted() const = 0;
44
metaIndex(std::string const &URI, std::string const &Dist, char const * const Type) :
45
Indexes(NULL), Type(Type), URI(URI), Dist(Dist) {
49
metaIndex(std::string const &URI, std::string const &Dist,
50
char const * const Type)
51
: Indexes(NULL), Type(Type), URI(URI), Dist(Dist)
48
virtual ~metaIndex() {
51
for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I)
60
for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin();
61
I != (*Indexes).end(); ++I)