nextcloud-desktop/src/mirall/syncfileitem.h
Olivier Goffart e1e8842548 New owncloud propagator that skip the vio abstraction layer
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.
2013-05-04 11:02:30 +02:00

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