PrivMX Endpoint v2.7.0
Loading...
Searching...
No Matches
privmx::endpoint::core::Event Struct Referenceabstract

#include <privmx/endpoint/core/Events.hpp>

Inheritance diagram for privmx::endpoint::core::Event:

Public Member Functions

 Event (const std::string &type)
virtual ~Event ()=default
virtual std::string toJSON () const =0
virtual std::shared_ptr< SerializedEvent > serialize () const =0

Public Attributes

std::string type
std::string channel
int64_t connectionId = -1
std::vector< std::string > subscriptions
int64_t timestamp

Detailed Description

Holds the information about an event.

Constructor & Destructor Documentation

◆ Event()

privmx::endpoint::core::Event::Event ( const std::string & type)

'Event' class constructor

Parameters
typeevent type

◆ ~Event()

virtual privmx::endpoint::core::Event::~Event ( )
virtualdefault

//doc-gen:ignore

Member Function Documentation

◆ serialize()

virtual std::shared_ptr< SerializedEvent > privmx::endpoint::core::Event::serialize ( ) const
pure virtual

//doc-gen:ignore

Implemented in privmx::endpoint::core::CollectionChangedEvent, privmx::endpoint::core::ContextUserAddedEvent, privmx::endpoint::core::ContextUserRemovedEvent, privmx::endpoint::core::ContextUsersStatusChangedEvent, privmx::endpoint::core::LibBreakEvent, privmx::endpoint::core::LibConnectedEvent, privmx::endpoint::core::LibDisconnectedEvent, privmx::endpoint::core::LibPlatformDisconnectedEvent, privmx::endpoint::event::ContextCustomEvent, privmx::endpoint::inbox::InboxCreatedEvent, privmx::endpoint::inbox::InboxDeletedEvent, privmx::endpoint::inbox::InboxEntryCreatedEvent, privmx::endpoint::inbox::InboxEntryDeletedEvent, privmx::endpoint::inbox::InboxUpdatedEvent, privmx::endpoint::kvdb::KvdbCreatedEvent, privmx::endpoint::kvdb::KvdbDeletedEvent, privmx::endpoint::kvdb::KvdbEntryDeletedEvent, privmx::endpoint::kvdb::KvdbEntryUpdatedEvent, privmx::endpoint::kvdb::KvdbNewEntryEvent, privmx::endpoint::kvdb::KvdbStatsChangedEvent, privmx::endpoint::kvdb::KvdbUpdatedEvent, privmx::endpoint::store::StoreCreatedEvent, privmx::endpoint::store::StoreDeletedEvent, privmx::endpoint::store::StoreFileCreatedEvent, privmx::endpoint::store::StoreFileDeletedEvent, privmx::endpoint::store::StoreFileUpdatedEvent, privmx::endpoint::store::StoreStatsChangedEvent, privmx::endpoint::store::StoreUpdatedEvent, privmx::endpoint::stream::StreamJoinedEvent, privmx::endpoint::stream::StreamLeftEvent, privmx::endpoint::stream::StreamNewStreamsEvent, privmx::endpoint::stream::StreamPublishedEvent, privmx::endpoint::stream::StreamRoomCreatedEvent, privmx::endpoint::stream::StreamRoomDeletedEvent, privmx::endpoint::stream::StreamRoomUpdatedEvent, privmx::endpoint::stream::StreamsUpdatedEvent, privmx::endpoint::stream::StreamUnpublishedEvent, privmx::endpoint::stream::StreamUpdatedEvent, privmx::endpoint::thread::ThreadCreatedEvent, privmx::endpoint::thread::ThreadDeletedEvent, privmx::endpoint::thread::ThreadMessageDeletedEvent, privmx::endpoint::thread::ThreadMessageUpdatedEvent, privmx::endpoint::thread::ThreadNewMessageEvent, privmx::endpoint::thread::ThreadStatsChangedEvent, and privmx::endpoint::thread::ThreadUpdatedEvent.

◆ toJSON()

virtual std::string privmx::endpoint::core::Event::toJSON ( ) const
pure virtual

Converts Event's data to JSON string

Returns
JSON string

Implemented in privmx::endpoint::core::CollectionChangedEvent, privmx::endpoint::core::ContextUserAddedEvent, privmx::endpoint::core::ContextUserRemovedEvent, privmx::endpoint::core::ContextUsersStatusChangedEvent, privmx::endpoint::core::LibBreakEvent, privmx::endpoint::core::LibConnectedEvent, privmx::endpoint::core::LibDisconnectedEvent, privmx::endpoint::core::LibPlatformDisconnectedEvent, privmx::endpoint::event::ContextCustomEvent, privmx::endpoint::inbox::InboxCreatedEvent, privmx::endpoint::inbox::InboxDeletedEvent, privmx::endpoint::inbox::InboxEntryCreatedEvent, privmx::endpoint::inbox::InboxEntryDeletedEvent, privmx::endpoint::inbox::InboxUpdatedEvent, privmx::endpoint::kvdb::KvdbCreatedEvent, privmx::endpoint::kvdb::KvdbDeletedEvent, privmx::endpoint::kvdb::KvdbEntryDeletedEvent, privmx::endpoint::kvdb::KvdbEntryUpdatedEvent, privmx::endpoint::kvdb::KvdbNewEntryEvent, privmx::endpoint::kvdb::KvdbStatsChangedEvent, privmx::endpoint::kvdb::KvdbUpdatedEvent, privmx::endpoint::store::StoreCreatedEvent, privmx::endpoint::store::StoreDeletedEvent, privmx::endpoint::store::StoreFileCreatedEvent, privmx::endpoint::store::StoreFileDeletedEvent, privmx::endpoint::store::StoreFileUpdatedEvent, privmx::endpoint::store::StoreStatsChangedEvent, privmx::endpoint::store::StoreUpdatedEvent, privmx::endpoint::stream::StreamJoinedEvent, privmx::endpoint::stream::StreamLeftEvent, privmx::endpoint::stream::StreamNewStreamsEvent, privmx::endpoint::stream::StreamPublishedEvent, privmx::endpoint::stream::StreamRoomCreatedEvent, privmx::endpoint::stream::StreamRoomDeletedEvent, privmx::endpoint::stream::StreamRoomUpdatedEvent, privmx::endpoint::stream::StreamsUpdatedEvent, privmx::endpoint::stream::StreamUnpublishedEvent, privmx::endpoint::stream::StreamUpdatedEvent, privmx::endpoint::thread::ThreadCreatedEvent, privmx::endpoint::thread::ThreadDeletedEvent, privmx::endpoint::thread::ThreadMessageDeletedEvent, privmx::endpoint::thread::ThreadMessageUpdatedEvent, privmx::endpoint::thread::ThreadNewMessageEvent, privmx::endpoint::thread::ThreadStatsChangedEvent, and privmx::endpoint::thread::ThreadUpdatedEvent.

Member Data Documentation

◆ channel

std::string privmx::endpoint::core::Event::channel

Holds the channel of the event

◆ connectionId

int64_t privmx::endpoint::core::Event::connectionId = -1

ID of the connection (unique)

◆ subscriptions

std::vector<std::string> privmx::endpoint::core::Event::subscriptions

List of subscriptions Id for witch it is

◆ timestamp

int64_t privmx::endpoint::core::Event::timestamp

Timestamp of the event

Represents the point in time when event occurred.

  • For events received from Bridge, this value comes from Bridge.
  • For events generated in the library, this is a local timestamp.

◆ type

std::string privmx::endpoint::core::Event::type

Holds the type of the event


The documentation for this struct was generated from the following file: