]>
git.saurik.com Git - apt.git/blob - apt-pkg/deb/debmetaindex.h
fc0b7f948f005e342aa92f554bff992f843597c3
2 #ifndef PKGLIB_DEBMETAINDEX_H
3 #define PKGLIB_DEBMETAINDEX_H
5 #include <apt-pkg/metaindex.h>
6 #include <apt-pkg/init.h>
12 #ifndef APT_8_CLEANER_HEADERS
13 #include <apt-pkg/sourcelist.h>
16 class debReleaseIndex
: public metaIndex
{
22 debSectionEntry (std::string
const &Section
, bool const &IsSrc
);
23 std::string
const Section
;
28 /** \brief dpointer placeholder (for later in case we need it) */
30 std::map
<std::string
, std::vector
<debSectionEntry
const*> > ArchEntries
;
31 enum { ALWAYS_TRUSTED
, NEVER_TRUSTED
, CHECK_TRUST
} Trusted
;
35 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
);
36 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
, bool const Trusted
);
37 virtual ~debReleaseIndex();
39 virtual std::string
ArchiveURI(std::string
const &File
) const {return URI
+ File
;};
40 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const;
41 std::vector
<struct IndexTarget
*>* ComputeIndexTargets() const;
42 std::string
Info(const char *Type
, std::string
const &Section
, std::string
const &Arch
="") const;
44 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13)
45 std::string
MetaIndexInfo(const char *Type
) const;
46 std::string
MetaIndexFile(const char *Types
) const;
47 std::string
MetaIndexURI(const char *Type
) const;
50 std::string
IndexURI(const char *Type
, std::string
const &Section
, std::string
const &Arch
="native") const;
51 std::string
IndexURISuffix(const char *Type
, std::string
const &Section
, std::string
const &Arch
="native") const;
52 std::string
SourceIndexURI(const char *Type
, const std::string
&Section
) const;
53 std::string
SourceIndexURISuffix(const char *Type
, const std::string
&Section
) const;
54 std::string
TranslationIndexURI(const char *Type
, const std::string
&Section
) const;
55 std::string
TranslationIndexURISuffix(const char *Type
, const std::string
&Section
) const;
56 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles();
58 void SetTrusted(bool const Trusted
);
59 virtual bool IsTrusted() const;
61 void PushSectionEntry(std::vector
<std::string
> const &Archs
, const debSectionEntry
*Entry
);
62 void PushSectionEntry(std::string
const &Arch
, const debSectionEntry
*Entry
);
63 void PushSectionEntry(const debSectionEntry
*Entry
);