1 #ifndef PKGLIB_DEBMETAINDEX_H
2 #define PKGLIB_DEBMETAINDEX_H
4 #include <apt-pkg/metaindex.h>
5 #include <apt-pkg/macros.h>
11 #ifndef APT_8_CLEANER_HEADERS
12 #include <apt-pkg/sourcelist.h>
14 #ifndef APT_10_CLEANER_HEADERS
15 #include <apt-pkg/init.h>
20 class debDebPkgFileIndex
;
22 class pkgCacheGenerator
;
24 class debReleaseIndexPrivate
;
26 class APT_HIDDEN debReleaseIndex
: public metaIndex
28 debReleaseIndexPrivate
* const d
;
32 APT_HIDDEN
std::string
MetaIndexInfo(const char *Type
) const;
33 APT_HIDDEN
std::string
MetaIndexFile(const char *Types
) const;
34 APT_HIDDEN
std::string
MetaIndexURI(const char *Type
) const;
36 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
);
37 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
, bool const Trusted
);
38 virtual ~debReleaseIndex();
40 virtual std::string
ArchiveURI(std::string
const &File
) const {return URI
+ File
;};
41 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const;
42 virtual std::vector
<IndexTarget
> GetIndexTargets() const;
44 virtual std::string
Describe() const;
45 virtual pkgCache::RlsFileIterator
FindInCache(pkgCache
&Cache
, bool const ModifyCheck
) const;
46 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
*Prog
) const;
48 virtual std::string
LocalFileName() const;
50 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles();
52 enum APT_HIDDEN TriState
{
53 TRI_YES
, TRI_DONTCARE
, TRI_NO
, TRI_UNSET
55 bool SetTrusted(TriState
const Trusted
);
57 virtual bool IsTrusted() const;
59 void AddComponent(bool const isSrc
, std::string
const &Name
,
60 std::vector
<std::string
> const &Targets
,
61 std::vector
<std::string
> const &Architectures
,
62 std::vector
<std::string
> Languages
);
65 class APT_HIDDEN debDebFileMetaIndex
: public metaIndex
70 debDebPkgFileIndex
*DebIndex
;
72 virtual std::string
ArchiveURI(std::string
const& /*File*/) const {
75 virtual bool GetIndexes(pkgAcquire
* /*Owner*/, const bool& /*GetAll=false*/) const {
78 virtual std::vector
<IndexTarget
> GetIndexTargets() const {
79 return std::vector
<IndexTarget
>();
81 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles() {
84 virtual bool IsTrusted() const {
87 debDebFileMetaIndex(std::string
const &DebFile
);
88 virtual ~debDebFileMetaIndex();