]> git.saurik.com Git - apt.git/blob - apt-pkg/metaindex.h
tag of apt@packages.debian.org/apt--ubuntu--0--patch-17
[apt.git] / apt-pkg / metaindex.h
1 #ifndef PKGLIB_METAINDEX_H
2 #define PKGLIB_METAINDEX_H
3
4 /* #ifdef __GNUG__ */
5 /* #pragma interface "apt-pkg/metaindex.h" */
6 /* #endif */
7
8 #include <string>
9 #include <apt-pkg/pkgcache.h>
10 #include <apt-pkg/srcrecords.h>
11 #include <apt-pkg/pkgrecords.h>
12 #include <apt-pkg/indexfile.h>
13 #include <apt-pkg/vendor.h>
14
15 using std::string;
16
17 class pkgAcquire;
18 class pkgCacheGenerator;
19 class OpProgress;
20
21 class metaIndex
22 {
23 protected:
24 vector <pkgIndexFile *> *Indexes;
25 const char *Type;
26 string URI;
27 string Dist;
28 bool Trusted;
29
30 public:
31
32
33 // Various accessors
34 virtual string GetURI() const {return URI;}
35 virtual string GetDist() const {return Dist;}
36 virtual const char* GetType() const {return Type;}
37
38 // Interface for acquire
39 virtual string ArchiveURI(string /*File*/) const = 0;
40 virtual bool GetIndexes(pkgAcquire *Owner, bool GetAll=false) const = 0;
41
42 virtual vector<pkgIndexFile *> *GetIndexFiles() = 0;
43 virtual bool IsTrusted() const = 0;
44
45 virtual ~metaIndex() {};
46 };
47
48 #endif