]>
git.saurik.com Git - apt.git/blob - apt-pkg/indexrecords.h
2260a4ae1edb2202480cb46a58362bbf4adff007
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
8 #include <apt-pkg/hashes.h>
15 #ifndef APT_8_CLEANER_HEADERS
16 #include <apt-pkg/fileutl.h>
18 #ifndef APT_10_CLEANER_HEADERS
19 #include <apt-pkg/pkgcache.h>
24 bool parseSumData(const char *&Start
, const char *End
, std::string
&Name
,
25 std::string
&Hash
, unsigned long long &Size
);
28 std::string ErrorText
;
33 std::string ExpectedDist
;
36 std::map
<std::string
,checkSum
*> Entries
;
41 indexRecords(const std::string ExpectedDist
);
44 virtual checkSum
*Lookup(const std::string MetaKey
);
45 /** \brief tests if a checksum for this file is available */
46 bool Exists(std::string
const &MetaKey
) const;
47 std::vector
<std::string
> MetaKeys();
49 virtual bool Load(std::string Filename
);
50 std::string
GetDist() const;
51 std::string
GetSuite() const;
52 time_t GetValidUntil() const;
53 virtual bool CheckDist(const std::string MaybeDist
) const;
54 std::string
GetExpectedDist() const;
55 virtual ~indexRecords(){};
58 struct indexRecords::checkSum
60 std::string MetaKeyFilename
;
62 unsigned long long Size
;