]>
git.saurik.com Git - apt-legacy.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
29 virtual const Type
*GetType() const;
31 // Interface for acquire
32 virtual string
Describe(bool Short
) const {return File
;};
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;
41 debStatusIndex(string File
);
44 class debPackagesIndex
: public pkgIndexFile
50 string
Info(const char *Type
) const;
51 string
IndexFile(const char *Type
) const;
55 string
IndexURI(const char *Type
) const;
57 virtual const Type
*GetType() const;
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
;};
63 // Interface for acquire
64 virtual string
Describe(bool Short
) const;
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;
73 debPackagesIndex(string URI
,string Dist
,string Section
,bool Trusted
);
76 class debTranslationsIndex
: public pkgIndexFile
82 string
Info(const char *Type
) const;
83 string
IndexFile(const char *Type
) const;
84 string
IndexURI(const char *Type
) const;
86 inline string
TranslationFile() const {return "Translation-" + LanguageCode();};
90 virtual const Type
*GetType() const;
92 // Interface for acquire
93 virtual string
Describe(bool Short
) const;
94 virtual bool GetIndexes(pkgAcquire
*Owner
) const;
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;
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
);