#include <privmx/endpoint/core/Connection.hpp>
|
|
void | attachToPtrIfPossible () |
|
void | detachFromPtrIfPossible () |
|
std::weak_ptr< ConnectionImpl > | _ptr |
'Connection' represents and manages the current connection between the Endpoint and the Bridge server.
◆ Connection()
| privmx::endpoint::core::Connection::Connection |
( |
| ) |
|
◆ buildSubscriptionQuery()
| std::string privmx::endpoint::core::Connection::buildSubscriptionQuery |
( |
EventType | eventType, |
|
|
EventSelectorType | selectorType, |
|
|
const std::string & | selectorId ) |
Generate subscription Query for the Context events.
- Parameters
-
| eventType | type of event which you listen for |
| selectorType | scope on which you listen for events
|
| selectorId | ID of the selector |
◆ connect()
Connects to the PrivMX Bridge server.
- Parameters
-
| userPrivKey | user's private key |
| solutionId | ID of the Solution |
| bridgeUrl | Bridge Server URL |
| verificationOptions | PrivMX Bridge server instance verification options using a PKI server |
- Returns
- Connection object
◆ connectPublic()
Connects to the PrivMX Bridge Server as a guest user.
- Parameters
-
| solutionId | ID of the Solution |
| bridgeUrl | Bridge Server URL |
| verificationOptions | PrivMX Bridge server instance verification options using a PKI server |
- Returns
- Connection object
◆ disconnect()
| void privmx::endpoint::core::Connection::disconnect |
( |
| ) |
|
Disconnects from the PrivMX Bridge server.
◆ getConnectionId()
| int64_t privmx::endpoint::core::Connection::getConnectionId |
( |
| ) |
|
Gets the ID of the current connection.
- Returns
- ID of the connection
◆ listContexts()
Gets a list of Contexts available for the user.
- Parameters
-
| pagingQuery | struct with list query parameters |
- Returns
- struct containing a list of Contexts
◆ listContextUsers()
Gets a list of users with their status and the last status change.
- Parameters
-
- Returns
- List of users with their status and the last status change
◆ setUserVerifier()
| void privmx::endpoint::core::Connection::setUserVerifier |
( |
std::shared_ptr< UserVerifierInterface > | verifier | ) |
|
Sets user's custom verification callback.
The feature allows the developer to set up a callback for user verification. A developer can implement an interface and pass the implementation to the function. Each time data is read from the container, a callback will be triggered, allowing the developer to validate the sender in an external service, e.g. Developer's Application Server or PKI Server.
- Parameters
-
◆ subscribeFor()
| std::vector< std::string > privmx::endpoint::core::Connection::subscribeFor |
( |
const std::vector< std::string > & | subscriptionQueries | ) |
|
Subscribe for the Context events on the given subscription query.
- Parameters
-
| subscriptionQueries | List of queries |
- Returns
- List of subscriptionIds in matching order to subscriptionQueries
◆ unsubscribeFrom()
| void privmx::endpoint::core::Connection::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: