diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:19:49 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:19:49 +0200 |
commit | c8e0e909b4a8d18319fc65434a10dc446434817c (patch) | |
tree | eee91e7d2ce229dd043811eae8f1e2bd78061916 /RealtimeSync/watcher.h | |
parent | 5.2 (diff) | |
download | FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2 FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip |
5.3
Diffstat (limited to 'RealtimeSync/watcher.h')
-rw-r--r-- | RealtimeSync/watcher.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h index cb39ed20..17252535 100644 --- a/RealtimeSync/watcher.h +++ b/RealtimeSync/watcher.h @@ -14,8 +14,7 @@ namespace rts { -const int UI_UPDATE_INTERVAL = 100; //perform ui updates not more often than necessary, 100 seems to be a good value with only a minimal performance loss - +const int UI_UPDATE_INTERVAL = 100; //unit: [ms]; perform ui updates not more often than necessary, 100 seems to be a good value with only a minimal performance loss bool updateUiIsAllowed(); @@ -33,19 +32,22 @@ enum ChangeType CHANGE_DETECTED, CHANGE_DIR_MISSING }; + struct WaitResult { - WaitResult(ChangeType tp, const Zstring& chgFile = Zstring()) : type(tp), filename(chgFile) {} + WaitResult(ChangeType tp, const Zstring& chgFile) : type(tp), filename(chgFile) {} ChangeType type; - Zstring filename; //filled if type == CHANGE_DETECTED + Zstring filename; //file or directory name }; -WaitResult waitForChanges(const std::vector<Zstring>& dirNamesNonFmt, //non-formatted dir names that yet require call to getFormattedDirectoryName() - WaitCallback* statusHandler); //throw(FileError) + +WaitResult waitForChanges(const std::vector<Zstring>& dirNamesNonFmt, + //non-formatted dirnames that yet require call to getFormattedDirectoryName(); empty directories must be checked by caller! + WaitCallback& statusHandler); //throw FileError //wait until all directories become available (again) void waitForMissingDirs(const std::vector<Zstring>& dirNamesNonFmt, - WaitCallback* statusHandler); //throw(FileError) + WaitCallback& statusHandler); //throw FileError } #endif // WATCHER_H_INCLUDED |