IviServiceConnection

interface IviServiceConnection<P, PO : IviServicePropertiesObserver>

Interface for all IVI service connections.

Parameterized by the properties class P and a properties observer interface PO.

An IVI service connection represents a connection with an IVI service.

Properties

Link copied to clipboard
abstract val scope: CoroutineScope

Coroutine scope of the service. Canceled on disconnect.

Link copied to clipboard
abstract val serviceLifecycleState: LiveData<Lifecycle.State>

Mirrored lifecycle state of the IVI service.

Functions

Link copied to clipboard
abstract suspend fun connect()

Should be called after the IviServiceConnection instance is constructed.

Link copied to clipboard
abstract suspend fun disconnect()

Called when the connection is disconnected or about to be disconnected.

Link copied to clipboard
abstract suspend fun setPropertiesObserver(lifecycleOwner: LifecycleOwner, propertiesObserver: PO)

Registers the givens propertiesObserver for a given lifecycleOwner.

Inheritors

Link copied to clipboard