Presence

class Presence : PresenceRust

The entrypoint for all actions that relate presence of other peers known by the current peer, either directly or through other peers.

You don't create one directly but can access it from a particular Ditto instance via its presence property.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()

Used to stop callbacks.

Link copied to clipboard
open override fun delete()
Link copied to clipboard
open fun getIs_closing(): Boolean
Link copied to clipboard
fun observe(handler: (DittoPresenceGraph) -> Unit): DittoPresenceObserver
fun observe(callback: DittoPresenceObserverCallback): DittoPresenceObserver

Request information about Ditto peers in the local peer-to-peer network. The V3 observer differs from observePeersV2 by delivering strongly typed objects with documentation in addition to an easy way to get a JSON representation of the presence object graph.

Link copied to clipboard
open fun register_v1()
Link copied to clipboard
open fun register_v2()
Link copied to clipboard
open fun register_v3()
Link copied to clipboard
open fun release()
Link copied to clipboard
open fun requestUpdate(): String
Link copied to clipboard
open fun requestV1Update()
Link copied to clipboard
open fun requestV2Update()
Link copied to clipboard
open fun requestV3Update()
Link copied to clipboard
open fun retain()
Link copied to clipboard
open fun setIs_closing(value: Boolean)
Link copied to clipboard
open override fun swigReleaseOwnership()
Link copied to clipboard
open override fun swigTakeOwnership()
Link copied to clipboard
open fun v1Callback(json: String)
Link copied to clipboard
open fun v2Callback(json: String)
Link copied to clipboard
open override fun v3Callback(json: String?)

Invoked by rust when there is an update to presence data.

Properties

Link copied to clipboard
val graph: DittoPresenceGraph

Get a single snapshot of information about Ditto peers in the local peer-to-peer network.