#include <privmx/endpoint/event/EventApi.hpp>
|
| | EventApi () |
|
| EventApi (const EventApi &obj) |
|
EventApi & | operator= (const EventApi &obj) |
|
| EventApi (EventApi &&obj) |
| void | emitEvent (const std::string &contextId, const std::vector< core::UserWithPubKey > &users, const std::string &channelName, const core::Buffer &eventData) |
| std::vector< std::string > | subscribeFor (const std::vector< std::string > &subscriptionQueries) |
| void | unsubscribeFrom (const std::vector< std::string > &subscriptionIds) |
| std::string | buildSubscriptionQuery (const std::string &channelName, EventSelectorType selectorType, const std::string &selectorId) |
|
ExtendedPointer & | operator= (const ExtendedPointer &obj) |
|
std::shared_ptr< EventApiImpl > | getImpl () const |
|
|
void | attachToPtrIfPossible () |
|
void | detachFromPtrIfPossible () |
|
std::weak_ptr< EventApiImpl > | _ptr |
'EventApi' is a class representing Endpoint's API for context custom events.
◆ EventApi()
| privmx::endpoint::event::EventApi::EventApi |
( |
| ) |
|
◆ buildSubscriptionQuery()
| std::string privmx::endpoint::event::EventApi::buildSubscriptionQuery |
( |
const std::string & | channelName, |
|
|
EventSelectorType | selectorType, |
|
|
const std::string & | selectorId ) |
Generate subscription Query for the custom events.
- Parameters
-
| channelName | name of the Channel |
| selectorType | selector of scope on which you listen for events
|
| selectorId | ID of the selector |
◆ create()
Creates an instance of 'EventApi'.
- Parameters
-
| connection | instance of 'Connection' |
- Returns
- EventApi object
◆ emitEvent()
| void privmx::endpoint::event::EventApi::emitEvent |
( |
const std::string & | contextId, |
|
|
const std::vector< core::UserWithPubKey > & | users, |
|
|
const std::string & | channelName, |
|
|
const core::Buffer & | eventData ) |
Emits the custom event on the given Context and channel.
- Parameters
-
| contextId | ID of the Context |
| users | list of UserWithPubKey objects which defines the recipients of the event |
| channelName | name of the Channel |
| eventData | event's data |
◆ subscribeFor()
| std::vector< std::string > privmx::endpoint::event::EventApi::subscribeFor |
( |
const std::vector< std::string > & | subscriptionQueries | ) |
|
Subscribe for the custom events on the given subscription query.
- Parameters
-
| subscriptionQueries | list of queries |
- Returns
- list of subscriptionIds in maching order to subscriptionQueries
◆ unsubscribeFrom()
| void privmx::endpoint::event::EventApi::unsubscribeFrom |
( |
const std::vector< std::string > & | subscriptionIds | ) |
|
Unsubscribe from events for the given subscriptionId.
- Parameters
-
| subscriptionIds | list of subscriptionId |
The documentation for this class was generated from the following file: