Add installer plugin and tool for create a NI
[platform/core/dotnet/launcher.git] / NativeLauncher / launcher / launcher.h
1 #ifndef __LAUNCHER_INTERFACE_H__
2 #define __LAUNCHER_INTERFACE_H__
3
4 #include <string>
5 #include <functional>
6
7 namespace tizen {
8 namespace runtime {
9
10 class LauncherInterface
11 {
12   public:
13     virtual int Initialize(bool standalone) = 0;
14     virtual void Dispose() = 0;
15     virtual int RunManagedLauncher() = 0;
16     virtual int Launch(const char* root, const char* path, int argc, char* argv[]) = 0;
17 };
18
19 struct AppInfo
20 {
21   std::string root;
22   std::string path;
23   std::string id;
24   std::string pkg;
25   std::string type;
26 };
27
28 class LaunchpadAdapter
29 {
30   public:
31     virtual void LoaderMain(int argc, char* argv[]) = 0;
32     std::function<void()> OnCreate = nullptr;
33     std::function<void(const AppInfo&, int, char**)> OnLaunch = nullptr;
34     std::function<void(const AppInfo&, int, char**)> OnTerminate = nullptr;
35 };
36
37 extern LaunchpadAdapter& Launchpad;
38
39 }  // namespace runtime
40 }  // namespace tizen
41
42 #endif  // __LAUNCHER_INTERFACE_H__