blob: e7d6f474ff9c4b0f30e4cebd552a0f4227cb6c76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef SYNCHRONIZATION_H_INCLUDED
#define SYNCHRONIZATION_H_INCLUDED
#include "FreeFileSync.h"
#include "library/statusHandler.h"
namespace FreeFileSync
{
void calcTotalBytesToSync(const FileCompareResult& fileCmpResult,
const SyncConfiguration& config,
int& objectsToCreate,
int& objectsToOverwrite,
int& objectsToDelete,
double& dataToProcess);
bool synchronizationNeeded(const FileCompareResult& fileCmpResult, const SyncConfiguration& config);
//class handling synchronization process
class SyncProcess
{
public:
SyncProcess(const bool useRecycler,
bool& warningSignificantDifference,
StatusHandler* handler);
void startSynchronizationProcess(FileCompareResult& grid, const SyncConfiguration& config) throw(AbortThisProcess);
private:
bool synchronizeFile(const FileCompareLine& cmpLine, const SyncConfiguration& config); //false if nothing had to be done
bool synchronizeFolder(const FileCompareLine& cmpLine, const SyncConfiguration& config); //false if nothing had to be done
const bool useRecycleBin;
bool& m_warningSignificantDifference;
StatusHandler* statusUpdater;
//preload status texts
Zstring txtCopyingFile;
Zstring txtOverwritingFile;
Zstring txtCreatingFolder;
Zstring txtDeletingFile;
Zstring txtDeletingFolder;
};
}
#endif // SYNCHRONIZATION_H_INCLUDED
|