]>
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
20 #pragma interface "apt-pkg/debindexfile.h"
23 #include <apt-pkg/indexfile.h>
25 class debStatusIndex
: public pkgIndexFile
31 virtual const Type
*GetType() const;
33 // Interface for acquire
34 virtual string
Describe(bool Short
) const {return File
;};
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;
43 debStatusIndex(string File
);
46 class debPackagesIndex
: public pkgIndexFile
52 string
Info(const char *Type
) const;
53 string
IndexFile(const char *Type
) const;
54 string
IndexURI(const char *Type
) const;
58 virtual const Type
*GetType() const;
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
;};
64 // Interface for acquire
65 virtual string
Describe(bool Short
) const;
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;
74 debPackagesIndex(string URI
,string Dist
,string Section
,bool Trusted
);
77 class debTranslationsIndex
: public pkgIndexFile
83 string
Info(const char *Type
) const;
84 string
IndexFile(const char *Type
) const;
85 string
IndexURI(const char *Type
) const;
87 inline string
TranslationFile() const {return "Translation-" + LanguageCode();};
91 virtual const Type
*GetType() const;
93 // Interface for acquire
94 virtual string
Describe(bool Short
) const;
95 virtual bool GetIndexes(pkgAcquire
*Owner
) const;
97 // Interface for the Cache Generator
98 virtual bool Exists() const;
99 virtual bool HasPackages() const {return true;};
100 virtual unsigned long Size() const;
101 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
&Prog
) const;
103 debTranslationsIndex(string URI
,string Dist
,string Section
);
106 class debSourcesIndex
: public pkgIndexFile
112 string
Info(const char *Type
) const;
113 string
IndexFile(const char *Type
) const;
114 string
IndexURI(const char *Type
) const;
118 virtual const Type
*GetType() const;
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
;};
125 // Interface for acquire
126 virtual string
Describe(bool Short
) const;
128 // Interface for the record parsers
129 virtual pkgSrcRecords::Parser
*CreateSrcParser() const;
131 // Interface for the Cache Generator
132 virtual bool Exists() const;
133 virtual bool HasPackages() const {return false;};
134 virtual unsigned long Size() const;
136 debSourcesIndex(string URI
,string Dist
,string Section
,bool Trusted
);