]>
Commit | Line | Data |
---|---|---|
f55a958f AL |
1 | // -*- mode: cpp; mode: fold -*- |
2 | // Description /*{{{*/ | |
3 | // $Id: deblistparser.h,v 1.1 1998/07/04 05:58:08 jgg Exp $ | |
4 | /* ###################################################################### | |
5 | ||
6 | Debian Package List Parser - This implements the abstract parser | |
7 | interface for Debian package files | |
8 | ||
9 | ##################################################################### */ | |
10 | /*}}}*/ | |
11 | // Header section: pkglib | |
12 | #ifndef PKGLIB_DEBLISTPARSER_H | |
13 | #define PKGLIB_DEBLISTPARSER_H | |
14 | ||
15 | #include <pkglib/pkgcachegen.h> | |
16 | #include <pkglib/tagfile.h> | |
17 | ||
18 | class debListParser : public pkgCacheGenerator::ListParser | |
19 | { | |
20 | pkgTagFile Tags; | |
21 | pkgTagSection Section; | |
22 | ||
23 | // Parser Helper | |
24 | struct WordList | |
25 | { | |
26 | char *Str; | |
27 | unsigned char Val; | |
28 | }; | |
29 | ||
30 | string FindTag(const char *Tag); | |
31 | unsigned long UniqFindTagWrite(const char *Tag); | |
32 | bool HandleFlag(const char *Tag,unsigned long &Flags,unsigned long Flag); | |
33 | bool ParseStatus(pkgCache::PkgIterator Pkg,pkgCache::VerIterator Ver); | |
34 | bool GrabWord(string Word,WordList *List,int Count,unsigned char &Out); | |
35 | ||
36 | public: | |
37 | ||
38 | // These all operate against the current section | |
39 | virtual string Package(); | |
40 | virtual string Version(); | |
41 | virtual bool NewVersion(pkgCache::VerIterator Ver); | |
42 | virtual bool NewPackage(pkgCache::PkgIterator Pkg); | |
43 | virtual bool UsePackage(pkgCache::PkgIterator Pkg, | |
44 | pkgCache::VerIterator Ver); | |
45 | ||
46 | virtual bool Step(); | |
47 | ||
48 | debListParser(File &File); | |
49 | }; | |
50 | ||
51 | #endif |