5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #ifndef _PROCESS_SYNC_H_
22 #define _PROCESS_SYNC_H_
29 class SyncProcess
: public QObject
41 enum SyncCompareType
{
48 SyncProcess(const QString
& folderA
,
49 const QString
& folderB
,
50 const int & syncDirection
= SYNC_A2B_B2A
,
51 const int & compareType
= OVERWR_NEWER_IF_DIFF
,
52 const qint64
& maxFileSize
= 5*1024*1024,
53 const bool dryRun
= false);
62 void fileCountChanged(int count
);
63 void progressStep(int step
);
64 void progressMessage(const QString
& text
, const int & type
);
65 void statusMessage(const QString
& text
);
68 bool isStopRequsted();
70 int getFilesCount(const QString
& directory
);
71 void updateDir(const QString
& source
, const QString
& destination
);
72 bool updateEntry(const QString
& entry
, const QDir
& source
, const QDir
& destination
);
76 SyncDirection direction
;
77 SyncCompareType ctype
;
78 qint64 maxFileSize
; // Bytes
79 QDir::Filters dirFilters
;
81 QString reportTemplate
;
93 #endif // _PROCESS_SYNC_H_