diff --git a/src/common/vfs.h b/src/common/vfs.h index 73c9dc9b7aa..eb8e14e16f2 100644 --- a/src/common/vfs.h +++ b/src/common/vfs.h @@ -14,6 +14,7 @@ #pragma once #include "assert.h" +#include "csync/csync.h" #include "ocsynclib.h" #include "pinstate.h" #include "result.h" @@ -27,8 +28,6 @@ #include -typedef struct csync_file_stat_s csync_file_stat_t; - namespace OCC { class Account; diff --git a/src/csync/csync.h b/src/csync/csync.h index cfbd03ffb1a..91cb35cc32d 100644 --- a/src/csync/csync.h +++ b/src/csync/csync.h @@ -160,48 +160,36 @@ Q_ENUM_NS(ItemType) using namespace CSyncEnums; using CSYNC_STATUS = CSyncEnums::csync_status_codes_e; -typedef struct csync_file_stat_s csync_file_stat_t; - -struct OCSYNC_EXPORT csync_file_stat_s { - time_t modtime; - int64_t size; - uint64_t inode; - - OCC::RemotePermissions remotePerm; - ItemType type; - bool child_modified; - bool has_ignored_files; // Specify that a directory, or child directory contains ignored files. - bool is_hidden; // Not saved in the DB, only used during discovery for local files. - - QByteArray path; - QByteArray rename_path; - QByteArray etag; - QByteArray file_id; - QByteArray directDownloadUrl; - QByteArray directDownloadCookies; - QByteArray original_path; // only set if locale conversion fails - - // In the local tree, this can hold a checksum and its type if it is - // computed during discovery for some reason. - // In the remote tree, this will have the server checksum, if available. - // In both cases, the format is "SHA1:baff". - QByteArray checksumHeader; - - CSYNC_STATUS error_status; - - SyncInstructions instruction; /* u32 */ - - csync_file_stat_s() - : modtime(0) - , size(0) - , inode(0) - , type(ItemTypeSkip) - , child_modified(false) - , has_ignored_files(false) - , is_hidden(false) - , error_status(CSYNC_STATUS_OK) - , instruction(CSYNC_INSTRUCTION_NONE) - { } + +struct OCSYNC_EXPORT csync_file_stat_t +{ + time_t modtime = 0; + int64_t size = 0; + uint64_t inode = 0; + + OCC::RemotePermissions remotePerm; + ItemType type = ItemTypeSkip; + bool child_modified = false; + bool has_ignored_files = false; // Specify that a directory, or child directory contains ignored files. + bool is_hidden = false; // Not saved in the DB, only used during discovery for local files. + + QByteArray path; + QByteArray rename_path; + QByteArray etag; + QByteArray file_id; + QByteArray directDownloadUrl; + QByteArray directDownloadCookies; + QByteArray original_path; // only set if locale conversion fails + + // In the local tree, this can hold a checksum and its type if it is + // computed during discovery for some reason. + // In the remote tree, this will have the server checksum, if available. + // In both cases, the format is "SHA1:baff". + QByteArray checksumHeader; + + CSYNC_STATUS error_status = CSYNC_STATUS_OK; + + SyncInstructions instruction = CSYNC_INSTRUCTION_NONE; }; OCSYNC_EXPORT QDebug operator<<(QDebug debug, const SyncInstructions &job);