]> git.saurik.com Git - apt.git/blame - apt-pkg/metaindex.cc
make all d-pointer * const pointers
[apt.git] / apt-pkg / metaindex.cc
CommitLineData
f105aaba 1// Include Files /*{{{*/
b07aeb1a 2#include <apt-pkg/pkgcachegen.h>
f105aaba
DK
3#include <apt-pkg/indexfile.h>
4#include <apt-pkg/metaindex.h>
5
6#include <stddef.h>
7
8#include <string>
9#include <vector>
10 /*}}}*/
11
12#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13)
13std::string metaIndex::LocalFileName() const { return ""; }
14#else
15#include <apt-pkg/debmetaindex.h>
16std::string metaIndex::LocalFileName() const
17{
18 debReleaseIndex const * deb = dynamic_cast<debReleaseIndex const*>(this);
19 if (deb != NULL)
20 return deb->LocalFileName();
21
22 return "";
23}
24#endif
25
b07aeb1a
DK
26std::string metaIndex::Describe() const
27{
28 return "Release";
29}
30
3fd89e62 31pkgCache::RlsFileIterator metaIndex::FindInCache(pkgCache &Cache, bool const) const
b07aeb1a
DK
32{
33 return pkgCache::RlsFileIterator(Cache);
34}
35
36bool metaIndex::Merge(pkgCacheGenerator &Gen,OpProgress *) const
37{
38 return Gen.SelectReleaseFile("", "");
39}
40
41
f105aaba
DK
42metaIndex::metaIndex(std::string const &URI, std::string const &Dist,
43 char const * const Type)
6c55f07a 44: d(NULL), Indexes(NULL), Type(Type), URI(URI), Dist(Dist), Trusted(false)
f105aaba
DK
45{
46 /* nothing */
47}
48
49metaIndex::~metaIndex()
50{
51 if (Indexes == 0)
52 return;
53 for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin();
54 I != (*Indexes).end(); ++I)
55 delete *I;
56 delete Indexes;
57}