cam: event_loop: Rename addEvent to addFdEvent

With the addition of addTimerEvent, the naming of addEvent is specific
to the management of an fd, while the naming is generic.

Update the name to make the naming scheme consistent in specifying the
type of event to be added.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Eric Curtin
2022-05-20 20:01:03 +01:00
committed by Laurent Pinchart
parent 2ebce32cf6
commit 48e991476d
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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)