Update change log and spec for wrt-plugins-tizen_0.4.9
[platform/framework/web/wrt-plugins-tizen.git] / src / Application / IApplicationManager.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #ifndef TIZENAPIS_API_APPLICATION_IAPPLICATION_MANAGER_H_
19 #define TIZENAPIS_API_APPLICATION_IAPPLICATION_MANAGER_H_
20
21 #include <dpl/shared_ptr.h>
22 #include <Commons/ThreadPool.h>
23 #include "EventApplicationGetCurrApp.h"
24 #include "EventApplicationLaunch.h"
25 #include "EventApplicationKill.h"
26 #include "EventApplicationLaunchAppControl.h"
27 #include "EventApplicationFindAppControl.h"
28 #include "EventApplicationGetAppsContext.h"
29 #include "EventApplicationGetAppContext.h"
30 #include "EventApplicationGetAppsInfo.h"
31 #include "EventApplicationGetAppInfo.h"
32 #include "EventApplicationAddAppInfoEventListener.h"
33 #include "EventApplicationRemoveAppInfoEventListener.h"
34 #include "EventApplicationGetAppCerts.h"
35
36 namespace DeviceAPI {
37 namespace Application {
38
39 class IApplicationManager :
40         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationGetCurrApp>,
41         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationLaunch>,
42         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationKill>,
43         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationLaunchAppControl>,
44         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationLaunchAppControlReply>,
45         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationFindAppControl>,
46         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationGetAppsContext>,
47         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationGetAppContext>,
48         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationGetAppsInfo>,
49         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationGetAppInfo>,
50         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationAddAppInfoEventListener>,
51         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationRemoveAppInfoEventListener>,
52         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationGetAppCerts>
53 {
54 public:
55         virtual ~IApplicationManager();
56         virtual void getCurrentApplication(const EventApplicationGetCurrAppPtr& event) = 0;
57         virtual void launch(const EventApplicationLaunchPtr& event) = 0;
58         virtual void kill(const EventApplicationKillPtr& event) = 0;
59         virtual void launchAppControl(const EventApplicationLaunchAppControlPtr& event) = 0;
60         virtual void findAppControl(const EventApplicationFindAppControlPtr& event) = 0;
61         virtual void getAppsContext(const EventApplicationGetAppsContextPtr& event) = 0;
62         virtual void getAppContext(const EventApplicationGetAppContextPtr& event) = 0;
63         virtual void getAppsInfo(const EventApplicationGetAppsInfoPtr& event) = 0;
64         virtual void getAppInfo(const EventApplicationGetAppInfoPtr& event) = 0;
65         virtual void addAppInfoEventListener(const EventApplicationAddAppInfoEventListenerPtr& event) = 0;
66         virtual void removeAppInfoEventListener(const EventApplicationRemoveAppInfoEventListenerPtr& event) = 0;
67         virtual void getAppCerts(const EventApplicationGetAppCertsPtr& event) = 0;
68
69 protected:
70         IApplicationManager();
71
72         virtual void OnRequestReceived(const EventApplicationGetCurrAppPtr& event) = 0;
73         virtual void OnRequestReceived(const EventApplicationLaunchPtr& event) = 0;
74         virtual void OnRequestReceived(const EventApplicationKillPtr& event) = 0;
75         virtual void OnRequestReceived(const EventApplicationLaunchAppControlPtr& event) = 0;
76         virtual void OnRequestReceived(const EventApplicationLaunchAppControlReplyPtr& event) = 0;
77         virtual void OnRequestReceived(const EventApplicationFindAppControlPtr& event) = 0;
78         virtual void OnRequestReceived(const EventApplicationGetAppsContextPtr& event) = 0;
79         virtual void OnRequestReceived(const EventApplicationGetAppContextPtr& event) = 0;
80         virtual void OnRequestReceived(const EventApplicationGetAppsInfoPtr& event) = 0;
81         virtual void OnRequestReceived(const EventApplicationGetAppInfoPtr& event) = 0;
82         virtual void OnRequestReceived(const EventApplicationAddAppInfoEventListenerPtr& event) = 0;
83         virtual void OnRequestReceived(const EventApplicationRemoveAppInfoEventListenerPtr& event) = 0;
84         virtual void OnRequestReceived(const EventApplicationGetAppCertsPtr& event) = 0;
85  };
86
87 typedef DPL::SharedPtr<IApplicationManager> IApplicationManagerPtr;
88
89 } // Application
90 } // DeviceAPI
91
92 #endif // TIZENAPIS_API_APPLICATION_IAPPLICATION_MANAGER_H_