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

apt 2.7.5 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 SetSnapshot(std::string Snapshot);
55 std::string GetSnapshotsServer() const; // As defined in the Release file
56 bool SetSignedBy(std::string const &SignedBy);
57 std::map<std::string, std::string> GetReleaseOptions();
58
59 virtual bool IsTrusted() const APT_OVERRIDE;
60 bool IsArchitectureSupported(std::string const &arch) const override;
61 bool IsArchitectureAllSupportedFor(IndexTarget const &target) const override;
62 bool HasSupportForComponent(std::string const &component) const override;
63
64 APT_PURE time_t GetNotBefore() const override;
65
66 void AddComponent(std::string const &sourcesEntry,
67 bool const isSrc, std::string const &Name,
68 std::vector<std::string> const &Targets,
69 std::vector<std::string> const &Architectures,
70 std::vector<std::string> Languages,
71 bool const usePDiffs, std::string const &useByHash);
72};
73
74#endif
IndexTarget
Information about an index file.
Definition indexfile.h:39
OpProgress
Definition progress.h:30
URI
Definition strutl.h:212
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:47
pkgIndexFile
Definition indexfile.h:103