Connection
'Connection' represents and manages the current connection between the Endpoint and the Bridge server.
Static Methods
connect
Connects to the PrivMX Bridge server.
Params
userPrivKey
const std::string &
user's private key
solutionId
const std::string &
ID of the Solution
bridgeUrl
const std::string &
Bridge Server URL
verificationOptions
const PKIVerificationOptions &
PrivMX Bridge server instance verification options using a PKI server
Returns
Connection
·
Connection object
connectPublic
Connects to the PrivMX Bridge Server as a guest user.
Params
solutionId
const std::string &
ID of the Solution
bridgeUrl
const std::string &
Bridge Server URL
verificationOptions
const PKIVerificationOptions &
PrivMX Bridge server instance verification options using a PKI server
Returns
Connection
·
Connection object
Methods
getConnectionId
Gets the ID of the current connection.
Returns
int64_t
·
ID of the connection
listContexts
Gets a list of Contexts available for the user.
Params
pagingQuery
const PagingQuery &
struct with list query parameters
Returns
PagingList<Context>
·
struct containing a list of Contexts
listContextUsers
Gets a list of users with their status and the last status change.
Params
contextId
const std::string &
ID of the Context
pagingQuery
const PagingQuery &
Returns
PagingList<UserInfo>
·
List of users with their status and the last status change
subscribeFor
Subscribe for the Context events on the given subscription query.
Params
subscriptionQueries
const std::vector<std::string> &
List of queries
Returns
std::vector<std::string>
·
List of subscriptionIds in matching order to subscriptionQueries
unsubscribeFrom
Unsubscribe from events for the given subscriptionId.
Params
subscriptionIds
const std::vector<std::string> &
List of subscriptionId
buildSubscriptionQuery
Generate subscription Query for the Context events.
Params
eventType
EventType
type of event which you listen for
selectorType
EventSelectorType
scope on which you listen for events
selectorId
const std::string &
ID of the selector
Returns
std::string
·
disconnect
Disconnects from the PrivMX Bridge server.
setUserVerifier
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.
Params
verifier
std::shared_ptr<UserVerifierInterface>
an implementation of the UserVerifierInterface
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.