SyncApiClient

Properties

Link copied to clipboard
abstract val currentSyncState: StateFlow<SyncState>

Functions

Link copied to clipboard
abstract suspend fun cancel()
Link copied to clipboard
abstract suspend fun emit(events: SyncEvents)
Link copied to clipboard
abstract suspend fun start(filter: String? = null, setPresence: Presence? = null, timeout: Duration = 30.seconds)
Link copied to clipboard
abstract suspend fun <T> startOnce(filter: String? = null, setPresence: Presence? = null, timeout: Duration = ZERO, runOnce: suspend (SyncEvents) -> T): Result<T>
Link copied to clipboard
suspend fun SyncApiClient.startOnce(filter: String? = null, setPresence: Presence? = null, timeout: Duration = ZERO): Result<Unit>
Link copied to clipboard
abstract suspend fun stop()
Link copied to clipboard
abstract fun subscribe(priority: Int, subscriber: Subscriber<SyncEvents>): Unsubscriber
Link copied to clipboard
abstract suspend fun sync(filter: String? = null, since: String? = null, fullState: Boolean = false, setPresence: Presence? = null, timeout: Duration = ZERO, useStateAfter: Boolean? = null): Result<Sync.Response>

This is the plain sync request. If you want to subscribe to events and more, use start or startOnce.