![]() |
TSDuck v3.46-4965
MPEG Transport Stream Toolkit
|
#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) |
Registry of plugin event handlers. Used as base class for tsp and tsswitch implementations.
|
default |
Constructor.
| 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.
| [in] | handler | The event handler to register. |
| [in] | criteria | The criteria for which the handler is to be called. |
| 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.
| [in] | handler | The event handler to unregister. When null, all events are unregistered. |
| void ts::PluginEventHandlerRegistry::callEventHandlers | ( | const PluginEventContext & | context | ) | const |
Invoke all event handlers for a given event.
| [in] | context | Event context. |