Skip to content

ChannelEventListener

class ChannelEventListener

Channel Event listener.

Event handlers are registered to the event listener through a callback to receive event notifications.

Functions

Name Description
ChannelEventListener Initializes a new channel event listener.
~ChannelEventListener Destroys the channel event listener.
Add Registers a custom callback to this event listener.
Call Executes the event by calling all the registered event handlers.

Function Details

Add

void Add(const ChannelEventCallback& callback, void* userData = nullptr)

Registers a custom callback to this event listener.

Parameter callback
The event callback.
Parameter userData
The additional data to pass to the handler when this listener receive the event.

Call

void Call(ChannelInternalState* channel)

Executes the event by calling all the registered event handlers.

Parameter channel
The channel which have triggered the event.

Warning

This method is for internal usage only.

ChannelEventListener

ChannelEventListener()

Initializes a new channel event listener.

~ChannelEventListener

~ChannelEventListener()

Destroys the channel event listener.