Update change log and spec for wrt-plugins-tizen_0.2.84
[framework/web/wrt-plugins-tizen.git] / src / platform / API / Calendar / EventRecurrenceRule.cpp
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 #include "EventRecurrenceRule.h"
19 #include <Commons/Exception.h>
20 #include <dpl/log/log.h>
21
22 namespace TizenApis {
23 namespace Api {
24 namespace Calendar {
25
26 EventRecurrenceRule::EventRecurrenceRule()
27 {
28     m_frequency = NO_RECURRENCE;
29     m_interval = DEFAULT_INTERVAL;
30     m_endDate = UNDEFINED_TIME;
31     m_occurrenceCount = -1;
32     StringArrayPtr stringArrayPtr(new StringArray());
33     m_daysOfTheWeek = stringArrayPtr;
34     m_setPosition = false;
35     NumberArrayPtr numberArrayPtr(new NumberArray());
36     m_exceptions = numberArrayPtr;
37     m_timeZone = DEFAULT_TIMEZONE;
38 }
39
40 EventRecurrenceRule::~EventRecurrenceRule()
41 {
42 }
43
44 EventRecurrenceRule::EventRecurrence EventRecurrenceRule::getFrequency() const
45 {
46     return m_frequency;
47 }
48
49 void EventRecurrenceRule::setFrequency(const EventRecurrenceRule::EventRecurrence &value)
50 {
51     m_frequency = value;
52 }
53
54 int EventRecurrenceRule::getInterval() const
55 {
56     return m_interval;
57 }
58
59 void EventRecurrenceRule::setInterval(const int &value)
60 {
61     m_interval = value;
62 }
63
64 long long int EventRecurrenceRule::getEndDate() const
65 {
66     return m_endDate;
67 }
68
69 void EventRecurrenceRule::setEndDate(long long int value)
70 {
71     m_endDate = value;
72 }
73
74 long EventRecurrenceRule::getOccurrenceCount() const
75 {
76     return m_occurrenceCount;
77 }
78 void EventRecurrenceRule::setOccurrenceCount(long value)
79 {
80     m_occurrenceCount = value;
81 }
82
83 std::vector<int> EventRecurrenceRule::getDaysOfTheMonth() const
84 {
85     return m_daysOfTheMonth;
86 }
87
88 void EventRecurrenceRule::setDaysOfTheMonth(std::vector<int> value)
89 {
90     m_daysOfTheMonth = value;
91 }
92
93 StringArrayPtr EventRecurrenceRule::getDaysOfTheWeek() const
94 {
95     return m_daysOfTheWeek;
96 }
97
98 void EventRecurrenceRule::setDaysOfTheWeek(StringArrayPtr value)
99 {
100     m_daysOfTheWeek = value;
101 }
102
103 std::vector<int> EventRecurrenceRule::getDaysOfTheYear() const
104 {
105     return m_daysOfTheYear;
106 }
107
108 void EventRecurrenceRule::setDaysOfTheYear(std::vector<int> value)
109 {
110     m_daysOfTheYear = value;
111 }
112
113 std::vector<int> EventRecurrenceRule::getWeeksOfTheYear() const
114 {
115     return m_weeksOfTheYear;
116 }
117
118 void EventRecurrenceRule::setWeeksOfTheYear(std::vector<int> value)
119 {
120     m_weeksOfTheYear = value;
121 }
122
123 bool EventRecurrenceRule::getSetPosition() const
124 {
125     return m_setPosition;
126 }
127
128 void EventRecurrenceRule::setSetPosition(bool value)
129 {
130     m_setPosition = value;
131 }
132
133 NumberArrayPtr EventRecurrenceRule::getExceptions() const
134 {
135     return m_exceptions;
136 }
137
138 void EventRecurrenceRule::setExceptions(NumberArrayPtr value)
139 {
140     m_exceptions = value;
141 }
142
143 std::string EventRecurrenceRule::getTimeZone() const
144 {
145     return m_timeZone;
146 }
147
148 void EventRecurrenceRule::setTimeZone(std::string value)
149 {
150     m_timeZone = value;
151 }
152
153 }
154 }
155 }