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