PrivMX Endpoint v2.8.0
Loading...
Searching...
No Matches
Events.hpp
1#ifndef _PRIVMXLIB_ENDPOINT_EVENT_EVENTS_HPP_
2#define _PRIVMXLIB_ENDPOINT_EVENT_EVENTS_HPP_
3
4#include "privmx/endpoint/core/Buffer.hpp"
5#include "privmx/endpoint/core/Events.hpp"
6#include "privmx/endpoint/core/Types.hpp"
7
8namespace privmx {
9namespace endpoint {
10namespace event {
11
19 std::string contextId;
23 std::string userId;
31 int64_t statusCode;
36};
37
42
46 ContextCustomEvent() : core::Event("contextCustom") {}
47
53 std::string toJSON() const override;
54
58 std::shared_ptr<core::SerializedEvent> serialize() const override;
59
64};
65
69class Events {
70public:
77 static bool isContextCustomEvent(const core::EventHolder& eventHolder);
78
86};
87
88} // namespace event
89} // namespace endpoint
90} // namespace privmx
91
92#endif // _PRIVMXLIB_ENDPOINT_EVENT_EVENTS_HPP_
Definition Buffer.hpp:13
Definition Events.hpp:78
Definition Events.hpp:69
static ContextCustomEvent extractContextCustomEvent(const core::EventHolder &eventHolder)
static bool isContextCustomEvent(const core::EventHolder &eventHolder)
Definition Events.hpp:19
Event(const std::string &type)
int64_t statusCode
Definition Events.hpp:31
std::string contextId
Definition Events.hpp:19
int64_t schemaVersion
Definition Events.hpp:35
std::string userId
Definition Events.hpp:23
core::Buffer payload
Definition Events.hpp:27
ContextCustomEvent()
Definition Events.hpp:46
std::string toJSON() const override
ContextCustomEventData data
Definition Events.hpp:63
std::shared_ptr< core::SerializedEvent > serialize() const override