Add DRAFT stubs for Vehicle plugin
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Application / IApplication.h
1 /*
2  * Copyright (c) 2011 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 TIZENAPIS_API_IAPPLICATION_H_
18 #define TIZENAPIS_API_IAPPLICATION_H_
19
20 #include <dpl/shared_ptr.h>
21 #include <Commons/ThreadPool.h>
22 #include "EventListInstalledApplications.h"
23 #include "EventManageApplication.h"
24 #include "EventGetApplication.h"
25 #include "EventInstalledApplicationChanged.h"
26 #include "EventLaunchService.h"
27 #include "EventApplicationInstall.h"
28  
29 namespace TizenApis {
30 namespace Api {
31 namespace Application {
32
33 class EventListInstalledApplications;
34 class EventManageApplication;
35 class EventGetApplication;
36 class EventLaunchService;
37
38 class IApplication: public WrtDeviceApis::Commons::EventRequestReceiver<EventListInstalledApplications>,
39         public WrtDeviceApis::Commons::EventRequestReceiver<EventManageApplication>,
40         public WrtDeviceApis::Commons::EventRequestReceiver<EventGetApplication>,
41         public WrtDeviceApis::Commons::EventRequestReceiver<EventLaunchService>,
42         public WrtDeviceApis::Commons::EventRequestReceiver<EventApplicationInstall>
43 {
44 public:
45         virtual ~IApplication();
46         virtual void launch(const EventManageApplicationPtr& event) = 0;
47         virtual void kill(const EventManageApplicationPtr& event) = 0;
48         virtual void listApplications(const EventListInstalledApplicationsPtr& event) = 0;
49         virtual void getApplication(const EventGetApplicationPtr& event) = 0;
50         virtual long addApplicationInformationEventListener(const EventInstalledApplicationChangedEmitterPtr& emitter) = 0;
51         virtual void removeApplicationInformationEventListener(const long watchId) = 0;
52         virtual void launchService(const EventLaunchServicePtr& event) = 0;
53         virtual void getApplicationService(const EventLaunchServicePtr& event) = 0;
54         virtual void install(const EventApplicationInstallPtr& event) = 0;
55         virtual void uninstall(const EventApplicationInstallPtr& event) = 0;
56         virtual void update(const EventApplicationInstallPtr& event) = 0;
57
58  protected:
59         IApplication();
60
61         virtual void OnRequestReceived(const EventListInstalledApplicationsPtr& event) = 0;
62         virtual void OnRequestReceived(const EventManageApplicationPtr& event) = 0;
63         virtual void OnRequestReceived(const EventGetApplicationPtr& event) = 0;
64         virtual void OnRequestReceived(const EventLaunchServicePtr& event) = 0;
65         virtual void OnRequestReceived(const EventApplicationInstallPtr& event) = 0;
66
67  };
68
69 typedef DPL::SharedPtr<IApplication> IApplicationPtr;
70
71 }
72 }
73 }
74
75 #endif