94e179859819690c78a81080b642a96c4ffc5ad2
[platform/core/dotnet/launcher.git] / NativeLauncher / inc / plugin_manager.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __PLUGIN_MANAGER_H__
18 #define __PLUGIN_MANAGER_H__
19
20 #include "dotnet_launcher_plugin.h"
21 #include "coreclr_host.h"
22
23 extern "C"
24 {
25
26
27 typedef struct PluginFunc {
28         plugin_initialize_ptr initialize;
29         plugin_preload_ptr preload;
30         plugin_set_app_info_ptr set_app_info;
31         plugin_set_coreclr_info_ptr set_coreclr_info;
32         plugin_get_dll_path_ptr get_dll_path;
33         plugin_before_execute_ptr before_execute;
34         plugin_finalize_ptr finalize;
35 } PluginFunc;
36
37 // plugin functions
38 void pluginPreload();
39 void pluginSetAppInfo(const char* appId, const char* managedAssemblyPath);
40 void pluginSetCoreclrInfo(void* hostHandle, unsigned int domainId, coreclr_create_delegate_ptr delegateFunc);
41 char* pluginGetDllPath();
42 void pluginBeforeExecute();
43
44 // initialize / finalize plugin manager
45 int initializePluginManager(const char* mode);
46 void finalizePluginManager();
47
48 }
49
50 #endif /* __PLUGIN_MANAGER_H__ */