13 #include "iberbox/config.h" 14 #include "iberbox/ownership.h" 22 #include <scapix/bridge/object.h> 32 :
public scapix::bridge::object<EventData>
64 static const char *sEventNames[] =
78 static_assert((
sizeof(sEventNames) /
sizeof(sEventNames[0]) ==
EventData::LAST),
"Invalid number of event names");
204 typedef std::shared_ptr<EventData>
Event;
209 ,
public scapix::bridge::object<EventListener>
217 void setEventCallback(std::function<
void(Event)> eventCallback);
219 virtual void onEvent(Event);
222 std::function<void(Event)> mEventCallback;
AccountInfo getAccountInfo() const
Gets the account info after the event occurred.
Node getPreviousNode() const
Gets the Previous Node object.
uint64_t getNodeId() const
Gets the Node Id object.
Node getNode() const
Gets the node that caused the event.
The iberbox namespace.
Definition: task.h:21
std::shared_ptr< AccountInfoData > AccountInfo
Definition: account.h:221
std::shared_ptr< NodeData > Node
Definition: node.h:666
The event data class.
Definition: events.h:30
static const char * getTypeName(unsigned type)
Gets the event type name.
Definition: events.h:62
std::shared_ptr< NodeDataList > NodeList
Definition: node.h:668
uint64_t getClientId() const
Gets the Client Id object.
const char * getName() const
Gets the Name object.
const std::string getNameString() const
Gets the Name String object.
EventType
The event type enum.
Definition: events.h:40
std::shared_ptr< EventData > Event
Definition: events.h:204
static const std::string getTypeNameString(unsigned type)
Gets the event type name.
Definition: events.h:88
std::shared_ptr< std::vector< Event > > EventList
Definition: events.h:205
int getType() const
Gets the event type.
const char * getPath() const
Gets the Path object.
EventListener * EventListenerType
Definition: events.h:229
const std::string getPathString() const
Gets the Path String object.
int getNumber() const
Gets the number associated to the event.
const char * getCloudState() const
Gets the Cloud State object.
NodeList getNodeList() const
Gets the Node List object.