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

#include <tsPluginEventHandlerRegistry.h>

Classes

class  Criteria

Public Member Functions

 PluginEventHandlerRegistry ()=default
void callEventHandlers (const PluginEventContext &context) const
void registerEventHandler (PluginEventHandlerInterface *handler, const Criteria &criteria=Criteria::Any)
void unregisterEventHandler (PluginEventHandlerInterface *handler=nullptr)

Detailed Description

Registry of plugin event handlers. Used as base class for tsp and tsswitch implementations.

Constructor & Destructor Documentation

◆ PluginEventHandlerRegistry()

ts::PluginEventHandlerRegistry::PluginEventHandlerRegistry ( )
default

Constructor.

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 occurrences 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: