TSDuck v3.40-4001
MPEG Transport Stream Toolkit
|
Registry of plugin event handlers. More...
#include <tsPluginEventHandlerRegistry.h>
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. | |
Registry of plugin event handlers.
Used as base class for tsp and tsswitch implementations.
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 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.
[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. |