]>
git.saurik.com Git - apt.git/blob - apt-pkg/indexrecords.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: indexrecords.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
5 #ifndef PKGLIB_INDEXRECORDS_H
6 #define PKGLIB_INDEXRECORDS_H
9 #include <apt-pkg/pkgcache.h>
10 #include <apt-pkg/fileutl.h>
11 #include <apt-pkg/hashes.h>
19 bool parseSumData(const char *&Start
, const char *End
, string
&Name
,
20 string
&Hash
, unsigned long long &Size
);
31 std::map
<string
,checkSum
*> Entries
;
36 indexRecords(const string ExpectedDist
);
39 virtual const checkSum
*Lookup(const string MetaKey
);
40 /** \brief tests if a checksum for this file is available */
41 bool Exists(string
const &MetaKey
) const;
42 std::vector
<std::string
> MetaKeys();
44 virtual bool Load(string Filename
);
45 string
GetDist() const;
46 time_t GetValidUntil() const;
47 virtual bool CheckDist(const string MaybeDist
) const;
48 string
GetExpectedDist() const;
49 virtual ~indexRecords(){};
52 struct indexRecords::checkSum
54 string MetaKeyFilename
;
56 unsigned long long Size
;