2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include "EventRecurrenceRule.h"
19 #include <Commons/Exception.h>
20 #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 m_setPosition = false;
35 NumberArrayPtr numberArrayPtr(new NumberArray());
36 m_exceptions = numberArrayPtr;
37 m_timeZone = DEFAULT_TIMEZONE;
40 EventRecurrenceRule::~EventRecurrenceRule()
44 EventRecurrenceRule::EventRecurrence EventRecurrenceRule::getFrequency() const
49 void EventRecurrenceRule::setFrequency(const EventRecurrenceRule::EventRecurrence &value)
54 int EventRecurrenceRule::getInterval() const
59 void EventRecurrenceRule::setInterval(const int &value)
64 long long int EventRecurrenceRule::getEndDate() const
69 void EventRecurrenceRule::setEndDate(long long int value)
74 long EventRecurrenceRule::getOccurrenceCount() const
76 return m_occurrenceCount;
78 void EventRecurrenceRule::setOccurrenceCount(long value)
80 m_occurrenceCount = value;
83 std::vector<int> EventRecurrenceRule::getDaysOfTheMonth() const
85 return m_daysOfTheMonth;
88 void EventRecurrenceRule::setDaysOfTheMonth(std::vector<int> value)
90 m_daysOfTheMonth = value;
93 StringArrayPtr EventRecurrenceRule::getDaysOfTheWeek() const
95 return m_daysOfTheWeek;
98 void EventRecurrenceRule::setDaysOfTheWeek(StringArrayPtr value)
100 m_daysOfTheWeek = value;
103 std::vector<int> EventRecurrenceRule::getDaysOfTheYear() const
105 return m_daysOfTheYear;
108 void EventRecurrenceRule::setDaysOfTheYear(std::vector<int> value)
110 m_daysOfTheYear = value;
113 std::vector<int> EventRecurrenceRule::getWeeksOfTheYear() const
115 return m_weeksOfTheYear;
118 void EventRecurrenceRule::setWeeksOfTheYear(std::vector<int> value)
120 m_weeksOfTheYear = value;
123 bool EventRecurrenceRule::getSetPosition() const
125 return m_setPosition;
128 void EventRecurrenceRule::setSetPosition(bool value)
130 m_setPosition = value;
133 NumberArrayPtr EventRecurrenceRule::getExceptions() const
138 void EventRecurrenceRule::setExceptions(NumberArrayPtr value)
140 m_exceptions = value;
143 std::string EventRecurrenceRule::getTimeZone() const
148 void EventRecurrenceRule::setTimeZone(std::string value)