]>
git.saurik.com Git - apt.git/blob - apt-pkg/deb/debmetaindex.h
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
;
24 class debReleaseIndex
: public metaIndex
{
30 debSectionEntry (std::string
const &Section
, bool const &IsSrc
);
31 std::string
const Section
;
36 /** \brief dpointer placeholder (for later in case we need it) */
38 std::map
<std::string
, std::vector
<debSectionEntry
const*> > ArchEntries
;
39 enum { ALWAYS_TRUSTED
, NEVER_TRUSTED
, CHECK_TRUST
} Trusted
;
43 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
);
44 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
, bool const Trusted
);
45 virtual ~debReleaseIndex();
47 virtual std::string
ArchiveURI(std::string
const &File
) const {return URI
+ File
;};
48 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const;
49 std::vector
<IndexTarget
*>* ComputeIndexTargets() const;
50 std::string
Info(const char *Type
, std::string
const &Section
, std::string
const &Arch
="") const;
52 std::string
MetaIndexInfo(const char *Type
) const;
53 std::string
MetaIndexFile(const char *Types
) const;
54 std::string
MetaIndexURI(const char *Type
) const;
56 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
57 virtual std::string
LocalFileName() const;
60 std::string
IndexURI(const char *Type
, std::string
const &Section
, std::string
const &Arch
="native") const;
61 std::string
IndexURISuffix(const char *Type
, std::string
const &Section
, std::string
const &Arch
="native") const;
62 std::string
SourceIndexURI(const char *Type
, const std::string
&Section
) const;
63 std::string
SourceIndexURISuffix(const char *Type
, const std::string
&Section
) const;
64 std::string
TranslationIndexURI(const char *Type
, const std::string
&Section
) const;
65 std::string
TranslationIndexURISuffix(const char *Type
, const std::string
&Section
) 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
);
73 void PushSectionEntry(const debSectionEntry
*Entry
);
76 class debDebFileMetaIndex
: public metaIndex
80 debDebPkgFileIndex
*DebIndex
;
82 virtual std::string
ArchiveURI(std::string
const& /*File*/) const {
85 virtual bool GetIndexes(pkgAcquire
* /*Owner*/, const bool& /*GetAll=false*/) const {
88 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles() {
91 virtual bool IsTrusted() const {
94 debDebFileMetaIndex(std::string
const &DebFile
);
95 virtual ~debDebFileMetaIndex() {};