summaryrefslogtreecommitdiff
path: root/RealtimeSync/watcher.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
commitc8e0e909b4a8d18319fc65434a10dc446434817c (patch)
treeeee91e7d2ce229dd043811eae8f1e2bd78061916 /RealtimeSync/watcher.h
parent5.2 (diff)
downloadFreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip
5.3
Diffstat (limited to 'RealtimeSync/watcher.h')
-rw-r--r--RealtimeSync/watcher.h16
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
bgstack15