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_PLUGIN_H__
18 #define __DOTNET_LAUNCHER_PLUGIN_H__
20 #include "coreclr_host.h"
25 * @brief initialize plugin code
26 * @param[in] mode mode of plugin ("default", "inhouse", etc)
28 void plugin_initialize(const char* mode);
31 * @brief preload libraries. this fuction is called in the candidate process only
33 void plugin_preload();
36 * @brief check whether plugin controls output log or not.
37 * @return true if plugin control logging, otherwise false
39 bool plugin_has_log_control();
42 * @brief set appInfo to plugin
43 * @param[in] appID application ID to launch
44 * @param[in] assemblyPath assembly path which has entry point
46 void plugin_set_app_info(const char* appId,
47 const char* assemblyPath);
50 * @brief set coreclr info to plugin
51 * @param[in] hostHandle host handle of coreclr
52 * @param[in] domainId current domain ID
53 * @param[in] coreclr_create_delegate_ptr function pointer of coreclr_create_delegate
54 * delegate function can be used to preload managed code
56 void plugin_set_coreclr_info(void* hostHandle,
57 unsigned int domainId,
58 coreclr_create_delegate_ptr delegateFunc);
61 * @brief return additional pathes to find platform assembly.
62 * @return ":" seperated pathes
64 char* plugin_get_dll_path();
67 * @brief function will be called before invoking managed code
69 void plugin_before_execute();
72 * @brief function will be called when application is terminated
74 void plugin_finalize();
77 #endif /* __DOTNET_LAUNCHER_PLUGIN_H__ */