]>
git.saurik.com Git - apt.git/blob - apt-pkg/deb/deblistparser.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: deblistparser.h,v 1.8 1999/07/26 17:46:08 jgg Exp $
4 /* ######################################################################
6 Debian Package List Parser - This implements the abstract parser
7 interface for Debian package files
9 ##################################################################### */
11 // Header section: pkglib
12 #ifndef PKGLIB_DEBLISTPARSER_H
13 #define PKGLIB_DEBLISTPARSER_H
15 #include <apt-pkg/pkgcachegen.h>
16 #include <apt-pkg/tagfile.h>
18 class debListParser
: public pkgCacheGenerator::ListParser
21 pkgTagSection Section
;
22 unsigned long iOffset
;
32 unsigned long UniqFindTagWrite(const char *Tag
);
33 bool ParseStatus(pkgCache::PkgIterator Pkg
,pkgCache::VerIterator Ver
);
34 const char *ParseDepends(const char *Start
,const char *Stop
,
35 string
&Package
,string
&Ver
,unsigned int &Op
);
36 bool ParseDepends(pkgCache::VerIterator Ver
,const char *Tag
,
38 bool ParseProvides(pkgCache::VerIterator Ver
);
39 bool GrabWord(string Word
,WordList
*List
,int Count
,unsigned char &Out
);
43 // These all operate against the current section
44 virtual string
Package();
45 virtual string
Version();
46 virtual bool NewVersion(pkgCache::VerIterator Ver
);
47 virtual unsigned short VersionHash();
48 virtual bool UsePackage(pkgCache::PkgIterator Pkg
,
49 pkgCache::VerIterator Ver
);
50 virtual unsigned long Offset() {return iOffset
;};
51 virtual unsigned long Size() {return Section
.size();};
55 bool LoadReleaseInfo(pkgCache::PkgFileIterator FileI
,FileFd
&File
);
57 debListParser(FileFd
&File
);