aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/FileWatcherKqueue.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdParty/efsw/FileWatcherKqueue.hpp')
-rw-r--r--[-rwxr-xr-x]src/3rdParty/efsw/FileWatcherKqueue.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/3rdParty/efsw/FileWatcherKqueue.hpp b/src/3rdParty/efsw/FileWatcherKqueue.hpp
index 1bf3755..ff5327b 100755..100644
--- a/src/3rdParty/efsw/FileWatcherKqueue.hpp
+++ b/src/3rdParty/efsw/FileWatcherKqueue.hpp
@@ -21,23 +21,24 @@ class FileWatcherKqueue : public FileWatcherImpl {
21 21
22 /// Add a directory watch 22 /// Add a directory watch
23 /// On error returns WatchID with Error type. 23 /// On error returns WatchID with Error type.
24 WatchID addWatch( const std::string& directory, FileWatchListener* watcher, bool recursive ); 24 WatchID addWatch( const std::string& directory, FileWatchListener* watcher, bool recursive,
25 const std::vector<WatcherOption> &options ) override;
25 26
26 /// Remove a directory watch. This is a brute force lazy search O(nlogn). 27 /// Remove a directory watch. This is a brute force lazy search O(nlogn).
27 void removeWatch( const std::string& directory ); 28 void removeWatch( const std::string& directory ) override;
28 29
29 /// Remove a directory watch. This is a map lookup O(logn). 30 /// Remove a directory watch. This is a map lookup O(logn).
30 void removeWatch( WatchID watchid ); 31 void removeWatch( WatchID watchid ) override;
31 32
32 /// Updates the watcher. Must be called often. 33 /// Updates the watcher. Must be called often.
33 void watch(); 34 void watch() override;
34 35
35 /// Handles the action 36 /// Handles the action
36 void handleAction( Watcher* watch, const std::string& filename, unsigned long action, 37 void handleAction( Watcher* watch, const std::string& filename, unsigned long action,
37 std::string oldFilename = "" ); 38 std::string oldFilename = "" ) override;
38 39
39 /// @return Returns a list of the directories that are being watched 40 /// @return Returns a list of the directories that are being watched
40 std::list<std::string> directories(); 41 std::vector<std::string> directories() override;
41 42
42 protected: 43 protected:
43 /// Map of WatchID to WatchStruct pointers 44 /// Map of WatchID to WatchStruct pointers
@@ -53,7 +54,7 @@ class FileWatcherKqueue : public FileWatcherImpl {
53 54
54 Mutex mWatchesLock; 55 Mutex mWatchesLock;
55 56
56 std::list<WatchID> mRemoveList; 57 std::vector<WatchID> mRemoveList;
57 58
58 long mFileDescriptorCount; 59 long mFileDescriptorCount;
59 60
@@ -61,7 +62,7 @@ class FileWatcherKqueue : public FileWatcherImpl {
61 62
62 bool isAddingWatcher() const; 63 bool isAddingWatcher() const;
63 64
64 bool pathInWatches( const std::string& path ); 65 bool pathInWatches( const std::string& path ) override;
65 66
66 void addFD(); 67 void addFD();
67 68