PrivMX Endpoint v2.7.0
Loading...
Searching...
No Matches
privmx::endpoint::core::EventHolder Class Reference

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

Public Member Functions

 EventHolder (const std::shared_ptr< Event > &event)
const std::string & type () const
const std::string & channel () const
std::string toJSON () const
const std::shared_ptr< Event > & get () const

Detailed Description

'EventHolder' is an helper class containing functions to operate on 'Event' objects.

Constructor & Destructor Documentation

◆ EventHolder()

privmx::endpoint::core::EventHolder::EventHolder ( const std::shared_ptr< Event > & event)

'EventHolder' constructor

Parameters
eventpointer to the 'Event' object to use in the 'EventHolder'

Member Function Documentation

◆ channel()

const std::string & privmx::endpoint::core::EventHolder::channel ( ) const

Extracts Event's channel

Returns
channel that the 'Event" arrived

◆ get()

const std::shared_ptr< Event > & privmx::endpoint::core::EventHolder::get ( ) const

Gets 'Event' object

Returns
pointer to the underlying 'Event' object

◆ toJSON()

std::string privmx::endpoint::core::EventHolder::toJSON ( ) const

Serializes an Event to the JSON string

Returns
JSON string representation of the 'Event' object

◆ type()

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

Extracts Event's type

Returns
type of the 'Event'

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