diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/nativebridge/native_bridge.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/nativebridge/native_bridge.h b/include/nativebridge/native_bridge.h index c588bbc0e..16939f1e1 100644 --- a/include/nativebridge/native_bridge.h +++ b/include/nativebridge/native_bridge.h @@ -24,15 +24,25 @@ namespace android { struct NativeBridgeRuntimeCallbacks; -// Initialize the native bridge, if any. Should be called by Runtime::Init(). -// A null library filename signals that we do not want to load a native bridge. -void SetupNativeBridge(const char* native_bridge_library_filename, - const NativeBridgeRuntimeCallbacks* runtime_callbacks); +// Open the native bridge, if any. Should be called by Runtime::Init(). A null library filename +// signals that we do not want to load a native bridge. +bool LoadNativeBridge(const char* native_bridge_library_filename, + const NativeBridgeRuntimeCallbacks* runtime_callbacks); -// Check whether a native bridge is available (initialized). Requires a prior call to -// SetupNativeBridge to make sense. +// Initialize the native bridge, if any. Should be called by Runtime::DidForkFromZygote. +bool InitializeNativeBridge(); + +// Unload the native bridge, if any. Should be called by Runtime::DidForkFromZygote. +void UnloadNativeBridge(); + +// Check whether a native bridge is available (opened or initialized). Requires a prior call to +// LoadNativeBridge. bool NativeBridgeAvailable(); +// Check whether a native bridge is available (initialized). Requires a prior call to +// LoadNativeBridge & InitializeNativeBridge. +bool NativeBridgeInitialized(); + // Load a shared library that is supported by the native bridge. void* NativeBridgeLoadLibrary(const char* libpath, int flag); |