]> git.saurik.com Git - apt.git/blame - apt-pkg/deb/debmetaindex.h
move defines for version to macros.h
[apt.git] / apt-pkg / deb / debmetaindex.h
CommitLineData
b3d44315
MV
1// ijones, walters
2#ifndef PKGLIB_DEBMETAINDEX_H
3#define PKGLIB_DEBMETAINDEX_H
4
b3d44315 5#include <apt-pkg/metaindex.h>
7014e148 6#include <apt-pkg/init.h>
b3d44315 7
5dd4c8b8 8#include <map>
472ff00e
DK
9#include <string>
10#include <vector>
5dd4c8b8 11
b9dadc24
DK
12#ifndef APT_8_CLEANER_HEADERS
13#include <apt-pkg/sourcelist.h>
14#endif
15
b3d44315
MV
16class debReleaseIndex : public metaIndex {
17 public:
18
19 class debSectionEntry
20 {
21 public:
472ff00e
DK
22 debSectionEntry (std::string const &Section, bool const &IsSrc);
23 std::string const Section;
5dd4c8b8 24 bool const IsSrc;
b3d44315
MV
25 };
26
27 private:
ff72bd0d
MV
28 /** \brief dpointer placeholder (for later in case we need it) */
29 void *d;
472ff00e 30 std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries;
4b42f43b 31 enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
b3d44315
MV
32
33 public:
34
472ff00e
DK
35 debReleaseIndex(std::string const &URI, std::string const &Dist);
36 debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
ff72bd0d 37 virtual ~debReleaseIndex();
b3d44315 38
472ff00e 39 virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
5dd4c8b8 40 virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
472ff00e
DK
41 std::vector <struct IndexTarget *>* ComputeIndexTargets() const;
42 std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const;
7014e148 43
472ff00e
DK
44 std::string MetaIndexInfo(const char *Type) const;
45 std::string MetaIndexFile(const char *Types) const;
46 std::string MetaIndexURI(const char *Type) const;
7014e148
MV
47
48#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
49 virtual std::string LocalFileName() const;
50#endif
51
472ff00e
DK
52 std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const;
53 std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const;
54 std::string SourceIndexURI(const char *Type, const std::string &Section) const;
55 std::string SourceIndexURISuffix(const char *Type, const std::string &Section) const;
56 std::string TranslationIndexURI(const char *Type, const std::string &Section) const;
57 std::string TranslationIndexURISuffix(const char *Type, const std::string &Section) const;
58 virtual std::vector <pkgIndexFile *> *GetIndexFiles();
b3d44315 59
4b42f43b 60 void SetTrusted(bool const Trusted);
b3d44315
MV
61 virtual bool IsTrusted() const;
62
472ff00e
DK
63 void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry);
64 void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry);
b3d44315
MV
65 void PushSectionEntry(const debSectionEntry *Entry);
66};
67
68#endif