mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Rename csync_instructions_e -> SyncInsturctions
This commit is contained in:
parent
8cbdb4451b
commit
4d615c31da
12 changed files with 15 additions and 15 deletions
|
@ -103,7 +103,7 @@ Q_ENUM_NS(csync_status_codes_e)
|
|||
* Instruction enum. In the file traversal structure, it describes
|
||||
* the csync state of a file.
|
||||
*/
|
||||
enum csync_instructions_e {
|
||||
enum SyncInstructions {
|
||||
CSYNC_INSTRUCTION_NONE = 0, /* Nothing to do (UPDATE|RECONCILE) */
|
||||
CSYNC_INSTRUCTION_EVAL = 1 << 0, /* There was changed compared to the DB (UPDATE) */
|
||||
CSYNC_INSTRUCTION_REMOVE = 1 << 1, /* The file need to be removed (RECONCILE) */
|
||||
|
@ -122,7 +122,7 @@ enum csync_instructions_e {
|
|||
but without any propagation (UPDATE|RECONCILE) */
|
||||
};
|
||||
|
||||
Q_ENUM_NS(csync_instructions_e)
|
||||
Q_ENUM_NS(SyncInstructions)
|
||||
|
||||
// This enum is used with BITFIELD(3) and BITFIELD(4) in several places.
|
||||
// Also, this value is stored in the database, so beware of value changes.
|
||||
|
@ -196,7 +196,7 @@ struct OCSYNC_EXPORT csync_file_stat_s {
|
|||
|
||||
CSYNC_STATUS error_status = CSYNC_STATUS_OK;
|
||||
|
||||
enum csync_instructions_e instruction = CSYNC_INSTRUCTION_NONE; /* u32 */
|
||||
SyncInstructions instruction = CSYNC_INSTRUCTION_NONE; /* u32 */
|
||||
|
||||
csync_file_stat_s()
|
||||
: type(ItemTypeSkip)
|
||||
|
|
|
@ -40,7 +40,7 @@ Q_LOGGING_CATEGORY(lcCSyncUtils, "nextcloud.sync.csync.utils", QtInfoMsg)
|
|||
|
||||
struct _instr_code_struct {
|
||||
const char *instr_str;
|
||||
enum csync_instructions_e instr_code;
|
||||
SyncInstructions instr_code;
|
||||
};
|
||||
|
||||
struct csync_memstat_s {
|
||||
|
|
|
@ -39,7 +39,7 @@ QString SyncRunFileLog::directionToStr(SyncFileItem::Direction dir)
|
|||
return re;
|
||||
}
|
||||
|
||||
QString SyncRunFileLog::instructionToStr(csync_instructions_e inst)
|
||||
QString SyncRunFileLog::instructionToStr(SyncInstructions inst)
|
||||
{
|
||||
QString re;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
protected:
|
||||
private:
|
||||
QString dateTimeStr(const QDateTime &dt);
|
||||
QString instructionToStr(csync_instructions_e inst);
|
||||
QString instructionToStr(SyncInstructions inst);
|
||||
QString directionToStr(SyncFileItem::Direction dir);
|
||||
|
||||
QScopedPointer<QFile> _file;
|
||||
|
|
|
@ -159,7 +159,7 @@ QPair<bool, QByteArray> DiscoveryPhase::findAndCancelDeletedJob(const QString &o
|
|||
QByteArray oldEtag;
|
||||
auto it = _deletedItem.find(originalPath);
|
||||
if (it != _deletedItem.end()) {
|
||||
const csync_instructions_e instruction = (*it)->_instruction;
|
||||
const SyncInstructions instruction = (*it)->_instruction;
|
||||
if (instruction == CSYNC_INSTRUCTION_IGNORE && (*it)->_type == ItemTypeVirtualFile) {
|
||||
// re-creation of virtual files count as a delete
|
||||
// a file might be in an error state and thus gets marked as CSYNC_INSTRUCTION_IGNORE
|
||||
|
|
|
@ -193,7 +193,7 @@ bool SyncEngine::checkErrorBlacklisting(SyncFileItem &item)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool isFileTransferInstruction(csync_instructions_e instruction)
|
||||
static bool isFileTransferInstruction(SyncInstructions instruction)
|
||||
{
|
||||
return instruction == CSYNC_INSTRUCTION_CONFLICT
|
||||
|| instruction == CSYNC_INSTRUCTION_NEW
|
||||
|
|
|
@ -250,7 +250,7 @@ public:
|
|||
// usually this value is 1, but for removes on dirs, it might be much higher.
|
||||
|
||||
// Variables used by the propagator
|
||||
csync_instructions_e _instruction = CSYNC_INSTRUCTION_NONE;
|
||||
SyncInstructions _instruction = CSYNC_INSTRUCTION_NONE;
|
||||
time_t _modtime = 0;
|
||||
QByteArray _etag;
|
||||
qint64 _size = 0;
|
||||
|
|
|
@ -50,13 +50,13 @@ SyncFileItemPtr findDiscoveryItem(const SyncFileItemVector &spy, const QString &
|
|||
return SyncFileItemPtr(new SyncFileItem);
|
||||
}
|
||||
|
||||
bool itemInstruction(const ItemCompletedSpy &spy, const QString &path, const csync_instructions_e instr)
|
||||
bool itemInstruction(const ItemCompletedSpy &spy, const QString &path, const SyncInstructions instr)
|
||||
{
|
||||
auto item = spy.findItem(path);
|
||||
return item->_instruction == instr;
|
||||
}
|
||||
|
||||
bool discoveryInstruction(const SyncFileItemVector &spy, const QString &path, const csync_instructions_e instr)
|
||||
bool discoveryInstruction(const SyncFileItemVector &spy, const QString &path, const SyncInstructions instr)
|
||||
{
|
||||
auto item = findDiscoveryItem(spy, path);
|
||||
return item->_instruction == instr;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
using namespace OCC;
|
||||
|
||||
bool itemSuccessful(const ItemCompletedSpy &spy, const QString &path, const csync_instructions_e instr)
|
||||
bool itemSuccessful(const ItemCompletedSpy &spy, const QString &path, const SyncInstructions instr)
|
||||
{
|
||||
auto item = spy.findItem(path);
|
||||
return item->_status == SyncFileItem::Success && item->_instruction == instr;
|
||||
|
|
|
@ -19,7 +19,7 @@ bool itemDidComplete(const ItemCompletedSpy &spy, const QString &path)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool itemInstruction(const ItemCompletedSpy &spy, const QString &path, const csync_instructions_e instr)
|
||||
bool itemInstruction(const ItemCompletedSpy &spy, const QString &path, const SyncInstructions instr)
|
||||
{
|
||||
auto item = spy.findItem(path);
|
||||
return item->_instruction == instr;
|
||||
|
|
|
@ -35,7 +35,7 @@ struct OperationCounter {
|
|||
}
|
||||
};
|
||||
|
||||
bool itemSuccessful(const ItemCompletedSpy &spy, const QString &path, const csync_instructions_e instr)
|
||||
bool itemSuccessful(const ItemCompletedSpy &spy, const QString &path, const SyncInstructions instr)
|
||||
{
|
||||
auto item = spy.findItem(path);
|
||||
return item->_status == SyncFileItem::Success && item->_instruction == instr;
|
||||
|
|
|
@ -15,7 +15,7 @@ using namespace OCC;
|
|||
|
||||
#define DVSUFFIX APPLICATION_DOTVIRTUALFILE_SUFFIX
|
||||
|
||||
bool itemInstruction(const ItemCompletedSpy &spy, const QString &path, const csync_instructions_e instr)
|
||||
bool itemInstruction(const ItemCompletedSpy &spy, const QString &path, const SyncInstructions instr)
|
||||
{
|
||||
auto item = spy.findItem(path);
|
||||
return item->_instruction == instr;
|
||||
|
|
Loading…
Reference in a new issue