Mercurial > dedupe
comparison FileDBLink.hpp @ 2:2833b7f8884a
Sql backend is working.
Need to get more speed on comparisson.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Tue, 21 Aug 2012 14:25:33 +0200 |
| parents | aae83c0a771d |
| children | 5e4985407feb |
comparison
equal
deleted
inserted
replaced
| 1:aae83c0a771d | 2:2833b7f8884a |
|---|---|
| 89 | 89 |
| 90 static QSharedPointer<DBInfo> computedValue(const QSharedPointer<DBInfo>& info, const QList<QSharedPointer<DBInfo> >&); | 90 static QSharedPointer<DBInfo> computedValue(const QSharedPointer<DBInfo>& info, const QList<QSharedPointer<DBInfo> >&); |
| 91 | 91 |
| 92 | 92 |
| 93 public: | 93 public: |
| 94 enum DBStatus { NONE = 0, MTIME_DIFFERENT, SAME}; | |
| 95 | |
| 94 virtual ~FileDBLink() {} | 96 virtual ~FileDBLink() {} |
| 95 | 97 |
| 96 void updateIfModified(const QString& path); | 98 void updateIfModified(const QString& path); |
| 97 virtual void addFile(const QString& path, qint64 size, const QDateTime& dtime, const QCryptographicHash& hash) = 0; | 99 |
| 100 virtual void addFile(const QString& path, qint64 size, const QDateTime& dtime, const QByteArray& hash) = 0; | |
| 98 void addFile(const QString& path, qint64 size, const QDateTime& dtime); | 101 void addFile(const QString& path, qint64 size, const QDateTime& dtime); |
| 99 void addFile(const QFileInfo& fileinfo); | 102 void addFile(const QFileInfo& fileinfo); |
| 103 | |
| 104 virtual void updateFile(const QString& path, qint64 size, const QDateTime& dtime, const QByteArray& hash) = 0; | |
| 105 void updateFile(const QString& path, qint64 size, const QDateTime& dtime); | |
| 106 void updateFile(const QFileInfo& fileinfo); | |
| 107 | |
| 100 virtual bool exists(const QString& path) = 0; | 108 virtual bool exists(const QString& path) = 0; |
| 101 virtual const QList<QSharedPointer<DBInfo> > values() const = 0; | 109 virtual DBStatus existsWithMtime(const QString& path, const QDateTime& mtime) = 0; |
| 102 virtual const QList<QSharedPointer<DBInfo> > computedValues() const; | 110 |
| 111 virtual const QList<QSharedPointer<DBInfo> > values(const QString& prefix = QString() ) const = 0; | |
| 112 virtual const QList<QSharedPointer<DBInfo> > computedValues(const QString& prefix = QString() ) const; | |
| 103 | 113 |
| 104 enum SORTORDER { PATH, SIZE, MTIME, CHECKSUM, EDIT }; | 114 enum SORTORDER { PATH, SIZE, MTIME, CHECKSUM, EDIT }; |
| 105 | 115 |
| 106 virtual const QList<QSharedPointer<DBInfo> > sortOn(SORTORDER order, bool extended = false); | 116 virtual const QList<QSharedPointer<DBInfo> > sortOn(const QString& prefix, SORTORDER order, bool extended = false); |
| 107 }; | 117 }; |
| 108 | 118 |
| 109 #endif //FILEDBLINK | 119 #endif //FILEDBLINK |
