2019-04-10 12:35:43 -03:00
|
|
|
#include <LibCore/CNotifier.h>
|
2019-04-11 19:03:21 -03:00
|
|
|
#include <LibCore/CEventLoop.h>
|
|
|
|
|
#include <LibCore/CEvent.h>
|
2019-04-10 12:35:43 -03:00
|
|
|
|
|
|
|
|
CNotifier::CNotifier(int fd, unsigned event_mask)
|
|
|
|
|
: m_fd(fd)
|
|
|
|
|
, m_event_mask(event_mask)
|
|
|
|
|
{
|
2019-04-11 19:03:21 -03:00
|
|
|
CEventLoop::register_notifier(Badge<CNotifier>(), *this);
|
2019-04-10 12:35:43 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CNotifier::~CNotifier()
|
|
|
|
|
{
|
2019-04-11 19:03:21 -03:00
|
|
|
CEventLoop::unregister_notifier(Badge<CNotifier>(), *this);
|
2019-04-10 12:35:43 -03:00
|
|
|
}
|
|
|
|
|
|