2017-12-05 18:54:02 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "owncloudlib.h"
|
|
|
|
#include <QString>
|
2018-01-24 00:51:25 +03:00
|
|
|
#include <chrono>
|
2017-12-05 18:54:02 +03:00
|
|
|
|
|
|
|
|
|
|
|
namespace OCC {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Value class containing the options given to the sync engine
|
|
|
|
*/
|
|
|
|
struct SyncOptions
|
|
|
|
{
|
|
|
|
/** Maximum size (in Bytes) a folder can have without asking for confirmation.
|
|
|
|
* -1 means infinite */
|
|
|
|
qint64 _newBigFolderSizeLimit = -1;
|
|
|
|
|
|
|
|
/** If a confirmation should be asked for external storages */
|
|
|
|
bool _confirmExternalStorage = false;
|
|
|
|
|
2017-12-25 13:46:38 +03:00
|
|
|
/** If remotely deleted files are needed to move to trash */
|
|
|
|
bool _moveFilesToTrash = false;
|
|
|
|
|
2017-12-05 18:54:02 +03:00
|
|
|
/** The initial un-adjusted chunk size in bytes for chunked uploads, both
|
|
|
|
* for old and new chunking algorithm, which classifies the item to be chunked
|
|
|
|
*
|
|
|
|
* In chunkingNG, when dynamic chunk size adjustments are done, this is the
|
|
|
|
* starting value and is then gradually adjusted within the
|
|
|
|
* minChunkSize / maxChunkSize bounds.
|
|
|
|
*/
|
|
|
|
quint64 _initialChunkSize = 10 * 1000 * 1000; // 10MB
|
|
|
|
|
|
|
|
/** The minimum chunk size in bytes for chunked uploads */
|
|
|
|
quint64 _minChunkSize = 1 * 1000 * 1000; // 1MB
|
|
|
|
|
|
|
|
/** The maximum chunk size in bytes for chunked uploads */
|
|
|
|
quint64 _maxChunkSize = 100 * 1000 * 1000; // 100MB
|
|
|
|
|
|
|
|
/** The target duration of chunk uploads for dynamic chunk sizing.
|
|
|
|
*
|
|
|
|
* Set to 0 it will disable dynamic chunk sizing.
|
|
|
|
*/
|
2018-01-24 00:51:25 +03:00
|
|
|
std::chrono::milliseconds _targetChunkUploadDuration = std::chrono::minutes(1);
|
2017-12-05 18:54:02 +03:00
|
|
|
|
|
|
|
/** Whether parallel network jobs are allowed. */
|
|
|
|
bool _parallelNetworkJobs = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|