Add SetSwitch API to Tizen.Runtime
[platform/core/dotnet/launcher.git] / NativeLauncher / launcher / lib / core_runtime.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 __CORE_RUNTIME_H__
18 #define __CORE_RUNTIME_H__
19
20 #include <string>
21
22 #include "coreclr_host.h"
23 #include "path_manager.h"
24
25 enum LaunchMode {
26         corerun = 0,
27         loader,
28         launcher
29 };
30
31 namespace tizen {
32 namespace runtime {
33 namespace dotnetcore {
34
35 typedef bool (*set_environment_variable_ptr)(const char* name, const char* value);
36 typedef bool (*stop_profile_after_delay_ptr)(int sec);
37 typedef bool (*set_switch_ptr)(const char* name, bool value);
38
39 class CoreRuntime
40 {
41         public:
42                 static int initialize(const char* appType, LaunchMode launchMode);
43                 static void finalize();
44                 static int launch(const char* appId, const char* root, const char* path, int argc, char* argv[], bool profile);
45
46         private:
47                 static PathManager* __pm;
48 };
49
50 }  // dotnetcore
51 }  // namespace runtime
52 }  // namespace tizen
53
54 #endif /* __CORE_RUNTIME_H__ */