libcamera  v0.3.0
Supporting cameras in Linux since 2019
event_dispatcher.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /*
3  * Copyright (C) 2019, Google Inc.
4  *
5  * Event dispatcher
6  */
7 
8 #pragma once
9 
10 #include <vector>
11 
12 #include <libcamera/base/private.h>
13 
14 namespace libcamera {
15 
16 class EventNotifier;
17 class Timer;
18 
20 {
21 public:
22  virtual ~EventDispatcher();
23 
24  virtual void registerEventNotifier(EventNotifier *notifier) = 0;
25  virtual void unregisterEventNotifier(EventNotifier *notifier) = 0;
26 
27  virtual void registerTimer(Timer *timer) = 0;
28  virtual void unregisterTimer(Timer *timer) = 0;
29 
30  virtual void processEvents() = 0;
31 
32  virtual void interrupt() = 0;
33 };
34 
35 } /* namespace libcamera */
virtual void registerTimer(Timer *timer)=0
Register a timer.
virtual void unregisterEventNotifier(EventNotifier *notifier)=0
Unregister an event notifier.
virtual void unregisterTimer(Timer *timer)=0
Unregister a timer.
Top-level libcamera namespace.
Definition: backtrace.h:17
virtual void registerEventNotifier(EventNotifier *notifier)=0
Register an event notifier.
Interface to manage the libcamera events and timers.
Definition: event_dispatcher.h:19
virtual void processEvents()=0
Wait for and process pending events.
Single-shot timer interface.
Definition: timer.h:22
virtual void interrupt()=0
Interrupt any running processEvents() call as soon as possible.
Notify of activity on a file descriptor.
Definition: event_notifier.h:19