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