]> git.saurik.com Git - apt.git/blame - apt-pkg/deb/debmetaindex.h
merged from http://bzr.debian.org/bzr/apt/apt/debian-sid
[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:
ff72bd0d
MV
22 /** \brief dpointer placeholder (for later in case we need it) */
23 void *d;
5dd4c8b8 24 std::map<string, vector<debSectionEntry const*> > ArchEntries;
4b42f43b 25 enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
b3d44315
MV
26
27 public:
28
5dd4c8b8 29 debReleaseIndex(string const &URI, string const &Dist);
4b42f43b 30 debReleaseIndex(string const &URI, string const &Dist, bool const Trusted);
ff72bd0d 31 virtual ~debReleaseIndex();
b3d44315 32
5dd4c8b8
DK
33 virtual string ArchiveURI(string const &File) const {return URI + File;};
34 virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
b3d44315 35 vector <struct IndexTarget *>* ComputeIndexTargets() const;
5dd4c8b8 36 string Info(const char *Type, string const &Section, string const &Arch="") const;
b3d44315
MV
37 string MetaIndexInfo(const char *Type) const;
38 string MetaIndexFile(const char *Types) const;
39 string MetaIndexURI(const char *Type) const;
5dd4c8b8
DK
40 string IndexURI(const char *Type, string const &Section, string const &Arch="native") const;
41 string IndexURISuffix(const char *Type, string const &Section, string const &Arch="native") const;
42 string SourceIndexURI(const char *Type, const string &Section) const;
43 string SourceIndexURISuffix(const char *Type, const string &Section) const;
ab53c018
DK
44 string TranslationIndexURI(const char *Type, const string &Section) const;
45 string TranslationIndexURISuffix(const char *Type, const string &Section) const;
b3d44315
MV
46 virtual vector <pkgIndexFile *> *GetIndexFiles();
47
4b42f43b 48 void SetTrusted(bool const Trusted);
b3d44315
MV
49 virtual bool IsTrusted() const;
50
5dd4c8b8
DK
51 void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry);
52 void PushSectionEntry(string const &Arch, const debSectionEntry *Entry);
b3d44315
MV
53 void PushSectionEntry(const debSectionEntry *Entry);
54};
55
56#endif