invoke

inline fun <T, R> invoke(uri: Uri, method: String, args: T? = null, env: WrapEnv? = null, resolutionContext: <Error class: unknown class>? = null): InvokeResult<R>

Invokes the wrapper at the specified URI with the provided method and arguments of type T, and environment.

Return

An InvokeResult containing the invocation result of type R, or an error if the invocation fails.

Parameters

uri

The URI of the wrapper to be invoked.

method

The method to be called on the wrapper.

args

An instance of serializable type T representing the arguments to be passed to the method.

env

A map representing the environment to be used during the invocation.

resolutionContext

The FfiUriResolutionContext to be used during URI resolution, or null for a default context. The caller owns resolutionContext and is responsible for closing it to prevent a memory leak.


inline fun <T, E, R> invoke(uri: Uri, method: String, args: T? = null, env: E, resolutionContext: <Error class: unknown class>? = null): InvokeResult<R>

Invokes the wrapper at the specified URI with the provided method and arguments of type T, and environment.

Return

An InvokeResult containing the invocation result of type R, or an error if the invocation fails.

Parameters

uri

The URI of the wrapper to be invoked.

method

The method to be called on the wrapper.

args

An instance of serializable type T representing the arguments to be passed to the method.

env

An instance of serializable type E representing the environment to be used during the invocation.

resolutionContext

The FfiUriResolutionContext to be used during URI resolution, or null for a default context. The caller owns resolutionContext and is responsible for closing it to prevent a memory leak.


inline fun <R> invoke(uri: Uri, method: String, args: Map<String, Any?>? = null, env: WrapEnv? = null, resolutionContext: <Error class: unknown class>? = null): InvokeResult<R>

Invokes the wrapper at the specified URI with the provided method, arguments, and environment.

Return

An InvokeResult containing the invocation result of type R, or an error if the invocation fails.

Parameters

uri

The URI of the wrapper to be invoked.

method

The method to be called on the wrapper.

args

A map of arguments to be passed to the method.

env

A map representing the environment to be used during the invocation.

resolutionContext

The FfiUriResolutionContext to be used during URI resolution, or null for a default context. The caller owns resolutionContext and is responsible for closing it to prevent a memory leak.