Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Application / EventGetApplication.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_GET_APPLICATION_H_
18 #define TIZENAPIS_API_EVENT_GET_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 EventGetApplication: public WrtDeviceApis::Commons::IEvent<EventGetApplication> {
30 private:
31         ApplicationInformationPtr m_appinfo;
32         ApplicationContextPtr m_contextinfo;
33         std::string  m_appId;
34         std::string  m_contextId;
35         int m_eventType;        
36
37 public:
38         static const int APP_MANAGER_UNKNOWN = 0;
39         static const int APP_MANAGER_GET_INFORMATION = 1;
40         static const int APP_MANAGER_GET_CONTEXT = 2;
41
42 public:
43         void setApplicationInformation(const ApplicationInformationPtr appinfo)
44         {
45                 m_appinfo = appinfo;
46         }
47
48         ApplicationInformationPtr getApplicationInformation() const 
49         {
50                 return m_appinfo;
51         }
52
53         void setApplicationContext(const ApplicationContextPtr contextinfo)
54         {
55                 m_contextinfo = contextinfo;
56         }
57
58         ApplicationContextPtr getApplicationContext() const 
59         {
60                 return m_contextinfo;
61         }
62         
63         void setAppId(std::string appId)
64         {
65                 m_appId = appId;
66         }
67
68         std::string getAppId() const
69         {
70                 return m_appId;
71         }
72
73         void setContextId(std::string contextId)
74         {
75                 m_contextId = contextId;
76         }
77
78         std::string getContextId() const
79         {
80                 return m_contextId;
81         }
82
83         EventGetApplication() 
84         {
85         }
86
87         void setEventType(int type){
88                 m_eventType = type;
89         }
90
91         int getEventType(){
92                 return m_eventType;
93         }       
94         
95 };
96
97 typedef DPL::SharedPtr<EventGetApplication> EventGetApplicationPtr;
98
99 } // Application
100 } // Api
101 } // TizenApis
102
103 #endif