]> git.saurik.com Git - apt.git/blame - apt-pkg/deb/debindexfile.h
* merged with the current auto-mark branch
[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
19#ifdef __GNUG__
20#pragma interface "apt-pkg/debindexfile.h"
21#endif
22
23#include <apt-pkg/indexfile.h>
24
25class debStatusIndex : public pkgIndexFile
26{
27 string File;
28
29 public:
30
31 virtual const Type *GetType() const;
32
33 // Interface for acquire
af87ab54 34 virtual string Describe(bool Short) const {return File;};
b2e465d6
AL
35
36 // Interface for the Cache Generator
37 virtual bool Exists() const;
38 virtual bool HasPackages() const {return true;};
39 virtual unsigned long Size() const;
40 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
41 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
42
43 debStatusIndex(string File);
44};
45
46class debPackagesIndex : public pkgIndexFile
47{
48 string URI;
49 string Dist;
50 string Section;
7db98ffc 51
b2e465d6
AL
52 string Info(const char *Type) const;
53 string IndexFile(const char *Type) const;
7db98ffc 54 string IndexURI(const char *Type) const;
b2e465d6
AL
55
56 public:
57
58 virtual const Type *GetType() const;
59
60 // Stuff for accessing files on remote items
61 virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
62 virtual string ArchiveURI(string File) const {return URI + File;};
63
64 // Interface for acquire
af87ab54 65 virtual string Describe(bool Short) const;
b2e465d6
AL
66
67 // Interface for the Cache Generator
68 virtual bool Exists() const;
69 virtual bool HasPackages() const {return true;};
70 virtual unsigned long Size() const;
71 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
72 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
7db98ffc
MZ
73
74 debPackagesIndex(string URI,string Dist,string Section,bool Trusted);
b2e465d6
AL
75};
76
a52f938b
OS
77class debTranslationsIndex : public pkgIndexFile
78{
79 string URI;
80 string Dist;
81 string Section;
82
83 string Info(const char *Type) const;
84 string IndexFile(const char *Type) const;
85 string IndexURI(const char *Type) const;
86
87 inline string TranslationFile() const {return "Translation-" + LanguageCode();};
88
89 public:
90
91 virtual const Type *GetType() const;
92
93 // Interface for acquire
94 virtual string Describe(bool Short) const;
95 virtual bool GetIndexes(pkgAcquire *Owner) const;
96
97 // Interface for the Cache Generator
98 virtual bool Exists() const;
11680bfd 99 virtual bool HasPackages() const;
a52f938b
OS
100 virtual unsigned long Size() const;
101 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
c51c6f08 102 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
a52f938b
OS
103
104 debTranslationsIndex(string URI,string Dist,string Section);
105};
106
b2e465d6
AL
107class debSourcesIndex : public pkgIndexFile
108{
109 string URI;
110 string Dist;
111 string Section;
112
113 string Info(const char *Type) const;
114 string IndexFile(const char *Type) const;
7db98ffc 115 string IndexURI(const char *Type) const;
b2e465d6
AL
116
117 public:
118
119 virtual const Type *GetType() const;
120
121 // Stuff for accessing files on remote items
122 virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
123 pkgSrcRecords::File const &File) const;
124 virtual string ArchiveURI(string File) const {return URI + File;};
125
126 // Interface for acquire
af87ab54 127 virtual string Describe(bool Short) const;
b2e465d6
AL
128
129 // Interface for the record parsers
130 virtual pkgSrcRecords::Parser *CreateSrcParser() const;
131
132 // Interface for the Cache Generator
133 virtual bool Exists() const;
134 virtual bool HasPackages() const {return false;};
135 virtual unsigned long Size() const;
136
7db98ffc 137 debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
b2e465d6
AL
138};
139
140#endif