2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "EventRecurrenceRule.h"
20 #include <Commons/Exception.h>
21 #include <dpl/log/log.h>
26 EventRecurrenceRule::EventRecurrenceRule()
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 NumberArrayPtr numberArraySetPositionsPtr(new NumberArray());
35 m_setPositions = numberArraySetPositionsPtr;
36 NumberArrayPtr numberArrayExceptionsPtr(new NumberArray());
37 m_exceptions = numberArrayExceptionsPtr;
38 m_timeZone = DEFAULT_TIMEZONE;
41 EventRecurrenceRule::~EventRecurrenceRule()
45 EventRecurrenceRule::EventRecurrence EventRecurrenceRule::getFrequency() const
50 void EventRecurrenceRule::setFrequency(const EventRecurrenceRule::EventRecurrence &value)
55 int EventRecurrenceRule::getInterval() const
60 void EventRecurrenceRule::setInterval(const int &value)
65 long long int EventRecurrenceRule::getEndDate() const
70 void EventRecurrenceRule::setEndDate(long long int value)
75 long EventRecurrenceRule::getOccurrenceCount() const
77 return m_occurrenceCount;
79 void EventRecurrenceRule::setOccurrenceCount(long value)
81 m_occurrenceCount = value;
84 std::vector<int> EventRecurrenceRule::getDaysOfTheMonth() const
86 return m_daysOfTheMonth;
89 void EventRecurrenceRule::setDaysOfTheMonth(std::vector<int> value)
91 m_daysOfTheMonth = value;
94 StringArrayPtr EventRecurrenceRule::getDaysOfTheWeek() const
96 return m_daysOfTheWeek;
99 void EventRecurrenceRule::setDaysOfTheWeek(StringArrayPtr value)
101 m_daysOfTheWeek = value;
104 std::vector<int> EventRecurrenceRule::getDaysOfTheYear() const
106 return m_daysOfTheYear;
109 void EventRecurrenceRule::setDaysOfTheYear(std::vector<int> value)
111 m_daysOfTheYear = value;
114 std::vector<int> EventRecurrenceRule::getWeeksOfTheYear() const
116 return m_weeksOfTheYear;
119 void EventRecurrenceRule::setWeeksOfTheYear(std::vector<int> value)
121 m_weeksOfTheYear = value;
124 NumberArrayPtr EventRecurrenceRule::getSetPositions() const
126 return m_setPositions;
129 void EventRecurrenceRule::setSetPositions(NumberArrayPtr value)
131 m_setPositions = value;
134 NumberArrayPtr EventRecurrenceRule::getExceptions() const
139 void EventRecurrenceRule::setExceptions(NumberArrayPtr value)
141 m_exceptions = value;
144 std::string EventRecurrenceRule::getTimeZone() const
149 void EventRecurrenceRule::setTimeZone(std::string value)