]>
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/sourcelist.h>
10 class debReleaseIndex
: public metaIndex
{
16 debSectionEntry (string
const &Section
, bool const &IsSrc
);
22 /** \brief dpointer placeholder (for later in case we need it) */
24 std::map
<string
, vector
<debSectionEntry
const*> > ArchEntries
;
25 enum { ALWAYS_TRUSTED
, NEVER_TRUSTED
, CHECK_TRUST
} Trusted
;
29 debReleaseIndex(string
const &URI
, string
const &Dist
);
30 debReleaseIndex(string
const &URI
, string
const &Dist
, bool const Trusted
);
31 virtual ~debReleaseIndex();
33 virtual string
ArchiveURI(string
const &File
) const {return URI
+ File
;};
34 virtual bool GetIndexes(pkgAcquire
*Owner
, bool const &GetAll
=false) const;
35 vector
<struct IndexTarget
*>* ComputeIndexTargets() const;
36 string
Info(const char *Type
, string
const &Section
, string
const &Arch
="") const;
37 string
MetaIndexInfo(const char *Type
) const;
38 string
MetaIndexFile(const char *Types
) const;
39 string
MetaIndexURI(const char *Type
) const;
40 string
IndexURI(const char *Type
, string
const &Section
, string
const &Arch
="native") const;
41 string
IndexURISuffix(const char *Type
, string
const &Section
, string
const &Arch
="native") const;
42 string
SourceIndexURI(const char *Type
, const string
&Section
) const;
43 string
SourceIndexURISuffix(const char *Type
, const string
&Section
) const;
44 string
TranslationIndexURI(const char *Type
, const string
&Section
) const;
45 string
TranslationIndexURISuffix(const char *Type
, const string
&Section
) const;
46 virtual vector
<pkgIndexFile
*> *GetIndexFiles();
48 void SetTrusted(bool const Trusted
);
49 virtual bool IsTrusted() const;
51 void PushSectionEntry(vector
<string
> const &Archs
, const debSectionEntry
*Entry
);
52 void PushSectionEntry(string
const &Arch
, const debSectionEntry
*Entry
);
53 void PushSectionEntry(const debSectionEntry
*Entry
);