G++ 3.2 fixes
[ntk/apt.git] / apt-pkg / deb / debindexfile.h
CommitLineData
b2e465d6
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
af87ab54 3// $Id: debindexfile.h,v 1.3 2001/04/29 05:13:51 jgg 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;
51
52 string Info(const char *Type) const;
53 string IndexFile(const char *Type) const;
54 string IndexURI(const char *Type) const;
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 virtual bool GetIndexes(pkgAcquire *Owner) const;
67
68 // Interface for the Cache Generator
69 virtual bool Exists() const;
70 virtual bool HasPackages() const {return true;};
71 virtual unsigned long Size() const;
72 virtual bool Merge(pkgCacheGenerator &Gen,OpProgress &Prog) const;
73 virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
74
75 debPackagesIndex(string URI,string Dist,string Section);
76};
77
78class debSourcesIndex : public pkgIndexFile
79{
80 string URI;
81 string Dist;
82 string Section;
83
84 string Info(const char *Type) const;
85 string IndexFile(const char *Type) const;
86 string IndexURI(const char *Type) const;
87
88 public:
89
90 virtual const Type *GetType() const;
91
92 // Stuff for accessing files on remote items
93 virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
94 pkgSrcRecords::File const &File) const;
95 virtual string ArchiveURI(string File) const {return URI + File;};
96
97 // Interface for acquire
af87ab54 98 virtual string Describe(bool Short) const;
b2e465d6
AL
99 virtual bool GetIndexes(pkgAcquire *Owner) const;
100
101 // Interface for the record parsers
102 virtual pkgSrcRecords::Parser *CreateSrcParser() const;
103
104 // Interface for the Cache Generator
105 virtual bool Exists() const;
106 virtual bool HasPackages() const {return false;};
107 virtual unsigned long Size() const;
108
109 debSourcesIndex(string URI,string Dist,string Section);
110};
111
112#endif