summaryrefslogtreecommitdiff
path: root/RealtimeSync/watcher.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:59 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:21:59 +0200
commitd4af25c52a28b93484ffb55e0a8027bc4ce7856f (patch)
tree853d57468d6b370711e7a5dd2c3dc7d5bac81b10 /RealtimeSync/watcher.h
parent5.8 (diff)
downloadFreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.gz
FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.tar.bz2
FreeFileSync-d4af25c52a28b93484ffb55e0a8027bc4ce7856f.zip
5.9
Diffstat (limited to 'RealtimeSync/watcher.h')
-rw-r--r--RealtimeSync/watcher.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/RealtimeSync/watcher.h b/RealtimeSync/watcher.h
index 014101da..2fd32119 100644
--- a/RealtimeSync/watcher.h
+++ b/RealtimeSync/watcher.h
@@ -7,8 +7,7 @@
#ifndef WATCHER_H_INCLUDED
#define WATCHER_H_INCLUDED
-#include <zen/zstring.h>
-#include <vector>
+#include <zen/dir_watcher.h>
#include <zen/file_error.h>
@@ -35,10 +34,12 @@ enum ChangeType
struct WaitResult
{
- WaitResult(ChangeType tp, const Zstring& chgFile) : type(tp), filename(chgFile) {}
+ WaitResult(const zen::DirWatcher::Entry& changedItem) : type(CHANGE_DETECTED), changedItem_(changedItem) {}
+ WaitResult(const Zstring& dirname) : type(CHANGE_DIR_MISSING), dirname_(dirname) {}
ChangeType type;
- Zstring filename; //file or directory name
+ zen::DirWatcher::Entry changedItem_; //for type == CHANGE_DETECTED: file or directory
+ Zstring dirname_; //for type == CHANGE_DIR_MISSING
};
WaitResult waitForChanges(const std::vector<Zstring>& dirNamesNonFmt,
bgstack15