update for beta universally
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Account / OnAddEventsChanged.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
18 /*
19  * @file          OnAddEventsChanged.h
20  * @author
21  * @version     0.1
22  * @brief  
23  */
24
25 #ifndef _ON_ADD_EVENTS_CHANGED_H_
26 #define _ON_ADD_EVENTS_CHANGED_H_
27
28 #include <vector>
29 #include <Commons/IEvent.h>
30 #include <dpl/shared_ptr.h>
31 #include <Commons/ListenerEvent.h>
32 #include <Commons/ListenerEventEmitter.h>
33
34
35 namespace TizenApis {
36 namespace Api {
37 namespace Account{
38
39 class OnAddEventsChanged : public WrtDeviceApis::Commons::ListenerEvent<OnAddEventsChanged>
40 {
41     public:
42     typedef enum
43     {
44                 SUCCESS_ALL,
45                 FAIL_ALL,
46                 EVENT_ADD_SUCCESS,
47                 EVENT_ADD_FAIL
48     } EventAddStatus;
49
50     void setResult (bool value) {
51         m_result = value;
52     }   
53     bool getResult() const {
54         return m_result;
55     }
56
57     void setEvent(EventAccountPtr value) {
58         m_event = value;
59     }
60     EventAccountPtr getEvent() const {
61         return m_event;
62     }
63
64     void setStatus(EventAddStatus value) {
65         m_status = value;
66     }
67     EventAddStatus getStatus() const {
68         return m_status;
69     }
70
71     OnAddEventsChanged() : m_result(false) {
72     }
73     ~OnAddEventsChanged() {
74     }
75
76     private:
77     EventAccountPtr m_event;
78     EventAddStatus m_status;
79     bool m_result;
80 };
81
82 typedef DPL::SharedPtr<OnAddEventsChanged> OnAddEventsChangedPtr;
83 typedef WrtDeviceApis::Commons::ListenerEventEmitter<OnAddEventsChanged> OnAddEventsChangedEmitter;
84 typedef DPL::SharedPtr<OnAddEventsChangedEmitter> OnAddEventsChangedEmitterPtr;
85
86 } // Api
87 } // WrtPlugins
88 }
89
90 #endif //_ON_ADD_EVENTS_CHANGED_H_