]> git.saurik.com Git - apt.git/blame - apt-pkg/pkgrecords.h
Document "pre-auto" option for DSelect::Clean.
[apt.git] / apt-pkg / pkgrecords.h
CommitLineData
f55ece0e
AL
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
b2e465d6 3// $Id: pkgrecords.h,v 1.5 2001/02/20 07:03:17 jgg Exp $
f55ece0e
AL
4/* ######################################################################
5
6 Package Records - Allows access to complete package description records
7 directly from the file.
8
9 The package record system abstracts the actual parsing of the
10 package files. This is different than the generators parser in that
11 it is used to access information not generate information. No
12 information touched by the generator should be parable from here as
13 it can always be retreived directly from the cache.
14
15 ##################################################################### */
16 /*}}}*/
f55ece0e
AL
17#ifndef PKGLIB_PKGRECORDS_H
18#define PKGLIB_PKGRECORDS_H
19
20#ifdef __GNUG__
21#pragma interface "apt-pkg/pkgrecords.h"
22#endif
23
24#include <apt-pkg/pkgcache.h>
25#include <apt-pkg/fileutl.h>
26
27class pkgRecords
28{
29 public:
30 class Parser;
31
32 private:
33
34 pkgCache &Cache;
b2e465d6
AL
35 Parser **Files;
36
f55ece0e
AL
37 public:
38
39 // Lookup function
03e39e59
AL
40 Parser &Lookup(pkgCache::VerFileIterator const &Ver);
41
f55ece0e
AL
42 // Construct destruct
43 pkgRecords(pkgCache &Cache);
44 ~pkgRecords();
45};
46
47class pkgRecords::Parser
48{
7e798dd7 49 protected:
f55ece0e 50
03e39e59 51 virtual bool Jump(pkgCache::VerFileIterator const &Ver) = 0;
f55ece0e 52
7e798dd7 53 public:
b2e465d6 54 friend class pkgRecords;
7e798dd7
AL
55
56 // These refer to the archive file for the Version
57 virtual string FileName() {return string();};
58 virtual string MD5Hash() {return string();};
36375005 59 virtual string SourcePkg() {return string();};
b2e465d6 60
7e798dd7
AL
61 // These are some general stats about the package
62 virtual string Maintainer() {return string();};
63 virtual string ShortDesc() {return string();};
64 virtual string LongDesc() {return string();};
b2e465d6
AL
65 virtual string Name() {return string();};
66
67 // The record in binary form
68 virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
69
f55ece0e
AL
70 virtual ~Parser() {};
71};
72
73#endif