TSDuck v3.38-3696
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::PluginEventHandlerRegistry Class Reference

Registry of plugin event handlers. More...

#include <tsPluginEventHandlerRegistry.h>

Inheritance diagram for ts::PluginEventHandlerRegistry:

Classes

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

Public Member Functions

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

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::Any 
)

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: