* debian/control:
[ntk/apt.git] / apt-pkg / indexrecords.h
index ac0df47..5b532c1 100644 (file)
@@ -8,9 +8,11 @@
 
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
 
 #include <map>
 #include <vector>
+#include <ctime>
 
 class indexRecords
 {
@@ -24,6 +26,8 @@ class indexRecords
    string Dist;
    string Suite;
    string ExpectedDist;
+   time_t ValidUntil;
+
    std::map<string,checkSum *> Entries;
 
    public:
@@ -33,10 +37,13 @@ class indexRecords
 
    // 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(){};
@@ -45,7 +52,7 @@ class indexRecords
 struct indexRecords::checkSum
 {
    string MetaKeyFilename;
-   string MD5Hash;
+   HashString Hash;
    size_t Size;      
 };