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.
17 #ifndef __DOTNET_LAUNCHER_H__
18 #define __DOTNET_LAUNCHER_H__
24 typedef int (*coreclr_initialize_ptr)(
26 const char* appDomainFriendlyName,
28 const char** propertyKeys,
29 const char** propertyValues,
31 unsigned int* domainId);
33 typedef int (*coreclr_execute_assembly_ptr)(
35 unsigned int domainId,
38 const char* managedAssemblyPath,
39 unsigned int* exitCode);
41 typedef int (*coreclr_shutdown_ptr)(
43 unsigned int domainId);
45 typedef int (*coreclr_create_delegate_ptr)(
47 unsigned int domainId,
48 const char* entryPointAssemblyName,
49 const char* entryPointTypeName,
50 const char* entryPointMethodName,
56 namespace dotnetcore {
58 typedef void (*PreparedFunctionPtr)();
59 typedef bool (*LaunchFunctionPtr)(const char* root, const char* path, int argc, char* argv[]);
61 class CoreRuntime : public tizen::runtime::LauncherInterface
66 int initialize(bool standalone) override;
67 void dispose() override;
68 int runManagedLauncher(const char* appId, const char* appBase, const char* tpaList) override;
69 int launch(const char* appId, const char* root, const char* path, int argc, char* argv[]) override;
72 bool initializeCoreClr(const char* appId, const char* assemblyProbePaths, const char* pinvokeProbePaths, const char* tpaList);
73 coreclr_initialize_ptr initializeClr;
74 coreclr_execute_assembly_ptr executeAssembly;
75 coreclr_shutdown_ptr shutdown;
76 coreclr_create_delegate_ptr createDelegate;
77 std::string __deviceAPIDirectory;
78 std::string __runtimeDirectory;
79 std::string __launcherAssembly;
80 std::string __nativeLibDirectory;
83 unsigned int __domainId;
84 PreparedFunctionPtr preparedFunction;
85 LaunchFunctionPtr launchFunction;
89 } // namespace runtime
92 #endif /* __DOTNET_LAUNCHER_H__ */