From: Cho Woong Suk Date: Thu, 12 Oct 2017 05:01:10 +0000 (+0900) Subject: add plugin api to set coreclr info X-Git-Tag: submit/tizen/20171017.020053^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8880e9c986ae1d0037ef812e0b2f59981a96e804;p=platform%2Fcore%2Fdotnet%2Flauncher.git add plugin api to set coreclr info Change-Id: I83f76c7cfbb939e6b397150db1675c41e264b7fb --- diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index 6adff4b..7734df5 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -46,6 +46,7 @@ CoreRuntime::CoreRuntime() : pluginInitialize(nullptr), pluginPreload(nullptr), pluginSetAppInfo(nullptr), + pluginSetCoreclrInfo(nullptr), pluginGetDllPath(nullptr), pluginBeforeExecute(nullptr), pluginFinalize(nullptr) @@ -79,6 +80,7 @@ CoreRuntime::CoreRuntime() : pluginInitialize = (plugin_initialize_ptr)dlsym(__pluginLib, "plugin_initialize"); pluginPreload = (plugin_preload_ptr)dlsym(__pluginLib, "plugin_preload"); pluginSetAppInfo = (plugin_set_app_info_ptr)dlsym(__pluginLib, "plugin_set_app_info"); + pluginSetCoreclrInfo = (plugin_set_coreclr_info_ptr)dlsym(__pluginLib, "plugin_set_coreclr_info"); pluginGetDllPath = (plugin_get_dll_path_ptr)dlsym(__pluginLib, "plugin_get_dll_path"); pluginBeforeExecute = (plugin_before_execute_ptr)dlsym(__pluginLib, "plugin_before_execute"); pluginFinalize = (plugin_finalize_ptr)dlsym(__pluginLib, "plugin_finalize"); @@ -211,6 +213,9 @@ bool CoreRuntime::initializeCoreClr(const char* appId, return false; } + if (pluginSetCoreclrInfo) + pluginSetCoreclrInfo(__hostHandle, __domainId); + _DBG("Initialize core clr success"); return true; } @@ -280,6 +285,7 @@ void CoreRuntime::dispose() pluginInitialize = nullptr; pluginPreload = nullptr; pluginSetAppInfo = nullptr; + pluginSetCoreclrInfo = nullptr; pluginGetDllPath = nullptr; pluginBeforeExecute = nullptr; pluginFinalize = nullptr; diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.h b/NativeLauncher/launcher/dotnet/dotnet_launcher.h index 931846c..aaaa9d8 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.h +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.h @@ -56,7 +56,11 @@ extern "C" typedef void (*plugin_set_app_info_ptr)( const char* appId, - const char* hostHandle); + const char* managedAssemblyPath); + + typedef void (*plugin_set_coreclr_info_ptr)( + void* hostHandle, + unsigned int domainId); typedef char* (*plugin_get_dll_path_ptr)(); @@ -103,6 +107,7 @@ class CoreRuntime : public tizen::runtime::LauncherInterface plugin_initialize_ptr pluginInitialize; plugin_preload_ptr pluginPreload; plugin_set_app_info_ptr pluginSetAppInfo; + plugin_set_coreclr_info_ptr pluginSetCoreclrInfo; plugin_get_dll_path_ptr pluginGetDllPath; plugin_before_execute_ptr pluginBeforeExecute; plugin_finalize_ptr pluginFinalize;