Connection

expect class Connection : AutoCloseable

Manages a connection between the PrivMX Endpoint and PrivMX Bridge server.

actual class Connection : AutoCloseable

Manages a connection between the PrivMX Endpoint and PrivMX Bridge server

actual class Connection : AutoCloseable

Manages a connection between the PrivMX Endpoint and PrivMX Bridge server.

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Functions

Link copied to clipboard
expect fun buildSubscriptionQuery(eventType: CoreEventType, selectorType: CoreEventSelectorType, selectorId: String): String

Generate subscription Query for the Context events.

actual fun buildSubscriptionQuery(eventType: CoreEventType, selectorType: CoreEventSelectorType, selectorId: String): String

Generate subscription Query for the Context events.

actual fun buildSubscriptionQuery(eventType: CoreEventType, selectorType: CoreEventSelectorType, selectorId: String): String

Generate subscription Query for the Context events.

Link copied to clipboard
expect open override fun close()

If there is an active connection then it disconnects from PrivMX Bridge and frees memory making this instance not reusable.

actual open override fun close()

If there is an active connection then it disconnects from PrivMX Bridge and frees memory making this instance not reusable.

actual open override fun close()

If there is an active connection then it disconnects from PrivMX Bridge and frees memory making this instance not reusable.

Link copied to clipboard
expect fun disconnect()

Disconnects from PrivMX Bridge server.

actual fun disconnect()

Disconnects from PrivMX Bridge server.

actual external fun disconnect()

Disconnects from PrivMX Bridge server.

Link copied to clipboard
expect fun getConnectionId(): Long?

Gets the ID of the current connection.

actual fun getConnectionId(): Long?

Gets the ID of the current connection.

actual external fun getConnectionId(): Long?

Gets the ID of the current connection.

Link copied to clipboard
expect fun listContexts(skip: Long, limit: Long, sortOrder: String = "desc", lastId: String? = null, queryAsJson: String? = null, sortBy: String? = null): PagingList<Context>

Gets a list of Contexts available for the user.

actual fun listContexts(skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<Context>

Gets a list of Contexts available for the user.

actual external fun listContexts(skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<Context>

Gets a list of Contexts available for the user.

Link copied to clipboard
expect fun listContextUsers(contextId: String, skip: Long, limit: Long, sortOrder: String = "desc", lastId: String? = null, queryAsJson: String? = null, sortBy: String? = null): PagingList<UserInfo>

Gets a list of users with their status and the last status change.

actual fun listContextUsers(contextId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<UserInfo>

Gets a list of users with their status and the last status change.

actual external fun listContextUsers(contextId: String, skip: Long, limit: Long, sortOrder: String, lastId: String?, queryAsJson: String?, sortBy: String?): PagingList<UserInfo>

Gets a list of users with their status and the last status change.

Link copied to clipboard
expect fun setUserVerifier(userVerifier: UserVerifierInterface)

Sets user's custom verification callback.

actual fun setUserVerifier(userVerifier: UserVerifierInterface)

Sets user's custom verification callback.

actual external fun setUserVerifier(userVerifier: UserVerifierInterface)

Sets user's custom verification callback.

Link copied to clipboard
expect fun subscribeFor(subscriptionQueries: List<String>): List<String>

Subscribe for the Context events on the given subscription query.

actual fun subscribeFor(subscriptionQueries: List<String>): List<String>

Subscribe for the Context events on the given subscription query.

actual external fun subscribeFor(subscriptionQueries: List<String>): List<String>

Subscribe for the Context events on the given subscription query.

Link copied to clipboard
expect fun unsubscribeFrom(subscriptionIds: List<String>)

Unsubscribe from events for the given subscriptionId.

actual fun unsubscribeFrom(subscriptionIds: List<String>)

Unsubscribe from events for the given subscriptionId.

actual external fun unsubscribeFrom(subscriptionIds: List<String>)

Unsubscribe from events for the given subscriptionId.