]>
git.saurik.com Git - apt.git/blob - apt-pkg/deb/debindexfile.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: debindexfile.h,v 1.3.2.1 2003/12/24 23:09:17 mdz Exp $
4 /* ######################################################################
8 There are three sorts currently
10 Package files that have File: tags
11 Package files that don't (/var/lib/dpkg/status)
14 ##################################################################### */
16 #ifndef PKGLIB_DEBINDEXFILE_H
17 #define PKGLIB_DEBINDEXFILE_H
21 #include <apt-pkg/indexfile.h>
23 class debStatusIndex
: public pkgIndexFile
30 virtual const Type
*GetType() const;
32 // Interface for acquire
33 virtual string
Describe(bool Short
) const {return File
;};
35 // Interface for the Cache Generator
36 virtual bool Exists() const;
37 virtual bool HasPackages() const {return true;};
38 virtual unsigned long Size() const;
39 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
*Prog
) const;
40 bool Merge(pkgCacheGenerator
&Gen
,OpProgress
*Prog
, unsigned long const Flag
) const;
41 virtual pkgCache::PkgFileIterator
FindInCache(pkgCache
&Cache
) const;
43 debStatusIndex(string File
);
46 class debPackagesIndex
: public pkgIndexFile
53 string
Info(const char *Type
) const;
54 string
IndexFile(const char *Type
) const;
55 string
IndexURI(const char *Type
) const;
59 virtual const Type
*GetType() const;
61 // Stuff for accessing files on remote items
62 virtual string
ArchiveInfo(pkgCache::VerIterator Ver
) const;
63 virtual string
ArchiveURI(string File
) const {return URI
+ File
;};
65 // Interface for acquire
66 virtual string
Describe(bool Short
) const;
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;
75 debPackagesIndex(string
const &URI
, string
const &Dist
, string
const &Section
,
76 bool const &Trusted
, string
const &Arch
= "native");
79 class debTranslationsIndex
: public pkgIndexFile
84 const char * const Language
;
86 string
Info(const char *Type
) const;
87 string
IndexFile(const char *Type
) const;
88 string
IndexURI(const char *Type
) const;
90 inline string
TranslationFile() const {return string("Translation-").append(Language
);};
94 virtual const Type
*GetType() const;
96 // Interface for acquire
97 virtual string
Describe(bool Short
) const;
98 virtual bool GetIndexes(pkgAcquire
*Owner
) const;
100 // Interface for the Cache Generator
101 virtual bool Exists() const;
102 virtual bool HasPackages() const;
103 virtual unsigned long Size() const;
104 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
*Prog
) const;
105 virtual pkgCache::PkgFileIterator
FindInCache(pkgCache
&Cache
) const;
107 debTranslationsIndex(string URI
,string Dist
,string Section
, char const * const Language
);
110 class debSourcesIndex
: public pkgIndexFile
116 string
Info(const char *Type
) const;
117 string
IndexFile(const char *Type
) const;
118 string
IndexURI(const char *Type
) const;
122 virtual const Type
*GetType() const;
124 // Stuff for accessing files on remote items
125 virtual string
SourceInfo(pkgSrcRecords::Parser
const &Record
,
126 pkgSrcRecords::File
const &File
) const;
127 virtual string
ArchiveURI(string File
) const {return URI
+ File
;};
129 // Interface for acquire
130 virtual string
Describe(bool Short
) const;
132 // Interface for the record parsers
133 virtual pkgSrcRecords::Parser
*CreateSrcParser() const;
135 // Interface for the Cache Generator
136 virtual bool Exists() const;
137 virtual bool HasPackages() const {return false;};
138 virtual unsigned long Size() const;
140 debSourcesIndex(string URI
,string Dist
,string Section
,bool Trusted
);