diff options
Diffstat (limited to 'synchronization.h')
-rw-r--r-- | synchronization.h | 54 |
1 files changed, 6 insertions, 48 deletions
diff --git a/synchronization.h b/synchronization.h index 95b297ce..87842249 100644 --- a/synchronization.h +++ b/synchronization.h @@ -3,17 +3,13 @@ #include "fileHierarchy.h" #include "library/processXml.h" -#include <memory> - -#ifdef FFS_WIN -#include "shared/shadow.h" -#endif class StatusHandler; namespace FreeFileSync { + class SyncStatistics { public: @@ -45,6 +41,7 @@ private: bool synchronizationNeeded(const FolderComparison& folderCmp); +class SyncRecursively; struct FolderPairSyncCfg { @@ -70,39 +67,13 @@ public: const bool traverseDirSymLinks, xmlAccess::OptionalDialogs& warnings, const bool verifyCopiedFiles, - StatusHandler* handler); + StatusHandler& handler); //CONTRACT: syncConfig must have SAME SIZE folderCmp and correspond per row! void startSynchronizationProcess(const std::vector<FolderPairSyncCfg>& syncConfig, FolderComparison& folderCmp); private: - template <bool deleteOnly> - class SyncRecursively; - - struct DeletionHandling - { - DeletionHandling(const DeletionPolicy handleDel, - const Zstring& custDelFolder); - - DeletionPolicy handleDeletion; - Zstring currentDelFolder; //alternate deletion folder for current folder pair (with timestamp, ends with path separator) - //preloaded status texts: - const Zstring txtMoveFileUserDefined; - const Zstring txtMoveFolderUserDefined; - }; - - void syncRecursively(HierarchyObject& hierObj); - void synchronizeFile(FileMapping& fileObj, const DeletionHandling& delHandling) const; - void synchronizeFolder(DirMapping& dirObj, const DeletionHandling& delHandling) const; - - template <FreeFileSync::SelectedSide side> - void removeFile(const FileMapping& fileObj, const DeletionHandling& delHandling, bool showStatusUpdate) const; - - template <FreeFileSync::SelectedSide side> - void removeFolder(const DirMapping& dirObj, const DeletionHandling& delHandling) const; - - void copyFileUpdating(const Zstring& source, const Zstring& target, const wxULongLong& sourceFileSize) const; - void verifyFileCopy(const Zstring& source, const Zstring& target) const; + friend class SyncRecursively; const bool m_copyFileSymLinks; const bool m_traverseDirSymLinks; @@ -111,22 +82,9 @@ private: //warnings xmlAccess::OptionalDialogs& m_warnings; -#ifdef FFS_WIN - //shadow copy buffer - std::auto_ptr<ShadowCopy> shadowCopyHandler; -#endif - - StatusHandler* const statusUpdater; - - //preload status texts - const Zstring txtCopyingFile; - const Zstring txtOverwritingFile; - const Zstring txtCreatingFolder; - const Zstring txtDeletingFile; - const Zstring txtDeletingFolder; - const Zstring txtMoveToRecycler; - const Zstring txtVerifying; + StatusHandler& statusUpdater; }; + } #endif // SYNCHRONIZATION_H_INCLUDED |