]>
Commit | Line | Data |
---|---|---|
b2e465d6 AL |
1 | // -*- mode: cpp; mode: fold -*- |
2 | // Description /*{{{*/ | |
7db98ffc | 3 | // $Id: indexfile.cc,v 1.2.2.1 2003/12/24 23:09:17 mdz Exp $ |
b2e465d6 AL |
4 | /* ###################################################################### |
5 | ||
6 | Index File - Abstraction for an index of archive/souce file. | |
7 | ||
8 | ##################################################################### */ | |
9 | /*}}}*/ | |
10 | // Include Files /*{{{*/ | |
11 | #ifdef __GNUG__ | |
12 | #pragma implementation "apt-pkg/indexfile.h" | |
13 | #endif | |
14 | ||
15 | #include <apt-pkg/indexfile.h> | |
16 | #include <apt-pkg/error.h> | |
17 | /*}}}*/ | |
18 | ||
19 | // Global list of Item supported | |
20 | static pkgIndexFile::Type *ItmList[10]; | |
21 | pkgIndexFile::Type **pkgIndexFile::Type::GlobalList = ItmList; | |
22 | unsigned long pkgIndexFile::Type::GlobalListLen = 0; | |
23 | ||
24 | // Type::Type - Constructor /*{{{*/ | |
25 | // --------------------------------------------------------------------- | |
26 | /* */ | |
27 | pkgIndexFile::Type::Type() | |
28 | { | |
29 | ItmList[GlobalListLen] = this; | |
30 | GlobalListLen++; | |
31 | } | |
32 | /*}}}*/ | |
33 | // Type::GetType - Locate the type by name /*{{{*/ | |
34 | // --------------------------------------------------------------------- | |
35 | /* */ | |
36 | pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type) | |
37 | { | |
38 | for (unsigned I = 0; I != GlobalListLen; I++) | |
39 | if (strcmp(GlobalList[I]->Label,Type) == 0) | |
40 | return GlobalList[I]; | |
41 | return 0; | |
42 | } | |
43 | /*}}}*/ | |
44 | ||
b2e465d6 AL |
45 | // IndexFile::ArchiveInfo - Stub /*{{{*/ |
46 | // --------------------------------------------------------------------- | |
47 | /* */ | |
48 | string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const | |
49 | { | |
50 | return string(); | |
51 | } | |
52 | /*}}}*/ | |
53 | // IndexFile::FindInCache - Stub /*{{{*/ | |
54 | // --------------------------------------------------------------------- | |
55 | /* */ | |
56 | pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const | |
57 | { | |
58 | return pkgCache::PkgFileIterator(Cache); | |
59 | } | |
60 | /*}}}*/ | |
61 | // IndexFile::SourceIndex - Stub /*{{{*/ | |
62 | // --------------------------------------------------------------------- | |
63 | /* */ | |
64 | string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record, | |
65 | pkgSrcRecords::File const &File) const | |
66 | { | |
67 | return string(); | |
68 | } | |
69 | /*}}}*/ |