]> git.saurik.com Git - apt.git/blame - apt-pkg/deb/debindexfile.h
cherry pick test/integration/Packages-hashsum-verification addition from lp:~mvo...
[apt.git] / apt-pkg / deb / debindexfile.h
CommitLineData
b2e465d6
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
7db98ffc 3// $Id: debindexfile.h,v 1.3.2.1 2003/12/24 23:09:17 mdz Exp $
b2e465d6
AL
4/* ######################################################################
5
6 Debian Index Files
7
8 There are three sorts currently
9
10 Package files that have File: tags
11 Package files that don't (/var/lib/dpkg/status)
12 Source files
13
14 ##################################################################### */
15 /*}}}*/
16#ifndef PKGLIB_DEBINDEXFILE_H
17#define PKGLIB_DEBINDEXFILE_H
18
13500573 19
b2e465d6
AL
20
21#include <apt-pkg/indexfile.h>
22
23class debStatusIndex : public pkgIndexFile
24{
25 string File;
26
27 public:
28
29 virtual const Type *GetType() const;
30
31 // Interface for acquire
af87ab54 32 virtual string Describe(bool Short) const {return File;};
b2e465d6
AL
33
34 // Interface for the Cache Generator
35 virtual bool Exists() const;
36 virtual bool HasPackages() const {return true;};
37 virtual unsigned long Size() const;
2e5f4e45 38 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
b2e465d6
AL
39 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
40
41 debStatusIndex(string File);
42};
43
44class debPackagesIndex : public pkgIndexFile
45{
46 string URI;
47 string Dist;
48 string Section;
5dd4c8b8 49 string Architecture;
7db98ffc 50
b2e465d6
AL
51 string Info(const char *Type) const;
52 string IndexFile(const char *Type) const;
7db98ffc 53 string IndexURI(const char *Type) const;
b2e465d6
AL
54
55 public:
56
57 virtual const Type *GetType() const;
58
59 // Stuff for accessing files on remote items
60 virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
61 virtual string ArchiveURI(string File) const {return URI + File;};
62
63 // Interface for acquire
af87ab54 64 virtual string Describe(bool Short) const;
b2e465d6
AL
65
66 // Interface for the Cache Generator
67 virtual bool Exists() const;
68 virtual bool HasPackages() const {return true;};
69 virtual unsigned long Size() const;
2e5f4e45 70 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
b2e465d6 71 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
7db98ffc 72
5dd4c8b8
DK
73 debPackagesIndex(string const &URI, string const &Dist, string const &Section,
74 bool const &Trusted, string const &Arch = "native");
b2e465d6
AL
75};
76
a52f938b
OS
77class debTranslationsIndex : public pkgIndexFile
78{
79 string URI;
80 string Dist;
81 string Section;
45df0ad2 82 const char * const Language;
a52f938b
OS
83
84 string Info(const char *Type) const;
85 string IndexFile(const char *Type) const;
86 string IndexURI(const char *Type) const;
87
45df0ad2 88 inline string TranslationFile() const {return string("Translation-").append(Language);};
a52f938b
OS
89
90 public:
91
92 virtual const Type *GetType() const;
93
94 // Interface for acquire
95 virtual string Describe(bool Short) const;
96 virtual bool GetIndexes(pkgAcquire *Owner) const;
97
98 // Interface for the Cache Generator
99 virtual bool Exists() const;
11680bfd 100 virtual bool HasPackages() const;
a52f938b 101 virtual unsigned long Size() const;
2e5f4e45 102 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
c51c6f08 103 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
a52f938b 104
45df0ad2 105 debTranslationsIndex(string URI,string Dist,string Section, char const * const Language);
a52f938b
OS
106};
107
b2e465d6
AL
108class debSourcesIndex : public pkgIndexFile
109{
110 string URI;
111 string Dist;
112 string Section;
113
114 string Info(const char *Type) const;
115 string IndexFile(const char *Type) const;
7db98ffc 116 string IndexURI(const char *Type) const;
b2e465d6
AL
117
118 public:
119
120 virtual const Type *GetType() const;
121
122 // Stuff for accessing files on remote items
123 virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
124 pkgSrcRecords::File const &File) const;
125 virtual string ArchiveURI(string File) const {return URI + File;};
126
127 // Interface for acquire
af87ab54 128 virtual string Describe(bool Short) const;
b2e465d6
AL
129
130 // Interface for the record parsers
131 virtual pkgSrcRecords::Parser *CreateSrcParser() const;
132
133 // Interface for the Cache Generator
134 virtual bool Exists() const;
135 virtual bool HasPackages() const {return false;};
136 virtual unsigned long Size() const;
137
7db98ffc 138 debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
b2e465d6
AL
139};
140
141#endif