CNotifier.cpp 348 B

12345678910111213141516
  1. #include <LibCore/CNotifier.h>
  2. #include <LibCore/CEventLoop.h>
  3. #include <LibCore/CEvent.h>
  4. CNotifier::CNotifier(int fd, unsigned event_mask)
  5. : m_fd(fd)
  6. , m_event_mask(event_mask)
  7. {
  8. CEventLoop::register_notifier(Badge<CNotifier>(), *this);
  9. }
  10. CNotifier::~CNotifier()
  11. {
  12. CEventLoop::unregister_notifier(Badge<CNotifier>(), *this);
  13. }