* limitations under the License.
*/
-#include "launcher.h"
-
-extern "C"
-{
- typedef int (*coreclr_initialize_ptr)(
- const char* exePath,
- const char* appDomainFriendlyName,
- int propertyCount,
- const char** propertyKeys,
- const char** propertyValues,
- void** hostHandle,
- unsigned int* domainId);
-
- typedef int (*coreclr_execute_assembly_ptr)(
- void* hostHandle,
- unsigned int domainId,
- int argc,
- const char** argv,
- const char* managedAssemblyPath,
- unsigned int* exitCode);
-
- typedef int (*coreclr_shutdown_ptr)(
- void* hostHandle,
- unsigned int domainId);
+#ifndef __DOTNET_LAUNCHER_H__
+#define __DOTNET_LAUNCHER_H__
- typedef int (*coreclr_create_delegate_ptr)(
- void* hostHandle,
- unsigned int domainId,
- const char* entryPointAssemblyName,
- const char* entryPointTypeName,
- const char* entryPointMethodName,
- void** delegate);
-}
+#include "launcher.h"
+#include "coreclr_host.h"
+#include "plugin_manager.h"
namespace tizen {
namespace runtime {
namespace dotnetcore {
-typedef void (*PreparedFunctionPtr)();
-typedef bool (*LaunchFunctionPtr)(const char* root, const char* path, int argc, char* argv[]);
-
-class CoreRuntime : public tizen::runtime::LauncherInterface
+class CoreRuntime
{
- public:
- CoreRuntime();
- ~CoreRuntime();
- int Initialize(bool standalone) override;
- void Dispose() override;
- int RunManagedLauncher(const char* app_id, const char* app_base, const char* tpa_list) override;
- int Launch(const char* app_id, const char* root, const char* path, int argc, char* argv[]) override;
-
- private:
- bool InitializeCoreClr(const char* app_id, const char* assembly_probe_paths, const char* pinvoke_probe_paths, const char* tpa);
- coreclr_initialize_ptr InitializeClr;
- coreclr_execute_assembly_ptr ExecuteAssembly;
- coreclr_shutdown_ptr Shutdown;
- coreclr_create_delegate_ptr CreateDelegate;
- std::string DeviceAPIDirectory;
- std::string RuntimeDirectory;
- std::string LauncherAssembly;
- std::string NativeLibDirectory;
- void* coreclrLib;
- void* hostHandle;
- unsigned int domainId;
- PreparedFunctionPtr PreparedFunction;
- LaunchFunctionPtr LaunchFunction;
+ public:
+ CoreRuntime(const char* mode);
+ ~CoreRuntime();
+ int initialize(bool standalone);
+ void dispose();
+ int launch(const char* appId, const char* root, const char* path, int argc, char* argv[]);
+
+ private:
+
+ bool initializeCoreClr(const char* appId, const char* assemblyProbePaths, const char* NIProbePaths, const char* pinvokeProbePaths, const char* tpaList);
+ void preloadTypes();
+ coreclr_initialize_ptr initializeClr;
+ coreclr_execute_assembly_ptr executeAssembly;
+ coreclr_shutdown_ptr shutdown;
+ coreclr_create_delegate_ptr createDelegate;
+ set_environment_variable_ptr setEnvironmentVariable;
+ std::string __nativeLibDirectory;
+ void* __coreclrLib;
+ void* __hostHandle;
+ unsigned int __domainId;
+ int fd;
+ bool __initialized;
+ bool __enableLogManager;
+ bool __isProfileMode;
};
} // dotnetcore
} // namespace runtime
} // namespace tizen
+
+#endif /* __DOTNET_LAUNCHER_H__ */