Exposes an IVI service interface function in the
Every member function must have the
suspend modifier; compilation will fail otherwise. The
suspend modifier allows service implementations to suspend a function call and process other function calls before resuming the suspended function.
Member functions can have default implementations and can have default argument values. The default argument values may only reside at the end. A mix is not allowed.
Member function overloading is supported but argument types should not contain type aliases.
Each member function is exposed in the
<Interface>Api class in two variants:
fun <name>Async(..., onResult = null). When not
onResultis invoked when the service function execution completes with that result or when the execution failed.
A suspendable function, like
suspend fun co<Name>(...): <ReturnType>. This allows the function to be called from a Kotlin coroutine. The
co<Name>function throws an exception when the execution failed.