IviServiceConnectionBase

Base class for any <Interface>Connection interface implementation.

The coroutineDispatcher should enforce that all launched coroutines are executed in sequence. In other words, coroutines need to be executed on the same thread.

Parameters

P

The <Interface>Property class of the IVI service.

PO

The <Interface>PropertiesObserver interface of the IVI service.

connectionData

The connection data for this connection.

Constructors

Link copied to clipboard
fun IviServiceConnectionBase(connectionData: IviServiceConnectionData)

Properties

Link copied to clipboard
open override val scope: CoroutineScope

Coroutine scope of the service. Canceled on disconnect.

Inherited properties

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

Mirrored lifecycle state of the IVI service.

Functions

Link copied to clipboard
suspend override fun connect()

Should be called after the IviServiceConnection instance is constructed.

Link copied to clipboard
suspend override fun disconnect()

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

Link copied to clipboard
open override fun getLifecycle(): Lifecycle

Inherited functions

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
Link copied to clipboard