Mercurial > dedupe
comparison FileDBLink.hpp @ 93:308a718812ba
Small refactoring to allow lazy commits.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Tue, 22 Oct 2013 11:53:54 +0200 |
| parents | f49023c61dac |
| children | c7da835ea912 |
comparison
equal
deleted
inserted
replaced
| 92:f49023c61dac | 93:308a718812ba |
|---|---|
| 3 | 3 |
| 4 #include <QtCore/QCryptographicHash> | 4 #include <QtCore/QCryptographicHash> |
| 5 #include <QtCore/QDateTime> | 5 #include <QtCore/QDateTime> |
| 6 #include <QtCore/QFileInfo> | 6 #include <QtCore/QFileInfo> |
| 7 | 7 |
| 8 class FileDBLink { | 8 class FileDBLink : public QObject { |
| 9 Q_OBJECT | |
| 9 public: | 10 public: |
| 10 class DBInfo { | 11 class DBInfo { |
| 11 public: | 12 public: |
| 12 DBInfo(const QString& path, quint64 size, | 13 DBInfo(const QString& path, quint64 size, |
| 13 const QDateTime& mtime, const QByteArray& hash) : path_(path), | 14 const QDateTime& mtime, const QByteArray& hash) : path_(path), |
| 106 | 107 |
| 107 static QByteArray | 108 static QByteArray |
| 108 computeHash(const QString& path, | 109 computeHash(const QString& path, |
| 109 QCryptographicHash::Algorithm = QCryptographicHash::Sha1); | 110 QCryptographicHash::Algorithm = QCryptographicHash::Sha1); |
| 110 | 111 |
| 112 signals: | |
| 113 void progressUpdate(int, int); | |
| 114 | |
| 111 public: | 115 public: |
| 112 enum DBStatus { NONE = 0, MTIME_DIFFERENT, SAME}; | 116 enum DBStatus { NONE = 0, MTIME_DIFFERENT, SAME}; |
| 113 | 117 |
| 114 virtual ~FileDBLink(); | 118 virtual ~FileDBLink(); |
| 115 | 119 |
