]>
Commit | Line | Data |
---|---|---|
b3d44315 MV |
1 | // ijones, walters |
2 | #ifndef PKGLIB_DEBMETAINDEX_H | |
3 | #define PKGLIB_DEBMETAINDEX_H | |
4 | ||
b3d44315 | 5 | #include <apt-pkg/metaindex.h> |
b3d44315 | 6 | |
5dd4c8b8 | 7 | #include <map> |
472ff00e DK |
8 | #include <string> |
9 | #include <vector> | |
5dd4c8b8 | 10 | |
b3d44315 MV |
11 | class debReleaseIndex : public metaIndex { |
12 | public: | |
13 | ||
14 | class debSectionEntry | |
15 | { | |
16 | public: | |
472ff00e DK |
17 | debSectionEntry (std::string const &Section, bool const &IsSrc); |
18 | std::string const Section; | |
5dd4c8b8 | 19 | bool const IsSrc; |
b3d44315 MV |
20 | }; |
21 | ||
22 | private: | |
ff72bd0d MV |
23 | /** \brief dpointer placeholder (for later in case we need it) */ |
24 | void *d; | |
472ff00e | 25 | std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries; |
4b42f43b | 26 | enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; |
b3d44315 MV |
27 | |
28 | public: | |
29 | ||
472ff00e DK |
30 | debReleaseIndex(std::string const &URI, std::string const &Dist); |
31 | debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted); | |
ff72bd0d | 32 | virtual ~debReleaseIndex(); |
b3d44315 | 33 | |
472ff00e | 34 | virtual std::string ArchiveURI(std::string const &File) const {return URI + File;}; |
5dd4c8b8 | 35 | virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const; |
472ff00e DK |
36 | std::vector <struct IndexTarget *>* ComputeIndexTargets() const; |
37 | std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const; | |
38 | std::string MetaIndexInfo(const char *Type) const; | |
39 | std::string MetaIndexFile(const char *Types) const; | |
40 | std::string MetaIndexURI(const char *Type) const; | |
41 | std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const; | |
42 | std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const; | |
43 | std::string SourceIndexURI(const char *Type, const std::string &Section) const; | |
44 | std::string SourceIndexURISuffix(const char *Type, const std::string &Section) const; | |
45 | std::string TranslationIndexURI(const char *Type, const std::string &Section) const; | |
46 | std::string TranslationIndexURISuffix(const char *Type, const std::string &Section) const; | |
47 | virtual std::vector <pkgIndexFile *> *GetIndexFiles(); | |
b3d44315 | 48 | |
4b42f43b | 49 | void SetTrusted(bool const Trusted); |
b3d44315 MV |
50 | virtual bool IsTrusted() const; |
51 | ||
472ff00e DK |
52 | void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry); |
53 | void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry); | |
b3d44315 MV |
54 | void PushSectionEntry(const debSectionEntry *Entry); |
55 | }; | |
56 | ||
57 | #endif |