#ifndef PKGLIB_INDEXRECORDS_H
#define PKGLIB_INDEXRECORDS_H
-#ifdef __GNUG__
-#endif
+
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
#include <map>
#include <vector>
+#include <ctime>
class indexRecords
{
string Dist;
string Suite;
string ExpectedDist;
+ time_t ValidUntil;
+
std::map<string,checkSum *> Entries;
public:
// Lookup function
virtual const checkSum *Lookup(const string MetaKey);
+ /** \brief tests if a checksum for this file is available */
+ bool Exists(string const &MetaKey) const;
std::vector<std::string> MetaKeys();
virtual bool Load(string Filename);
string GetDist() const;
+ time_t GetValidUntil() const;
virtual bool CheckDist(const string MaybeDist) const;
string GetExpectedDist() const;
virtual ~indexRecords(){};
struct indexRecords::checkSum
{
string MetaKeyFilename;
- string MD5Hash;
+ HashString Hash;
size_t Size;
};