]>
git.saurik.com Git - apt.git/blob - apt-pkg/indexfile.cc
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: indexfile.cc,v 1.2.2.1 2003/12/24 23:09:17 mdz Exp $
4 /* ######################################################################
6 Index File - Abstraction for an index of archive/souce file.
8 ##################################################################### */
10 // Include Files /*{{{*/
11 #include <apt-pkg/indexfile.h>
12 #include <apt-pkg/error.h>
15 // Global list of Item supported
16 static pkgIndexFile::Type
*ItmList
[10];
17 pkgIndexFile::Type
**pkgIndexFile::Type::GlobalList
= ItmList
;
18 unsigned long pkgIndexFile::Type::GlobalListLen
= 0;
20 // Type::Type - Constructor /*{{{*/
21 // ---------------------------------------------------------------------
23 pkgIndexFile::Type::Type()
25 ItmList
[GlobalListLen
] = this;
29 // Type::GetType - Locate the type by name /*{{{*/
30 // ---------------------------------------------------------------------
32 pkgIndexFile::Type
*pkgIndexFile::Type::GetType(const char *Type
)
34 for (unsigned I
= 0; I
!= GlobalListLen
; I
++)
35 if (strcmp(GlobalList
[I
]->Label
,Type
) == 0)
41 // IndexFile::ArchiveInfo - Stub /*{{{*/
42 // ---------------------------------------------------------------------
44 string
pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver
) const
49 // IndexFile::FindInCache - Stub /*{{{*/
50 // ---------------------------------------------------------------------
52 pkgCache::PkgFileIterator
pkgIndexFile::FindInCache(pkgCache
&Cache
) const
54 return pkgCache::PkgFileIterator(Cache
);
57 // IndexFile::SourceIndex - Stub /*{{{*/
58 // ---------------------------------------------------------------------
60 string
pkgIndexFile::SourceInfo(pkgSrcRecords::Parser
const &Record
,
61 pkgSrcRecords::File
const &File
) const