]>
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;
52 string
IndexURI(const char *Type
) const;
56 virtual const Type
*GetType() const;
58 // Stuff for accessing files on remote items
59 virtual string
ArchiveInfo(pkgCache::VerIterator Ver
) const;
60 virtual string
ArchiveURI(string File
) const {return URI
+ File
;};
62 // Interface for acquire
63 virtual string
Describe(bool Short
) const;
65 // Interface for the Cache Generator
66 virtual bool Exists() const;
67 virtual bool HasPackages() const {return true;};
68 virtual unsigned long Size() const;
69 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
&Prog
) const;
70 virtual pkgCache::PkgFileIterator
FindInCache(pkgCache
&Cache
) const;
72 debPackagesIndex(string URI
,string Dist
,string Section
,bool Trusted
);
75 class debTranslationsIndex
: public pkgIndexFile
81 string
Info(const char *Type
) const;
82 string
IndexFile(const char *Type
) const;
83 string
IndexURI(const char *Type
) const;
85 inline string
TranslationFile() const {return "Translation-" + LanguageCode();};
89 virtual const Type
*GetType() const;
91 // Interface for acquire
92 virtual string
Describe(bool Short
) const;
93 virtual bool GetIndexes(pkgAcquire
*Owner
) const;
95 // Interface for the Cache Generator
96 virtual bool Exists() const;
97 virtual bool HasPackages() const;
98 virtual unsigned long Size() const;
99 virtual bool Merge(pkgCacheGenerator
&Gen
,OpProgress
&Prog
) const;
100 virtual pkgCache::PkgFileIterator
FindInCache(pkgCache
&Cache
) const;
102 debTranslationsIndex(string URI
,string Dist
,string Section
);
105 class debSourcesIndex
: public pkgIndexFile
111 string
Info(const char *Type
) const;
112 string
IndexFile(const char *Type
) const;
113 string
IndexURI(const char *Type
) const;
117 virtual const Type
*GetType() const;
119 // Stuff for accessing files on remote items
120 virtual string
SourceInfo(pkgSrcRecords::Parser
const &Record
,
121 pkgSrcRecords::File
const &File
) const;
122 virtual string
ArchiveURI(string File
) const {return URI
+ File
;};
124 // Interface for acquire
125 virtual string
Describe(bool Short
) const;
127 // Interface for the record parsers
128 virtual pkgSrcRecords::Parser
*CreateSrcParser() const;
130 // Interface for the Cache Generator
131 virtual bool Exists() const;
132 virtual bool HasPackages() const {return false;};
133 virtual unsigned long Size() const;
135 debSourcesIndex(string URI
,string Dist
,string Section
,bool Trusted
);