]>
Commit | Line | Data |
---|---|---|
b3d44315 MV |
1 | #ifndef PKGLIB_DEBMETAINDEX_H |
2 | #define PKGLIB_DEBMETAINDEX_H | |
3 | ||
b3d44315 | 4 | #include <apt-pkg/metaindex.h> |
453b82a3 | 5 | #include <apt-pkg/macros.h> |
b3d44315 | 6 | |
5dd4c8b8 | 7 | #include <map> |
472ff00e DK |
8 | #include <string> |
9 | #include <vector> | |
5dd4c8b8 | 10 | |
b9dadc24 DK |
11 | #ifndef APT_8_CLEANER_HEADERS |
12 | #include <apt-pkg/sourcelist.h> | |
13 | #endif | |
453b82a3 DK |
14 | #ifndef APT_10_CLEANER_HEADERS |
15 | #include <apt-pkg/init.h> | |
16 | #endif | |
17 | ||
18 | class pkgAcquire; | |
19 | class pkgIndexFile; | |
80624be7 | 20 | class IndexTarget; |
b07aeb1a DK |
21 | class pkgCacheGenerator; |
22 | class OpProgress; | |
463c8d80 | 23 | class debReleaseIndexPrivate; |
b9dadc24 | 24 | |
463c8d80 DK |
25 | class APT_HIDDEN debReleaseIndex : public metaIndex |
26 | { | |
27 | debReleaseIndexPrivate * const d; | |
b3d44315 | 28 | |
5ad0096a DK |
29 | APT_HIDDEN bool parseSumData(const char *&Start, const char *End, std::string &Name, |
30 | std::string &Hash, unsigned long long &Size); | |
b3d44315 MV |
31 | public: |
32 | ||
463c8d80 DK |
33 | APT_HIDDEN std::string MetaIndexInfo(const char *Type) const; |
34 | APT_HIDDEN std::string MetaIndexFile(const char *Types) const; | |
35 | APT_HIDDEN std::string MetaIndexURI(const char *Type) const; | |
36 | ||
d03b947b DK |
37 | debReleaseIndex(std::string const &URI, std::string const &Dist, std::map<std::string,std::string> const &Options); |
38 | debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted, std::map<std::string,std::string> const &Options); | |
ff72bd0d | 39 | virtual ~debReleaseIndex(); |
b3d44315 | 40 | |
3b302846 DK |
41 | virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE {return URI + File;}; |
42 | virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) APT_OVERRIDE; | |
43 | virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE; | |
7014e148 | 44 | |
3b302846 DK |
45 | virtual std::string Describe() const APT_OVERRIDE; |
46 | virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const APT_OVERRIDE; | |
47 | virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE; | |
b07aeb1a | 48 | |
3b302846 DK |
49 | virtual bool Load(std::string const &Filename, std::string * const ErrorText) APT_OVERRIDE; |
50 | virtual metaIndex * UnloadedClone() const APT_OVERRIDE; | |
7014e148 | 51 | |
3b302846 | 52 | virtual std::vector <pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE; |
b3d44315 | 53 | |
268ffceb | 54 | bool SetTrusted(TriState const Trusted); |
0741daeb DK |
55 | bool SetCheckValidUntil(TriState const Trusted); |
56 | bool SetValidUntilMin(time_t const Valid); | |
57 | bool SetValidUntilMax(time_t const Valid); | |
b0d40854 | 58 | bool SetSignedBy(std::string const &SignedBy); |
d03b947b | 59 | std::map<std::string, std::string> GetReleaseOptions(); |
268ffceb | 60 | |
3b302846 | 61 | virtual bool IsTrusted() const APT_OVERRIDE; |
1dd20368 | 62 | bool IsArchitectureSupported(std::string const &arch) const; |
a628ca52 | 63 | bool IsArchitectureAllSupportedFor(IndexTarget const &target) const; |
b3d44315 | 64 | |
3090ae69 DK |
65 | void AddComponent(std::string const &sourcesEntry, |
66 | bool const isSrc, std::string const &Name, | |
463c8d80 DK |
67 | std::vector<std::string> const &Targets, |
68 | std::vector<std::string> const &Architectures, | |
1a3a14ac | 69 | std::vector<std::string> Languages, |
24e8f24e | 70 | bool const usePDiffs, std::string const &useByHash); |
b3d44315 MV |
71 | }; |
72 | ||
73 | #endif |