Update change log and spec for wrt-plugins-tizen_0.4.70
[platform/framework/web/wrt-plugins-tizen.git] / src / Calendar / IEventExpandEventRecurrence.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18
19 #ifndef _IEVENT_EXPAND_EVENT_RECURRENCE_H_
20 #define _IEVENT_EXPAND_EVENT_RECURRENCE_H_
21
22 #include <Commons/IEvent.h>
23 #include "CalendarEvent.h"
24 #include <dpl/shared_ptr.h>
25 #include <Security.h>
26
27 namespace DeviceAPI {
28 namespace Calendar {
29
30 class IEventExpandEventRecurrence : public WrtDeviceApis::Commons::IEvent<IEventExpandEventRecurrence>, public DeviceAPI::Common::SecurityAccessor
31 {
32     CalendarEventListPtr m_expandedEventList; //output
33     bool m_result; // ouput
34     CalendarEventPtr m_event; // input
35     long long int m_startDate; // input
36     long long int m_endDate; // input
37
38   public:
39     void             setResult(bool value)
40     {
41         m_result = value;
42     }
43     bool             getResult() const
44     {
45         return m_result;
46     }
47
48     CalendarEventListPtr getExpandedEventList() const
49     {
50         return m_expandedEventList;
51     }
52
53     void             setEvent(CalendarEventPtr value)
54     {
55         m_event = value;
56     }
57     CalendarEventPtr getEvent() const
58     {
59         return m_event;
60     }
61
62     void             setStartDate(long long int value)
63     {
64         m_startDate = value;
65     }
66     long long int             getStartDate() const
67     {
68         return m_startDate;
69     }
70
71     void             setEndDate(long long int value)
72     {
73         m_endDate = value;
74     }
75     long long int             getEndDate() const
76     {
77         return m_endDate;
78     }
79
80     void                    addExpandedEvent(CalendarEventPtr value)
81     {
82         m_expandedEventList->push_back(value);
83     }
84
85     IEventExpandEventRecurrence() : m_result(false)
86     {
87         CalendarEventListPtr events(new CalendarEventList());
88         m_expandedEventList = events;
89     }
90     ~IEventExpandEventRecurrence()
91     {
92     }
93     virtual void    clearOnCancel()
94     {
95     }
96 };
97
98 typedef DPL::SharedPtr<IEventExpandEventRecurrence> IEventExpandEventRecurrencePtr;
99
100 }
101 }
102
103 #endif /* _IEVENT_EXPAND_EVENT_RECURRENCE_H_ */