-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,org.holochain.androidserviceruntime.service.Disposable,org.holochain.androidserviceruntime.service.RuntimeFfiInterface
public class RuntimeFfi implements Disposable, AutoCloseable, RuntimeFfiInterface
Slim wrapper around HolochainRuntime, with types compatible with Uniffi-generated FFI bindings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRuntimeFfi.Companion
-
Constructor Summary
Constructors Constructor Description RuntimeFfi(Pointer pointer)RuntimeFfi(NoPointer noPointer)This constructor can be used to instantiate a fake object.
-
Method Summary
Modifier and Type Method Description Unitdestroy()Unitclose()final PointeruniffiClonePointer()UnitauthorizeAppClient(String clientId, String installedAppId)Authorize a client to call the given app id UnitdisableApp(String installedAppId)Disable an installed app AppInfoFfienableApp(String installedAppId)Enable an installed app AppAuthFfiensureAppWebsocket(String installedAppId)Get or create an app websocket with an authentication for the given app id AppInfoFfiinstallApp(InstallAppPayloadFfi payload)Install an app BooleanisAppClientAuthorized(String clientId, String installedAppId)Is this client authorized to call the given app id? BooleanisAppInstalled(String installedAppId)Is an app with the given installed_app_id installed on the conductor List<AppInfoFfi>listApps()List apps installed on the conductor AppAuthFfisetupApp(InstallAppPayloadFfi payload, Boolean enableAfterInstall)Full process to setup an appCheck if app is installed, if not install it, then optionally enable it. ZomeCallParamsSignedFfisignZomeCall(ZomeCallParamsFfi zomeCallUnsigned)Sign a zome call Unitstop()Shutdown the holochain conductor UnituninstallApp(String installedAppId)Uninstall an app -
-
Method Detail
-
uniffiClonePointer
final Pointer uniffiClonePointer()
-
authorizeAppClient
Unit authorizeAppClient(String clientId, String installedAppId)
Authorize a client to call the given app id
-
disableApp
Unit disableApp(String installedAppId)
Disable an installed app
-
ensureAppWebsocket
AppAuthFfi ensureAppWebsocket(String installedAppId)
Get or create an app websocket with an authentication for the given app id
-
installApp
AppInfoFfi installApp(InstallAppPayloadFfi payload)
Install an app
-
isAppClientAuthorized
Boolean isAppClientAuthorized(String clientId, String installedAppId)
Is this client authorized to call the given app id?
-
isAppInstalled
Boolean isAppInstalled(String installedAppId)
Is an app with the given installed_app_id installed on the conductor
-
setupApp
AppAuthFfi setupApp(InstallAppPayloadFfi payload, Boolean enableAfterInstall)
Full process to setup an app
Check if app is installed, if not install it, then optionally enable it. Then ensure there is an app websocket and authentication for it.
If an app is already installed, it will not be enabled. It is only enabled after a successful install. The reasoning is that if an app is disabled after that point, it is assumed to have been manually disabled in the admin interface, which we don't want to override.
-
signZomeCall
ZomeCallParamsSignedFfi signZomeCall(ZomeCallParamsFfi zomeCallUnsigned)
Sign a zome call
-
uninstallApp
Unit uninstallApp(String installedAppId)
Uninstall an app
-
-
-
-