2013-01-15 23:41:52 +04:00
|
|
|
#ifndef SYNCFILEITEM_H
|
|
|
|
#define SYNCFILEITEM_H
|
|
|
|
|
|
|
|
#include <QVector>
|
|
|
|
|
|
|
|
#include <csync.h>
|
|
|
|
|
|
|
|
namespace Mirall {
|
|
|
|
|
|
|
|
// FIXME: Unhack this.
|
|
|
|
class SyncFileItem {
|
|
|
|
public:
|
|
|
|
typedef enum {
|
2013-08-07 14:15:28 +04:00
|
|
|
None = 0,
|
|
|
|
Up,
|
|
|
|
Down } Direction;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
UnknownType,
|
|
|
|
File,
|
|
|
|
Directory,
|
|
|
|
SoftLink
|
|
|
|
} Type;
|
2013-01-15 23:41:52 +04:00
|
|
|
|
|
|
|
SyncFileItem() {}
|
|
|
|
|
|
|
|
bool operator==(const SyncFileItem& item) const {
|
|
|
|
return item._file == this->_file;
|
|
|
|
}
|
|
|
|
|
2013-02-14 19:25:00 +04:00
|
|
|
bool isEmpty() const {
|
|
|
|
return _file.isEmpty();
|
|
|
|
}
|
|
|
|
|
2013-01-15 23:41:52 +04:00
|
|
|
// variables
|
|
|
|
QString _file;
|
|
|
|
QString _renameTarget;
|
2013-08-15 10:15:30 +04:00
|
|
|
QString _errorString;
|
2013-01-15 23:41:52 +04:00
|
|
|
csync_instructions_e _instruction;
|
|
|
|
Direction _dir;
|
2013-08-07 14:15:28 +04:00
|
|
|
Type _type;
|
2013-01-15 23:41:52 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef QVector<SyncFileItem> SyncFileItemVector;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // SYNCFILEITEM_H
|