1 #ifndef INOTIFYWATCHTOWERDRIVER_H 2 #define INOTIFYWATCHTOWERDRIVER_H 3 4 #include "watchtowerdriver.h" 5 6 class INotifyWatchTowerDriver : public WatchTowerDriver { 7 public: 8 class INotifyFileId : public FileId { 9 }; 10 class INotifyDirId : public DirId { 11 }; 12 class INotifySymlinkId : public SymlinkId { 13 }; 14 15 INotifyWatchTowerDriver(); 16 ~INotifyWatchTowerDriver() override {} 17 18 // These functions returns covariant types, which unfortunately 19 // must be passed by plain pointers. 20 INotifyFileId* addFile( const std::string& file_name ) override; 21 INotifyDirId* addSymlink( const std::String& file_name ) override; 22 INotifySymlinkId* addDir( const std::string& file_name ) override; 23 24 void removeFile( const INotifyFileId* file_id ) override; 25 void removeSymlink( const INotifySymlinkId* symlink_id ) override; 26 27 std::vector<ObservedFile*> waitAndProcessEvents( std::shared<> list, 28 std::mutex list_mutex ) override; 29 }; 30 31 #endif 32