Added call log and German translation.
[jenirok] / src / common / cache.h
index f08b9d9..977159d 100644 (file)
 #ifndef CACHE_H
 #define CACHE_H
 
+#include <QtCore/QList>
+#include <QtCore/QPair>
 #include "source.h"
 
 class Cache
 {
 
 public:
+    struct LogDetails
+    {
+        Source::Result result;
+        int time;
+        bool missed;
+    };
+
+    static int const LOG_MAX_SIZE = 80;
+
     static Cache& instance();
     int clear();
     bool findItem(QString const& number, Source::Result& result);
     bool addItem(Source::Result const& result);
+    bool logItem(Source::Result const& result, bool missed, unsigned int time);
+    void getLogItems(QList<LogDetails>& items, int limit);
+    int clearLog();
 
 private:
     Cache();