summaryrefslogtreecommitdiff
path: root/RealtimeSync/watcher.h
diff options
context:
space:
mode:
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