class DittoKit : Closeable
DittoKit
is the entry point for accessing Ditto-related functionality.
dependencies
- the dependencies required by the SDK to be initialised.
identity
- the identity to be used to represent the connected client.
dbConfig
- optional config that will be used to configure the internal database store.
DittoKit(dependencies: DittoKitDependencies, identity: DittoIdentity = DittoIdentity.Development(), dbConfig: DittoDBConfig = DittoDBConfig())
Creates a DittoKit instance. |
var activated: Boolean
flag indicating whether or not the SDK has been activated with an access license. |
|
var callback: DittoKitCallback?
an optional callback that will be called with lifecycle events relating to the SDK. |
|
val dependencies: DittoKitDependencies
the dependencies required by the SDK to be initialised. |
|
val siteID: UInt
the site ID component of the identity in use. |
|
val status: Status
the status of the network transports. |
|
val store: DittoStore
provides access to the SDK's store functionality. |
fun clearSiteID(): Unit
Clears the cached site ID, if one had been cached. |
|
fun close(): Unit
Closes the |
|
fun getTransportDiagnostics(): TransportDiagnostics
Request bulk status information about the transports. This is mostly intended for statistical or debugging purposes. |
|
fun refreshPermissions(): Unit
Provide a hint to DittoKit that app permissions may have changed. |
|
fun setAccessLicense(license: String): Unit
Activate a |
|
fun start(transports: Set<DittoTransports> = mutableSetOf(
DittoTransports.WiFi,
DittoTransports.Bluetooth
)): Unit
Start a set of transports being used by DittoKit to connect to other devices. This has no effect if a provided transport is already started. |
|
fun stop(transports: Set<DittoTransports>): Unit
Stop a set of transports from being used by DittoKit to connect to other devices. |