mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-28 16:13:53 +03:00
e1e8842548
The vio abstraction layer within csync is inneficient for the owncloud use case because not all calls maps well to the POSIX interface. We can be much more efficient by doing exactly what we need. Also, this will allow us to scedule better the calls and possibly to use threads.
48 lines
858 B
C++
48 lines
858 B
C++
#ifndef SYNCFILEITEM_H
|
|
#define SYNCFILEITEM_H
|
|
|
|
#include <QVector>
|
|
#include <QString>
|
|
|
|
#include <csync.h>
|
|
|
|
namespace Mirall {
|
|
|
|
// FIXME: Unhack this.
|
|
class SyncFileItem {
|
|
public:
|
|
typedef enum {
|
|
None = 0,
|
|
Up,
|
|
Down } Direction;
|
|
|
|
SyncFileItem() {}
|
|
|
|
friend bool operator==(const SyncFileItem& item1, const SyncFileItem& item2) {
|
|
return item1._file == item2._file;
|
|
}
|
|
|
|
friend bool operator<(const SyncFileItem& item1, const SyncFileItem& item2) {
|
|
return item1._file < item2._file;
|
|
}
|
|
|
|
bool isEmpty() const {
|
|
return _file.isEmpty();
|
|
}
|
|
|
|
// variables
|
|
QString _file;
|
|
QString _renameTarget;
|
|
csync_instructions_e _instruction;
|
|
Direction _dir;
|
|
bool _isDirectory;
|
|
time_t _modtime;
|
|
};
|
|
|
|
|
|
|
|
typedef QVector<SyncFileItem> SyncFileItemVector;
|
|
|
|
}
|
|
|
|
#endif // SYNCFILEITEM_H
|