Event Handling

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.

Classes

Name
classdolbyio::comms::event_handler_connection
The interface that exposes a connection to the handler. The interface is created for each subscribed event.

Types

Name
using std::unique_ptr< event_handler_connection >event_handler_id
Defines a type of the unique pointer to dolbyio::comms::event_handler_connection.
using std::function< void(const EventType &)>event_handler
The function object that handles subscribing to events and returns a void operator.

Types Documentation

using event_handler_id

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 event_handler

using dolbyio::comms::event_handler = typedef std::function<void(const EventType&)>;

The function object that handles subscribing to events and returns a void operator.

Template Parameters:

  • EventType The selected event.


Did this page help you?