]> git.saurik.com Git - apt.git/blame - apt-pkg/indexrecords.h
- add --arch option for apt-ftparchive packages and contents commands
[apt.git] / apt-pkg / indexrecords.h
CommitLineData
7db98ffc
MZ
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3// $Id: indexrecords.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
4 /*}}}*/
5#ifndef PKGLIB_INDEXRECORDS_H
6#define PKGLIB_INDEXRECORDS_H
7
be009af2 8
7db98ffc
MZ
9#include <apt-pkg/pkgcache.h>
10#include <apt-pkg/fileutl.h>
495e5cb2 11#include <apt-pkg/hashes.h>
7db98ffc
MZ
12
13#include <map>
a75c6a6e 14#include <vector>
7db98ffc
MZ
15
16class indexRecords
17{
18 bool parseSumData(const char *&Start, const char *End, string &Name,
19 string &Hash, size_t &Size);
20 public:
21 struct checkSum;
22 string ErrorText;
23
24 protected:
25 string Dist;
26 string Suite;
27 string ExpectedDist;
28 std::map<string,checkSum *> Entries;
29
30 public:
31
32 indexRecords();
33 indexRecords(const string ExpectedDist);
34
35 // Lookup function
36 virtual const checkSum *Lookup(const string MetaKey);
a75c6a6e
MZ
37 std::vector<std::string> MetaKeys();
38
7db98ffc
MZ
39 virtual bool Load(string Filename);
40 string GetDist() const;
41 virtual bool CheckDist(const string MaybeDist) const;
42 string GetExpectedDist() const;
43 virtual ~indexRecords(){};
44};
45
46struct indexRecords::checkSum
47{
48 string MetaKeyFilename;
495e5cb2 49 HashString Hash;
7db98ffc
MZ
50 size_t Size;
51};
52
53#endif