2 #ifndef PKGLIB_DEBMETAINDEX_H
3 #define PKGLIB_DEBMETAINDEX_H
5 #include <apt-pkg/metaindex.h>
6 #include <apt-pkg/macros.h>
12 #ifndef APT_8_CLEANER_HEADERS
13 #include <apt-pkg/sourcelist.h>
15 #ifndef APT_10_CLEANER_HEADERS
16 #include <apt-pkg/init.h>
21 class debDebPkgFileIndex
;
23 class pkgCacheGenerator
;
26 class APT_HIDDEN debReleaseIndex
: public metaIndex
{
32 debSectionEntry (std::string
const &Section
, bool const &IsSrc
);
33 std::string
const Section
;
38 /** \brief dpointer placeholder (for later in case we need it) */
40 std::map
<std::string
, std::vector
<debSectionEntry
const*> > ArchEntries
;
41 enum APT_HIDDEN
{ ALWAYS_TRUSTED
, NEVER_TRUSTED
, CHECK_TRUST
} Trusted
;
45 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
);
46 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
, bool const Trusted
);
47 virtual ~debReleaseIndex();
49 virtual std::string
ArchiveURI(std::string
const &File
) const {return URI
+ File
;};
50 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const;
51 virtual std::vector
<IndexTarget
> GetIndexTargets() const;
53 virtual std::string
Describe() const;
54 virtual pkgCache::RlsFileIterator
FindInCache(pkgCache
&Cache
, bool const ModifyCheck
) const;
55 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
*Prog
) const;
57 std::string
MetaIndexInfo(const char *Type
) const;
58 std::string
MetaIndexFile(const char *Types
) const;
59 std::string
MetaIndexURI(const char *Type
) const;
61 #if APT_PKG_ABI >= 413
64 std::string
LocalFileName() const;
66 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles();
68 void SetTrusted(bool const Trusted
);
69 virtual bool IsTrusted() const;
71 void PushSectionEntry(std::vector
<std::string
> const &Archs
, const debSectionEntry
*Entry
);
72 void PushSectionEntry(std::string
const &Arch
, const debSectionEntry
*Entry
);
75 class APT_HIDDEN debDebFileMetaIndex
: public metaIndex
79 debDebPkgFileIndex
*DebIndex
;
81 virtual std::string
ArchiveURI(std::string
const& /*File*/) const {
84 virtual bool GetIndexes(pkgAcquire
* /*Owner*/, const bool& /*GetAll=false*/) const {
87 virtual std::vector
<IndexTarget
> GetIndexTargets() const {
88 return std::vector
<IndexTarget
>();
90 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles() {
93 virtual bool IsTrusted() const {
96 debDebFileMetaIndex(std::string
const &DebFile
);
97 virtual ~debDebFileMetaIndex() {};