summaryrefslogtreecommitdiff
path: root/RealtimeSync/watcher.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:14:37 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:14:37 +0200
commit8bf668665b107469086f16cb8ad23e47d479d2b4 (patch)
tree66a91ef06a8caa7cd6819dcbe1860693d3eda8d5 /RealtimeSync/watcher.h
parent3.21 (diff)
downloadFreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.gz
FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.tar.bz2
FreeFileSync-8bf668665b107469086f16cb8ad23e47d479d2b4.zip
4.0
Diffstat (limited to 'RealtimeSync/watcher.h')
-rw-r--r--RealtimeSync/watcher.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h
index 04a0d860..dd0dd88d 100644
--- a/RealtimeSync/watcher.h
+++ b/RealtimeSync/watcher.h
@@ -28,15 +28,24 @@ public:
//wait until changes are detected or if a directory is not available (anymore)
-enum WaitResult
+enum ChangeType
{
CHANGE_DETECTED,
CHANGE_DIR_MISSING
};
-WaitResult waitForChanges(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError)
+struct WaitResult
+{
+ WaitResult(ChangeType tp, const Zstring& chgFile = Zstring()) : type(tp), filename(chgFile) {}
+
+ ChangeType type;
+ Zstring filename; //filled if type == CHANGE_DETECTED
+};
+WaitResult waitForChanges(const std::vector<Zstring>& dirNamesNonFmt, //non-formatted dir names that yet require call to getFormattedDirectoryName()
+ WaitCallback* statusHandler); //throw(FileError)
//wait until all directories become available (again)
-void waitForMissingDirs(const std::vector<Zstring>& dirNames, WaitCallback* statusHandler); //throw(FileError)
+void waitForMissingDirs(const std::vector<Zstring>& dirNamesNonFmt,
+ WaitCallback* statusHandler); //throw(FileError)
}
#endif // WATCHER_H_INCLUDED
bgstack15