Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Application / EventManageApplication.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_EVENT_MANAGE_APPLICATION_H_
18 #define TIZENAPIS_API_EVENT_MANAGE_APPLICATION_H_
19
20 #include <Commons/IEvent.h>
21 #include <dpl/shared_ptr.h>
22 #include "ApplicationInformation.h"
23 #include "ApplicationContext.h"
24
25 namespace TizenApis {
26 namespace Api {
27 namespace Application {
28
29 class EventManageApplication: public WrtDeviceApis::Commons::IEvent<EventManageApplication> {
30 private:
31         ApplicationInformationPtr       m_appinfo;
32         ApplicationContextPtr           m_contextinfo;
33         std::string                                     m_appId;
34         std::string                                     m_contextId;
35         std::string                                     m_argument;
36         int m_eventType;        
37
38 public:
39         static const int APP_MANAGER_UNKNOWN = 0;
40         static const int APP_MANAGER_KILL_APPLICATION = 1;
41         static const int APP_MANAGER_HIDE_APPLICATION = 2;
42         static const int APP_MANAGER_LAUNCH_APPLICATION = 3;
43
44 public:
45         void setApplicationInformation(const ApplicationInformationPtr appinfo)
46         {
47                 m_appinfo = appinfo;
48         }
49
50         ApplicationInformationPtr getApplicationInformation() const 
51         {
52                 return m_appinfo;
53         }
54
55         void setApplicationContext(const ApplicationContextPtr contextinfo)
56         {
57                 m_contextinfo = contextinfo;
58         }
59
60         ApplicationContextPtr getApplicationContext() const 
61         {
62                 return m_contextinfo;
63         }
64         
65         void setAppId(std::string appId)
66         {
67                 m_appId = appId;
68         }
69
70         std::string getAppId() const
71         {
72                 return m_appId;
73         }
74
75         void setContextId(std::string contextId)
76         {
77                 m_contextId = contextId;
78         }
79
80         std::string getContextId() const
81         {
82                 return m_contextId;
83         }
84
85         void setArgument(std::string argu)
86         {
87                 m_argument = argu;
88         }
89
90         std::string getArgument() const
91         {
92                 return m_argument;
93         }
94
95         EventManageApplication() 
96         {
97         }
98
99         void setEventType(int type){
100                 m_eventType = type;
101         }
102
103         int getEventType(){
104                 return m_eventType;
105         }       
106         
107 };
108
109 typedef DPL::SharedPtr<EventManageApplication> EventManageApplicationPtr;
110
111 } // Application
112 } // Api
113 } // TizenApis
114
115 #endif