Switchboard SDK
Loading...
Searching...
No Matches
Event.hpp
1//
2// Event.hpp
3// SwitchboardSDK
4//
5// Copyright © 2026 Synervoz. All rights reserved.
6//
7
8#pragma once
9
10#include "export.h"
11
12#include <any>
13#include <functional>
14#include <string>
15#include <switchboard/SBAny.hpp>
16
17namespace switchboard {
18
20using EventData = SBAny;
21
23struct SWITCHBOARDSDK_EXPORT Event {
25 std::string id;
26
28 std::string objectURI;
29
31 std::string name;
32
34 int64_t timestamp;
35
37 EventData data;
38};
39
41using EventCallback = std::function<void(const Event&)>;
42
43}
A versatile container class that can hold values of various types.
Definition SBAny.hpp:53
Represents an event that can be emitted and listened to.
Definition Event.hpp:23
std::string objectURI
URI of the object emitting the event.
Definition Event.hpp:28
int64_t timestamp
Timestamp of when the event was created (in milliseconds since epoch).
Definition Event.hpp:34
std::string name
Name of the event.
Definition Event.hpp:31
std::string id
Unique identifier for the event.
Definition Event.hpp:25
EventData data
Data associated with the event.
Definition Event.hpp:37