]> git.saurik.com Git - apt.git/blame - apt-pkg/deb/debmetaindex.h
* apt-pkg/depcache.cc:
[apt.git] / apt-pkg / deb / debmetaindex.h
CommitLineData
b3d44315
MV
1// ijones, walters
2#ifndef PKGLIB_DEBMETAINDEX_H
3#define PKGLIB_DEBMETAINDEX_H
4
b3d44315
MV
5#include <apt-pkg/metaindex.h>
6#include <apt-pkg/sourcelist.h>
7
5dd4c8b8
DK
8#include <map>
9
b3d44315
MV
10class debReleaseIndex : public metaIndex {
11 public:
12
13 class debSectionEntry
14 {
15 public:
5dd4c8b8
DK
16 debSectionEntry (string const &Section, bool const &IsSrc);
17 string const Section;
18 bool const IsSrc;
b3d44315
MV
19 };
20
21 private:
5dd4c8b8 22 std::map<string, vector<debSectionEntry const*> > ArchEntries;
b3d44315
MV
23
24 public:
25
5dd4c8b8 26 debReleaseIndex(string const &URI, string const &Dist);
7a9f09bd 27 ~debReleaseIndex();
b3d44315 28
5dd4c8b8
DK
29 virtual string ArchiveURI(string const &File) const {return URI + File;};
30 virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
b3d44315 31 vector <struct IndexTarget *>* ComputeIndexTargets() const;
5dd4c8b8 32 string Info(const char *Type, string const &Section, string const &Arch="") const;
b3d44315
MV
33 string MetaIndexInfo(const char *Type) const;
34 string MetaIndexFile(const char *Types) const;
35 string MetaIndexURI(const char *Type) const;
5dd4c8b8
DK
36 string IndexURI(const char *Type, string const &Section, string const &Arch="native") const;
37 string IndexURISuffix(const char *Type, string const &Section, string const &Arch="native") const;
38 string SourceIndexURI(const char *Type, const string &Section) const;
39 string SourceIndexURISuffix(const char *Type, const string &Section) const;
b3d44315
MV
40 virtual vector <pkgIndexFile *> *GetIndexFiles();
41
42 virtual bool IsTrusted() const;
43
5dd4c8b8
DK
44 void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry);
45 void PushSectionEntry(string const &Arch, const debSectionEntry *Entry);
b3d44315
MV
46 void PushSectionEntry(const debSectionEntry *Entry);
47};
48
49#endif