Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Application / EventInstalledApplicationChanged.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_INSTALLED_APPLICATION_CHANGED_H_
18 #define TIZENAPIS_API_EVENT_INSTALLED_APPLICATION_CHANGED_H_
19
20 #include <Commons/IEvent.h>
21 #include <dpl/shared_ptr.h>
22 #include <Commons/ListenerEvent.h>
23 #include <Commons/ListenerEventEmitter.h>
24 #include "ApplicationInformation.h"
25 #include "ApplicationEvent.h"
26
27 #define APPLICATON_EVENT_CODE_INSTALLED "INSTALLED"
28 #define APPLICATON_EVENT_CODE_UNINSTALLED "UNINSTALLED"
29 #define APPLICATON_EVENT_CODE_UPDATED "UPDATED"
30
31 namespace TizenApis {
32 namespace Api {
33 namespace Application {
34
35 class EventInstalledApplicationChanged: public WrtDeviceApis::Commons::ListenerEvent<EventInstalledApplicationChanged>
36 {
37 private:
38         ApplicationInformationPtr m_appinfo;
39         std::string m_eventCode;
40 public:
41
42         void setApplicationInformation(const ApplicationInformationPtr &appinfo)
43         {
44                 m_appinfo = appinfo;
45         }
46
47         ApplicationInformationPtr getApplicationInformation() const 
48         {
49                 return m_appinfo;
50         }
51
52         void setEventCode(std::string code)
53         {
54                 m_eventCode = code;
55         }
56
57         std::string getEventCode() const
58         {
59                 return m_eventCode;
60         }
61
62         EventInstalledApplicationChanged() 
63         {
64         }
65 };
66
67 typedef DPL::SharedPtr<EventInstalledApplicationChanged> EventInstalledApplicationChangedPtr;
68 typedef WrtDeviceApis::Commons::ListenerEventEmitter<EventInstalledApplicationChanged> EventInstalledApplicationChangedEmitter;
69 typedef DPL::SharedPtr<EventInstalledApplicationChangedEmitter> EventInstalledApplicationChangedEmitterPtr;
70
71 } // Application
72 } // Api
73 } // TizenApis
74
75 #endif