]> git.saurik.com Git - apt.git/blame - apt-pkg/metaindex.h
* fix a off-by-one error when showing the description
[apt.git] / apt-pkg / metaindex.h
CommitLineData
7db98ffc
MZ
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
15using std::string;
16
17class pkgAcquire;
18class pkgCacheGenerator;
19class OpProgress;
20
21class 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