mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 00:51:33 +00:00
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:
parent
5063e218af
commit
0e7a48bd7d
|
@ -69,7 +69,7 @@ public:
|
||||||
Optional<FileWatcherEvent> wait_for_event();
|
Optional<FileWatcherEvent> wait_for_event();
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileWatcher final : public FileWatcherBase
|
class FileWatcher : public FileWatcherBase
|
||||||
, public RefCounted<FileWatcher> {
|
, public RefCounted<FileWatcher> {
|
||||||
AK_MAKE_NONCOPYABLE(FileWatcher);
|
AK_MAKE_NONCOPYABLE(FileWatcher);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ public:
|
||||||
|
|
||||||
Function<void(FileWatcherEvent const&)> on_change;
|
Function<void(FileWatcherEvent const&)> on_change;
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
FileWatcher(int watcher_fd, NonnullRefPtr<Notifier>);
|
FileWatcher(int watcher_fd, NonnullRefPtr<Notifier>);
|
||||||
|
|
||||||
NonnullRefPtr<Notifier> m_notifier;
|
NonnullRefPtr<Notifier> m_notifier;
|
||||||
|
|
Loading…
Reference in a new issue