0a155f74ebaa304115fe98e0094a4313240f7fcd
[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 "EventGetApplication.h"
24 #include "EventInstalledApplicationChanged.h"
25 #include "EventLaunchService.h"
26  
27 namespace TizenApis {
28 namespace Api {
29 namespace Application {
30
31 class EventListInstalledApplications;
32 class EventGetApplication;
33 class EventLaunchService;
34
35 class IApplication: public WrtDeviceApis::Commons::EventRequestReceiver<EventListInstalledApplications>,
36         public WrtDeviceApis::Commons::EventRequestReceiver<EventGetApplication>,
37         public WrtDeviceApis::Commons::EventRequestReceiver<EventLaunchService>
38 {
39 public:
40         virtual ~IApplication();
41         virtual void listApplications(const EventListInstalledApplicationsPtr& event) = 0;
42         virtual void getApplicationInformation(const EventGetApplicationPtr& event) = 0;
43         virtual long addApplicationListChangeListener(const EventInstalledApplicationChangedEmitterPtr& emitter) = 0;
44         virtual void removeApplicationListChangeListener(const EventInstalledApplicationChangedEmitter::IdType id) = 0; 
45         virtual void launchService(const EventLaunchServicePtr& event) = 0;
46
47  protected:
48         IApplication();
49
50         virtual void OnRequestReceived(const EventListInstalledApplicationsPtr& event) = 0;
51         virtual void OnRequestReceived(const EventGetApplicationPtr& event) = 0;
52         virtual void OnRequestReceived(const EventLaunchServicePtr& event) = 0;
53
54  };
55
56 typedef DPL::SharedPtr<IApplication> IApplicationPtr;
57
58 }
59 }
60 }
61
62 #endif