@@ -432,8 +432,8 @@ int Device::init()
if (ret < 0)
return ret;
- EventLoop::instance()->addEvent(fd_, EventLoop::Read,
- std::bind(&Device::drmEvent, this));
+ EventLoop::instance()->addFdEvent(fd_, EventLoop::Read,
+ std::bind(&Device::drmEvent, this));
return 0;
}
@@ -60,8 +60,8 @@ void EventLoop::callLater(const std::function<void()> &func)
event_base_once(base_, -1, EV_TIMEOUT, dispatchCallback, this, nullptr);
}
-void EventLoop::addEvent(int fd, EventType type,
- const std::function<void()> &callback)
+void EventLoop::addFdEvent(int fd, EventType type,
+ const std::function<void()> &callback)
{
std::unique_ptr<Event> event = std::make_unique<Event>(callback);
short events = (type & Read ? EV_READ : 0)
@@ -34,8 +34,8 @@ public:
void callLater(const std::function<void()> &func);
- void addEvent(int fd, EventType type,
- const std::function<void()> &handler);
+ void addFdEvent(int fd, EventType type,
+ const std::function<void()> &handler);
private:
struct Event {