LibCore: Allow subclassing FileWatcher

This will be handy for platforms which need to be able to store extra
OS-specific members. For example, macOS needs to store a dispatch queue,
and event stream, etc.
This commit is contained in:
Timothy Flynn 2023-01-18 14:00:19 -05:00 committed by Linus Groh
parent 5063e218af
commit 0e7a48bd7d

View file

@ -69,7 +69,7 @@ public:
Optional<FileWatcherEvent> wait_for_event();
};
class FileWatcher final : public FileWatcherBase
class FileWatcher : public FileWatcherBase
, public RefCounted<FileWatcher> {
AK_MAKE_NONCOPYABLE(FileWatcher);
@ -79,7 +79,7 @@ public:
Function<void(FileWatcherEvent const&)> on_change;
private:
protected:
FileWatcher(int watcher_fd, NonnullRefPtr<Notifier>);
NonnullRefPtr<Notifier> m_notifier;