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 __PLUGIN_MANAGER_H__
18 #define __PLUGIN_MANAGER_H__
20 #include "coreclr_host.h"
22 typedef void (*plugin_initialize_ptr)(const char* appType);
23 typedef void (*plugin_preload_ptr)();
24 typedef void (*plugin_set_app_info_ptr)(
26 const char* managedAssemblyPath);
27 typedef bool (*plugin_has_log_control_ptr)();
28 typedef void (*plugin_set_coreclr_info_ptr)(
30 unsigned int domainId,
31 coreclr_create_delegate_ptr delegateFunc);
32 typedef char* (*plugin_get_dll_path_ptr)();
33 typedef char* (*plugin_get_extra_dll_path_ptr)();
34 typedef char* (*plugin_get_native_dll_searching_path_ptr)();
35 typedef char* (*plugin_get_tpa_ptr)();
36 typedef void (*plugin_before_execute_ptr)();
37 typedef void (*plugin_finalize_ptr)();
39 typedef struct PluginFunc {
40 plugin_initialize_ptr initialize;
41 plugin_preload_ptr preload;
42 plugin_has_log_control_ptr has_log_control;
43 plugin_set_app_info_ptr set_app_info;
44 plugin_set_coreclr_info_ptr set_coreclr_info;
45 plugin_get_dll_path_ptr get_dll_path;
46 plugin_get_extra_dll_path_ptr get_extra_dll_path;
47 plugin_get_native_dll_searching_path_ptr get_native_dll_searching_path;
48 plugin_get_tpa_ptr get_tpa;
49 plugin_before_execute_ptr before_execute;
50 plugin_finalize_ptr finalize;
55 bool pluginHasLogControl();
56 void pluginSetAppInfo(const char* appId, const char* managedAssemblyPath);
57 void pluginSetCoreclrInfo(void* hostHandle, unsigned int domainId, coreclr_create_delegate_ptr delegateFunc);
58 char* pluginGetDllPath();
59 char* pluginGetExtraDllPath();
60 char* pluginGetNativeDllSearchingPath();
62 void pluginBeforeExecute();
63 void pluginFinalize();
65 // initialize / finalize plugin manager
66 int initializePluginManager(const char* appType);
67 void finalizePluginManager();
69 #endif /* __PLUGIN_MANAGER_H__ */