]>
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>
22 class debReleaseIndex
: public metaIndex
{
28 debSectionEntry (std::string
const &Section
, bool const &IsSrc
);
29 std::string
const Section
;
34 /** \brief dpointer placeholder (for later in case we need it) */
36 std::map
<std::string
, std::vector
<debSectionEntry
const*> > ArchEntries
;
37 enum { ALWAYS_TRUSTED
, NEVER_TRUSTED
, CHECK_TRUST
} Trusted
;
41 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
);
42 debReleaseIndex(std::string
const &URI
, std::string
const &Dist
, bool const Trusted
);
43 virtual ~debReleaseIndex();
45 virtual std::string
ArchiveURI(std::string
const &File
) const {return URI
+ File
;};
46 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const;
47 std::vector
<struct IndexTarget
*>* ComputeIndexTargets() const;
48 std::string
Info(const char *Type
, std::string
const &Section
, std::string
const &Arch
="") const;
50 std::string
MetaIndexInfo(const char *Type
) const;
51 std::string
MetaIndexFile(const char *Types
) const;
52 std::string
MetaIndexURI(const char *Type
) const;
54 #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
55 virtual std::string
LocalFileName() const;
58 std::string
IndexURI(const char *Type
, std::string
const &Section
, std::string
const &Arch
="native") const;
59 std::string
IndexURISuffix(const char *Type
, std::string
const &Section
, std::string
const &Arch
="native") const;
60 std::string
SourceIndexURI(const char *Type
, const std::string
&Section
) const;
61 std::string
SourceIndexURISuffix(const char *Type
, const std::string
&Section
) const;
62 std::string
TranslationIndexURI(const char *Type
, const std::string
&Section
) const;
63 std::string
TranslationIndexURISuffix(const char *Type
, const std::string
&Section
) const;
64 virtual std::vector
<pkgIndexFile
*> *GetIndexFiles();
66 void SetTrusted(bool const Trusted
);
67 virtual bool IsTrusted() const;
69 void PushSectionEntry(std::vector
<std::string
> const &Archs
, const debSectionEntry
*Entry
);
70 void PushSectionEntry(std::string
const &Arch
, const debSectionEntry
*Entry
);
71 void PushSectionEntry(const debSectionEntry
*Entry
);