merged from debian-apt
[ntk/apt.git] / apt-pkg / deb / debrecords.h
CommitLineData
f55ece0e
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
a7c835af 3// $Id: debrecords.h,v 1.8 2001/03/13 06:51:46 jgg Exp $
f55ece0e
AL
4/* ######################################################################
5
6 Debian Package Records - Parser for debian package records
7
8 This provides display-type parsing for the Packages file. This is
9 different than the the list parser which provides cache generation
10 services. There should be no overlap between these two.
11
12 ##################################################################### */
13 /*}}}*/
f55ece0e
AL
14#ifndef PKGLIB_DEBRECORDS_H
15#define PKGLIB_DEBRECORDS_H
16
f55ece0e 17#include <apt-pkg/pkgrecords.h>
a52f938b 18#include <apt-pkg/indexfile.h>
f55ece0e
AL
19#include <apt-pkg/tagfile.h>
20
21class debRecordParser : public pkgRecords::Parser
22{
ff72bd0d
MV
23 /** \brief dpointer placeholder (for later in case we need it) */
24 void *d;
25
b2e465d6 26 FileFd File;
f55ece0e
AL
27 pkgTagFile Tags;
28 pkgTagSection Section;
b2e465d6 29
7e798dd7
AL
30 protected:
31
03e39e59 32 virtual bool Jump(pkgCache::VerFileIterator const &Ver);
a52f938b 33 virtual bool Jump(pkgCache::DescFileIterator const &Desc);
f55ece0e
AL
34
35 public:
7e798dd7
AL
36
37 // These refer to the archive file for the Version
38 virtual string FileName();
39 virtual string MD5Hash();
a7c835af 40 virtual string SHA1Hash();
495e5cb2 41 virtual string SHA256Hash();
d9b9e9e2 42 virtual string SHA512Hash();
36375005 43 virtual string SourcePkg();
c2f2b862 44 virtual string SourceVer();
f55ece0e 45
7e798dd7
AL
46 // These are some general stats about the package
47 virtual string Maintainer();
48 virtual string ShortDesc();
49 virtual string LongDesc();
b2e465d6 50 virtual string Name();
f27b4a70 51 virtual string Homepage();
b2e465d6
AL
52
53 virtual void GetRec(const char *&Start,const char *&Stop);
f55ece0e 54
b2e465d6 55 debRecordParser(string FileName,pkgCache &Cache);
ff72bd0d 56 virtual ~debRecordParser() {};
f55ece0e
AL
57};
58
f55ece0e 59#endif