2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 typedef int (*coreclr_initialize_ptr)(
23 const char* appDomainFriendlyName,
25 const char** propertyKeys,
26 const char** propertyValues,
28 unsigned int* domainId);
30 typedef int (*coreclr_execute_assembly_ptr)(
32 unsigned int domainId,
35 const char* managedAssemblyPath,
36 unsigned int* exitCode);
38 typedef int (*coreclr_shutdown_ptr)(
40 unsigned int domainId);
42 typedef int (*coreclr_create_delegate_ptr)(
44 unsigned int domainId,
45 const char* entryPointAssemblyName,
46 const char* entryPointTypeName,
47 const char* entryPointMethodName,
53 namespace dotnetcore {
55 typedef void (*PreparedFunctionPtr)();
56 typedef bool (*LaunchFunctionPtr)(const char* root, const char* path, int argc, char* argv[]);
58 class CoreRuntime : public tizen::runtime::LauncherInterface
63 int Initialize(bool standalone) override;
64 void Dispose() override;
65 int RunManagedLauncher(const char* app_id, const char* app_base, const char* tpa_list) override;
66 int Launch(const char* app_id, const char* root, const char* path, int argc, char* argv[]) override;
69 bool InitializeCoreClr(const char* app_id, const char* assembly_probe_paths, const char* pinvoke_probe_paths, const char* tpa);
70 coreclr_initialize_ptr InitializeClr;
71 coreclr_execute_assembly_ptr ExecuteAssembly;
72 coreclr_shutdown_ptr Shutdown;
73 coreclr_create_delegate_ptr CreateDelegate;
74 std::string DeviceAPIDirectory;
75 std::string RuntimeDirectory;
76 std::string LauncherAssembly;
77 std::string NativeLibDirectory;
80 unsigned int domainId;
81 PreparedFunctionPtr PreparedFunction;
82 LaunchFunctionPtr LaunchFunction;
86 } // namespace runtime