Package com.tomtom.ivi.platform.framework.api.ipc.iviservice

General API of TomTom Digital Cockpit's IPC framework.

Most of the classes are used by the generated code specific to an IVI service interface.

Types

Link copied to clipboard
typealias AnyIviServiceApiBase = IviServiceApiBase<*, *, *, *>
Link copied to clipboard
typealias AnyIviServiceBase = IviServiceBase<*, *>
Link copied to clipboard
typealias ChangeHandler<T> = (oldValue: T?, newValue: T) -> Unit

Callback for handling a property change.

The first callback argument is the old value of the property. For non-null properties the old value is set to null when the property is being initialized.

The second callback argument is the new value of the property.

Link copied to clipboard
data class FunSequenceId(id: Long = 0) : Parcelable

Used to tie requests and completion tracer events together. Both request and completion events will log the same sequence identifier if they refer to the same request.

Link copied to clipboard
class FunSequenceIds

Keeps track of, and provides, the next function call ID. Useful for trace events.

Link copied to clipboard
fun interface IpcMessageDispatchFailureListener

Called when dispatching an IPC message resulted in an Exception.

Link copied to clipboard
fun interface IviDiscoverableServiceIdProvider

Function interface to provide an IviServiceId for a discoverable IVI service interface.

Link copied to clipboard
data class IviDiscoverableServiceIdsMap(discoverableServiceIds: Map<KClass<*>, List<IviServiceId>> = emptyMap())
Link copied to clipboard
interface IviInstanceBoundIviServiceProvider : IviServiceProvider

An IviServiceProvider that is bound to an IviInstanceId.

Link copied to clipboard
interface IviServiceApi<C : IviServiceConnection<P, PO>, P : Any, PO : IviServicePropertiesObserver, LP : Any>

A base interface for the APIs that clients of IVI services interact with.

Link copied to clipboard
abstract class IviServiceApiBase<C : IviServiceConnection<P, PO>, P : Any, PO : IviServicePropertiesObserver, LP : Any> constructor(    connectionManager: IviServiceConnectionManager<C, LP>,     lifecycleOwner: LifecycleOwner,     serviceId: IviServiceId,     iviInstanceIdProvider: IviInstanceIdProvider) : IviServiceApi<C, P, PO, LP>

Base class for <Interface>Api classes.

Link copied to clipboard
abstract class IviServiceBase<P : Any, PO : IviServicePropertiesObserver> constructor(iviServiceHostContext: IviServiceHostContext) : LifecycleOwner

Base for the generated base classes of IVI Services.

Link copied to clipboard
interface IviServiceConnection<P, PO : IviServicePropertiesObserver>

Interface for all IVI service connections.

Link copied to clipboard
interface IviServiceConnectionFactory

Factory interface for connections for IVI services.

Link copied to clipboard
interface IviServiceConnectionManager<C : IviServiceConnection<*, *>, LP>

Interface for IVI service connection managers.

Link copied to clipboard

Thrown when an IVI service function resulted in a CancellationException.

Link copied to clipboard
class IviServiceFunctionException : Exception

Thrown when an IVI service function resulted in cause.

Link copied to clipboard
class IviServiceFunResult<V>

Represents the result of an asynchronous IVI service function call.

Link copied to clipboard
data class IviServiceGenerationId(val generation: Int) : Parcelable

Denotes the generation of an IVI service.

Link copied to clipboard
abstract class IviServiceHostBase(iviServiceHostContext: IviServiceHostContext)

A host for one or more IVI services.

Link copied to clipboard
abstract class IviServiceHostBuilder

Base class for IviServiceHostBase builders.

Link copied to clipboard
interface IviServiceHostContext : IviInstanceIdProvider

An entry point for an IVI service host to communicate with the rest of the system.

Link copied to clipboard
interface IviServiceHostContextFactory

Factory for IVI service host context instances.

Link copied to clipboard
interface IviServiceHostContextFactoryProvider
Link copied to clipboard
data class IviServiceHostId(val id: String) : Parcelable

An IVI service host ID.

Link copied to clipboard
data class IviServiceHostStatus(    val iviInstanceId: IviInstanceId?,     val started: Boolean,     val serviceStatus: Map<IviServiceId, IviServiceStatus>,     val pid: Int?)
Link copied to clipboard
interface IviServiceHostStatusProvider

Provides the status of the IVI service hosts.

Link copied to clipboard
data class IviServiceId(val id: String) : Parcelable

An IVI service ID.

Link copied to clipboard
abstract class IviServiceLiveDataPropertiesBase<P, O>

Base class for <Interface>LiveDataProperties classes.

Link copied to clipboard
interface IviServicePropertiesObserver

Super interface for any properties observer interface of an IVI service interface.

Link copied to clipboard
interface IviServicePropertyDelegate<T>

Interface to allow IVI service implementations to setup an IVI service property delegate.

Link copied to clipboard
interface IviServiceProvider : IviInstanceIdProvider

Allows <Interface>Api classes to obtain a service connection manager.

Link copied to clipboard
data class IviServiceStatus(val requested: Boolean, val state: IviServiceStatus.State)
Link copied to clipboard
class IviServiceUnavailableException constructor(serviceId: IviServiceId) : CancellationException

Thrown when an IVI service is unavailable.

Link copied to clipboard
typealias OnCompletedTraceCallbackType<R> = (IviServiceFunResult<R?>, R?) -> Unit
Link copied to clipboard
typealias OnResultCallbackType<R> = (IviServiceFunResult<R?>) -> Unit
Link copied to clipboard
class SimpleIviServiceHost(iviServiceHostContext: IviServiceHostContext, val iviServices: Collection<AnyIviServiceBase>) : IviServiceHostBase

A very simple IVI service host.

Link copied to clipboard
abstract class SimpleIviServiceHostBuilder : IviServiceHostBuilder

A simple IviServiceHostBuilder that builds a SimpleIviServiceHost with the IVI service implementation created by createIviServices.

Functions

Link copied to clipboard
fun <T : IviServiceApi<C, P, PO, LP>, C : IviServiceConnection<P, PO>, P : Any, PO : IviServicePropertiesObserver, LP : Any> T.queueOrRun(action: (T) -> Unit)

Runs an action if the service is available. Otherwise, it adds the action to a queue that will be processed when the service becomes available.