]> git.saurik.com Git - apt.git/blob - apt-pkg/indexfile.cc
* New no_NO.po file from Tollef Fog Heen <tfheen@debian...
[apt.git] / apt-pkg / indexfile.cc
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 // $Id: indexfile.cc,v 1.2 2001/02/20 07:03:17 jgg Exp $
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
45 // IndexFile::GetIndexes - Stub /*{{{*/
46 // ---------------------------------------------------------------------
47 /* */
48 bool pkgIndexFile::GetIndexes(pkgAcquire *Owner) const
49 {
50 return _error->Error("Internal Error, this index file is not downloadable");
51 }
52 /*}}}*/
53 // IndexFile::ArchiveInfo - Stub /*{{{*/
54 // ---------------------------------------------------------------------
55 /* */
56 string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
57 {
58 return string();
59 }
60 /*}}}*/
61 // IndexFile::FindInCache - Stub /*{{{*/
62 // ---------------------------------------------------------------------
63 /* */
64 pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
65 {
66 return pkgCache::PkgFileIterator(Cache);
67 }
68 /*}}}*/
69 // IndexFile::SourceIndex - Stub /*{{{*/
70 // ---------------------------------------------------------------------
71 /* */
72 string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
73 pkgSrcRecords::File const &File) const
74 {
75 return string();
76 }
77 /*}}}*/