apt: apt-pkg/deb/debmetaindex.h Source File

apt 2.3.15 commandline package manager

debmetaindex.h
1#ifndef PKGLIB_DEBMETAINDEX_H
2#define PKGLIB_DEBMETAINDEX_H
3
4#include <apt-pkg/macros.h>
5#include <apt-pkg/metaindex.h>
6
7#include <map>
8#include <string>
9#include <vector>
10
11
12class pkgAcquire;
13class pkgIndexFile;
14class IndexTarget;
15class pkgCacheGenerator;
16class OpProgress;
17class debReleaseIndexPrivate;
18
19 class APT_HIDDEN debReleaseIndex : public metaIndex
20{
21 debReleaseIndexPrivate * const d;
22
23 APT_HIDDEN bool parseSumData(const char *&Start, const char *End, std::string &Name,
24 std::string &Hash, unsigned long long &Size);
25 public:
26
27 APT_HIDDEN std::string MetaIndexInfo(const char *Type) const;
28 APT_HIDDEN std::string MetaIndexFile(const char *Types) const;
29 APT_HIDDEN std::string MetaIndexURI(const char *Type) const;
30
31 debReleaseIndex(std::string const &URI, std::string const &Dist, std::map<std::string,std::string> const &Options);
32 debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted, std::map<std::string,std::string> const &Options);
33 virtual ~debReleaseIndex();
34
35 virtual std::string ArchiveURI(std::string const &File) const APT_OVERRIDE;
36 virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) APT_OVERRIDE;
37 virtual std::vector<IndexTarget> GetIndexTargets() const APT_OVERRIDE;
38
39 virtual std::string Describe() const APT_OVERRIDE;
40 virtual pkgCache::RlsFileIterator FindInCache(pkgCache &Cache, bool const ModifyCheck) const APT_OVERRIDE;
41 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const APT_OVERRIDE;
42
43 virtual bool Load(std::string const &Filename, std::string * const ErrorText) APT_OVERRIDE;
44 virtual metaIndex * UnloadedClone() const APT_OVERRIDE;
45
46 virtual std::vector <pkgIndexFile *> *GetIndexFiles() APT_OVERRIDE;
47
48 bool SetTrusted(TriState const Trusted);
49 bool SetCheckValidUntil(TriState const Trusted);
50 bool SetValidUntilMin(time_t const Valid);
51 bool SetValidUntilMax(time_t const Valid);
52 bool SetCheckDate(TriState const CheckDate);
53 bool SetDateMaxFuture(time_t const DateMaxFuture);
54 bool SetSignedBy(std::string const &SignedBy);
55 std::map<std::string, std::string> GetReleaseOptions();
56
57 virtual bool IsTrusted() const APT_OVERRIDE;
58 bool IsArchitectureSupported(std::string const &arch) const override;
59 bool IsArchitectureAllSupportedFor(IndexTarget const &target) const override;
60 bool HasSupportForComponent(std::string const &component) const override;
61
62 APT_PURE time_t GetNotBefore() const override;
63
64 void AddComponent(std::string const &sourcesEntry,
65 bool const isSrc, std::string const &Name,
66 std::vector<std::string> const &Targets,
67 std::vector<std::string> const &Architectures,
68 std::vector<std::string> Languages,
69 bool const usePDiffs, std::string const &useByHash);
70};
71
72#endif
IndexTarget
Information about an index file.
Definition: indexfile.h:39
OpProgress
Definition: progress.h:30
URI
Definition: strutl.h:208
debReleaseIndexPrivate
Definition: debmetaindex.cc:102
debReleaseIndex
Definition: debmetaindex.h:20
metaIndex
Definition: metaindex.h:21
metaIndex::UnloadedClone
virtual metaIndex * UnloadedClone() const =0
pkgAcquire
Represents the process by which a pkgAcquire object should retrieve a file or a collection of files.
Definition: acquire-item.h:59
pkgCacheGenerator
Definition: pkgcachegen.h:43
pkgCache
Definition: cacheiterators.h:48
pkgIndexFile
Definition: indexfile.h:102