tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / DEPRACATED / AppLauncher / EventLaunchApplication.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        IEventLaunchApplication.h
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.1
20  * @brief
21  */
22
23 #ifndef _ABSTRACT_LAYER_IEVENT_LAUNCH_APPLICATION_H_
24 #define _ABSTRACT_LAYER_IEVENT_LAUNCH_APPLICATION_H_
25
26 #include <vector>
27 #include <string>
28 #include <dpl/shared_ptr.h>
29 #include <commons/IEvent.h>
30 #include <commons/EventReceiver.h>
31
32 namespace WrtPlugins {
33 namespace Api {
34 namespace AppLauncher {
35 /* this event is sent when application is launched */
36 class EventLaunchApplication : public WrtPlugins::Platform::IEvent<
37         EventLaunchApplication>
38 {
39     //Uri type. http://, file://, sms:, mailto: etc
40     ApplicationUriType m_applicationUriType;
41     // used as param to uriType, for example http address, path to file, phone number, etc
42     std::string m_applicationUriParam;
43     //optional parameters for file://
44     std::vector<std::string> m_applicationParameters;
45   public:
46     void            addApplicationParameter(const std::string &value)
47     {
48         m_applicationParameters.push_back(value);
49     }
50     std::vector<std::string> getApplicationParameters() const
51     {
52         return m_applicationParameters;
53     }
54     void            setApplicationUriType(const ApplicationUriType value)
55     {
56         m_applicationUriType = value;
57     }
58     ApplicationUriType getApplicationUriType() const
59     {
60         return m_applicationUriType;
61     }
62     void            setApplicationUriParam(const std::string &value)
63     {
64         m_applicationUriParam = value;
65     }
66     std::string     getApplicationUriParam() const
67     {
68         return m_applicationUriParam;
69     }
70     virtual void    clearOnCancel()
71     {
72     }
73     EventLaunchApplication() : m_applicationUriType(
74             APPLICATION_URI_TYPE_UNDEFINED)
75     {
76     }
77 };
78
79 typedef DPL::SharedPtr<EventLaunchApplication> EventLaunchApplicationPtr;
80 }
81 }
82 }
83
84 #endif /* _ABSTRACT_LAYER_IEVENT_LAUNCH_APPLICATION_H_ */