1 #ifndef SEAFILE_CLIENT_RPC_SYNC_ERROR_H 2 #define SEAFILE_CLIENT_RPC_SYNC_ERROR_H 3 4 #include <QString> 5 #include <QMetaType> 6 7 struct _GObject; 8 9 class SyncError { 10 public: 11 int id; 12 QString repo_id; 13 QString repo_name; 14 QString path; 15 qint64 timestamp; 16 int error_id; 17 18 // Generated fields. 19 QString readable_time_stamp; 20 QString error_str; 21 22 static SyncError fromGObject(_GObject *obj); 23 24 void translateErrorStr(); 25 26 bool operator==(const SyncError& rhs) const { 27 return id == rhs.id 28 && repo_id == rhs.repo_id 29 && repo_name == rhs.repo_name 30 && path == rhs.path 31 && error_id == rhs.error_id 32 && timestamp == rhs.timestamp; 33 } 34 35 bool operator!=(const SyncError& rhs) const { 36 return !(*this == rhs); 37 } 38 }; 39 40 #endif // SEAFILE_CLIENT_RPC_SYNC_ERROR_H