+static int native_bridge3_unloadLibrary(void *handle)
+{
+ LOGV("enter native_bridge3_unloadLibrary %p", handle);
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb ? cb->unloadLibrary(handle) : -1;
+}
+
+static const char *native_bridge3_getError()
+{
+ LOGV("enter native_bridge3_getError");
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb ? cb->getError() : "unknown";
+}
+
+static bool native_bridge3_isPathSupported(const char *path)
+{
+ LOGV("enter native_bridge3_isPathSupported %s", path);
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb && cb->isPathSupported(path);
+}
+
+static bool native_bridge3_initAnonymousNamespace(const char *public_ns_sonames,
+ const char *anon_ns_library_path)
+{
+ LOGV("enter native_bridge3_initAnonymousNamespace %s, %s", public_ns_sonames, anon_ns_library_path);
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb && cb->initAnonymousNamespace(public_ns_sonames, anon_ns_library_path);
+}
+
+static native_bridge_namespace_t *
+native_bridge3_createNamespace(const char *name,
+ const char *ld_library_path,
+ const char *default_library_path,
+ uint64_t type,
+ const char *permitted_when_isolated_path,
+ native_bridge_namespace_t *parent_ns)
+{
+ LOGV("enter native_bridge3_createNamespace %s, %s, %s, %s", name, ld_library_path, default_library_path, permitted_when_isolated_path);
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb ? cb->createNamespace(name, ld_library_path, default_library_path, type, permitted_when_isolated_path, parent_ns) : nullptr;
+}
+
+static bool native_bridge3_linkNamespaces(native_bridge_namespace_t *from,
+ native_bridge_namespace_t *to,
+ const char *shared_libs_soname)
+{
+ LOGV("enter native_bridge3_linkNamespaces %s", shared_libs_soname);
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb && cb->linkNamespaces(from, to, shared_libs_soname);
+}
+
+static void *native_bridge3_loadLibraryExt(const char *libpath,
+ int flag,
+ native_bridge_namespace_t *ns)
+{
+ LOGV("enter native_bridge3_loadLibraryExt %s, %d, %p", libpath, flag, ns);
+ NativeBridgeCallbacks *cb = get_callbacks();
+ void *result = cb ? cb->loadLibraryExt(libpath, flag, ns) : nullptr;
+// void *result = cb ? cb->loadLibrary(libpath, flag) : nullptr;
+ LOGV("native_bridge3_loadLibraryExt: %p", result);
+ return result;
+}
+
+static native_bridge_namespace_t *native_bridge4_getVendorNamespace()
+{
+ LOGV("enter native_bridge4_getVendorNamespace");
+ NativeBridgeCallbacks *cb = get_callbacks();
+ return cb ? cb->getVendorNamespace() : nullptr;
+}
+