The event handler connection interface handles subscribing to events. The application users can either use sdk::add_event_handler or services::conference::add_event_handler to subscribe to events. To use event handlers and subscribe to events, use an event_handler callback that will be invoked by the SDK when the event occurs. After that, you should receive an event_handler_id for the event you subscribed to. This ID is required to disconnect event listeners. When the subscription (asynchronous operation) is finished, you should receive the event_handler_id.
The interface that exposes a connection to the handler. The interface is created for each subscribed event.
using dolbyio::comms::event_handler_id = typedef std::unique_ptr<event_handler_connection>;
Defines a type of the unique pointer to dolbyio::comms::event_handler_connection.
using dolbyio::comms::event_handler = typedef std::function<void(const EventType&)>;
The function object that handles subscribing to events and returns a void operator.
- EventType The selected event.
Updated 3 months ago