]> git.saurik.com Git - apt-legacy.git/blame - apt-pkg/deb/debindexfile.h
Fix compilation of http when embedding into Cydia.
[apt-legacy.git] / apt-pkg / deb / debindexfile.h
CommitLineData
da6ee469
JF
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3// $Id: debindexfile.h,v 1.3.2.1 2003/12/24 23:09:17 mdz Exp $
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
00ec24d0 19
da6ee469
JF
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
32 virtual string Describe(bool Short) const {return File;};
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;
38 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
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;
49
50 string Info(const char *Type) const;
51 string IndexFile(const char *Type) const;
da6ee469
JF
52
53 public:
acdafb44
JF
54
55 string IndexURI(const char *Type) const;
da6ee469
JF
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
64 virtual string Describe(bool Short) const;
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;
70 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
71 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
72
73 debPackagesIndex(string URI,string Dist,string Section,bool Trusted);
74};
75
00ec24d0
JF
76class debTranslationsIndex : public pkgIndexFile
77{
78 string URI;
79 string Dist;
80 string Section;
81
82 string Info(const char *Type) const;
83 string IndexFile(const char *Type) const;
84 string IndexURI(const char *Type) const;
85
86 inline string TranslationFile() const {return "Translation-" + LanguageCode();};
87
88 public:
89
90 virtual const Type *GetType() const;
91
92 // Interface for acquire
93 virtual string Describe(bool Short) const;
94 virtual bool GetIndexes(pkgAcquire *Owner) const;
95
96 // Interface for the Cache Generator
97 virtual bool Exists() const;
98 virtual bool HasPackages() const;
99 virtual unsigned long Size() const;
100 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
101 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
102
103 debTranslationsIndex(string URI,string Dist,string Section);
104};
105
da6ee469
JF
106class debSourcesIndex : public pkgIndexFile
107{
108 string URI;
109 string Dist;
110 string Section;
111
112 string Info(const char *Type) const;
113 string IndexFile(const char *Type) const;
114 string IndexURI(const char *Type) const;
115
116 public:
117
118 virtual const Type *GetType() const;
119
120 // Stuff for accessing files on remote items
121 virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
122 pkgSrcRecords::File const &File) const;
123 virtual string ArchiveURI(string File) const {return URI + File;};
124
125 // Interface for acquire
126 virtual string Describe(bool Short) const;
127
128 // Interface for the record parsers
129 virtual pkgSrcRecords::Parser *CreateSrcParser() const;
130
131 // Interface for the Cache Generator
132 virtual bool Exists() const;
133 virtual bool HasPackages() const {return false;};
134 virtual unsigned long Size() const;
135
136 debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
137};
138
139#endif