TSDuck Version 3.29-2562 (TSDuck - The MPEG Transport Stream Toolkit)
ts::PluginEventHandlerRegistry Class Reference

Registry of plugin event handlers. More...

Inheritance diagram for ts::PluginEventHandlerRegistry:

Classes

class  Criteria
 Registration criteria for an event handler. More...
 

Public Member Functions

 PluginEventHandlerRegistry ()
 Constructor.
 
void callEventHandlers (const PluginEventContext &context) const
 Invoke all event handlers for a given event. More...
 
void registerEventHandler (PluginEventHandlerInterface *handler, const Criteria &criteria=Criteria())
 Register an event handler. More...
 
void unregisterEventHandler (PluginEventHandlerInterface *handler=nullptr)
 Unregister all occurences of an event handler. More...
 

Detailed Description

Registry of plugin event handlers.

Used as base class for tsp and tsswitch implementations.

Member Function Documentation

◆ registerEventHandler()

void ts::PluginEventHandlerRegistry::registerEventHandler ( PluginEventHandlerInterface handler,
const Criteria criteria = Criteria() 
)

Register an event handler.

Note: calling this function while executing a plugin event hander does nothing.

Parameters
[in]handlerThe event handler to register.
[in]criteriaThe criteria for which the handler is to be called.

◆ unregisterEventHandler()

void ts::PluginEventHandlerRegistry::unregisterEventHandler ( PluginEventHandlerInterface handler = nullptr)

Unregister all occurences of an event handler.

Note: calling this function while executing a plugin event hander does nothing. This is typically used in the destructor of an event handler.

Parameters
[in]handlerThe event handler to unregister. When null, all events are unregistered.

◆ callEventHandlers()

void ts::PluginEventHandlerRegistry::callEventHandlers ( const PluginEventContext context) const

Invoke all event handlers for a given event.

Parameters
[in]contextEvent context.

The documentation for this class was generated from the following file: