Fix permissions again
[ntk/apt.git] / apt-pkg / indexfile.cc
CommitLineData
b2e465d6
AL
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
20static pkgIndexFile::Type *ItmList[10];
21pkgIndexFile::Type **pkgIndexFile::Type::GlobalList = ItmList;
22unsigned long pkgIndexFile::Type::GlobalListLen = 0;
23
24// Type::Type - Constructor /*{{{*/
25// ---------------------------------------------------------------------
26/* */
27pkgIndexFile::Type::Type()
28{
29 ItmList[GlobalListLen] = this;
30 GlobalListLen++;
31}
32 /*}}}*/
33// Type::GetType - Locate the type by name /*{{{*/
34// ---------------------------------------------------------------------
35/* */
36pkgIndexFile::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/* */
48bool 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/* */
56string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
57{
58 return string();
59}
60 /*}}}*/
61// IndexFile::FindInCache - Stub /*{{{*/
62// ---------------------------------------------------------------------
63/* */
64pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
65{
66 return pkgCache::PkgFileIterator(Cache);
67}
68 /*}}}*/
69// IndexFile::SourceIndex - Stub /*{{{*/
70// ---------------------------------------------------------------------
71/* */
72string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
73 pkgSrcRecords::File const &File) const
74{
75 return string();
76}
77 /*}}}*/