3939e833ebe3e5ad9daa676da5d0ddc8c0636b83
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / AppLauncher / IAppLauncherManager.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  * @file        IAppLauncherManager.h
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.1
20  */
21
22 #ifndef _ABSTRACT_LAYER_IAPP_LAUNCHER_MANAGER_H_
23 #define _ABSTRACT_LAYER_IAPP_LAUNCHER_MANAGER_H_
24
25 #include <string>
26 #include <vector>
27 #include <dpl/shared_ptr.h>
28 #include "EventGetDefaultApplication.h"
29 #include "EventGetInstalledApplications.h"
30 #include "EventLaunchApplication.h"
31
32 namespace WrtPlugins {
33 namespace Api {
34 namespace AppLauncher {
35 typedef Platform::EventRequestReceiver< EventGetDefaultApplication >
36 EventRequestReceiverGetDefaultApplication;
37 typedef Platform::EventRequestReceiver< EventGetInstalledApplications >
38 EventRequestReceiverGetInstalledApplications;
39 typedef Platform::EventRequestReceiver< EventLaunchApplication >
40 EventRequestReceiverLaunchApplication;
41
42 class IAppLauncherManager : public EventRequestReceiverGetDefaultApplication,
43     public EventRequestReceiverGetInstalledApplications,
44     public EventRequestReceiverLaunchApplication
45 {
46   public:
47     IAppLauncherManager();
48     virtual ~IAppLauncherManager();
49     virtual void getDefaultApplication(
50         const EventGetDefaultApplicationPtr &event);
51     virtual void getInstalledApplications(
52         const EventGetInstalledApplicationsPtr &event);
53     virtual void launchApplication(const EventLaunchApplicationPtr &event);
54
55   protected:
56     virtual void OnRequestReceived(const EventGetDefaultApplicationPtr &event)
57         = 0;
58     virtual void OnRequestReceived(
59         const EventGetInstalledApplicationsPtr &event) = 0;
60     virtual void OnRequestReceived(const EventLaunchApplicationPtr &event) = 0;
61 };
62
63 typedef DPL::SharedPtr<IAppLauncherManager> IAppLauncherManagerPtr;
64 }
65 }
66 }
67
68 #endif /* _ABSTRACT_LAYER_IAPP_LAUNCHER_MANAGER_H_ */