7#include <switchboard/export.h>
12#include <switchboard/Event.hpp>
14namespace switchboard {
22 using Callback = std::function<void(
const std::string&,
const SBAny&)>;
60 void emitEvent(
const std::string& eventName,
const SBAny& data);
64 std::unique_ptr<Impl> pImpl;
bool removeEventListener(unsigned int listenerID)
Removes an event listener from the object.
void emitEvent(const std::string &eventName, const SBAny &data)
Emits an event.
virtual ~EventEmitter()
Destructor for the EventEmitter class.
unsigned int addEventListener(const std::string &eventName, Callback callback)
Adds a new event listener to the object.
EventEmitter()
Constructor for the EventEmitter class.