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>
23 * @file EventRecurrenceRule.cpp
32 EventRecurrenceRule::EventRecurrenceRule() :
33 m_frequency(NO_RECURRENCE),
34 m_occurrenceCount(-1),
39 EventRecurrenceRule::~EventRecurrenceRule()
43 EventRecurrenceRule::EventRecurrence EventRecurrenceRule::getFrequency() const
48 void EventRecurrenceRule::setFrequency(const EventRecurrenceRule::EventRecurrence &value)
53 int EventRecurrenceRule::getInterval() const
58 void EventRecurrenceRule::setInterval(const int &value)
63 bool EventRecurrenceRule::isEndDateSet() const
65 return !m_endDate.IsNull();
68 time_t EventRecurrenceRule::getEndDate() const
73 void EventRecurrenceRule::setEndDate(time_t value)
78 void EventRecurrenceRule::resetEndDate()
80 m_endDate = DPL::Optional<time_t>();
83 long EventRecurrenceRule::getOccurrenceCount() const
85 return m_occurrenceCount;
87 void EventRecurrenceRule::setOccurrenceCount(long value)
89 m_occurrenceCount = value;
92 std::vector<int> EventRecurrenceRule::getDaysOfTheMonth() const
94 return m_daysOfTheMonth;
97 void EventRecurrenceRule::setDaysOfTheMonth(std::vector<int> value)
99 m_daysOfTheMonth = value;
102 std::vector<std::string> EventRecurrenceRule::getDaysOfTheWeek() const
104 return m_daysOfTheWeek;
107 void EventRecurrenceRule::setDaysOfTheWeek(std::vector<std::string> value)
109 m_daysOfTheWeek = value;
112 std::vector<int> EventRecurrenceRule::getDaysOfTheYear() const
114 return m_daysOfTheYear;
117 void EventRecurrenceRule::setDaysOfTheYear(std::vector<int> value)
119 m_daysOfTheYear = value;
122 std::vector<int> EventRecurrenceRule::getWeeksOfTheYear() const
124 return m_weeksOfTheYear;
127 void EventRecurrenceRule::setWeeksOfTheYear(std::vector<int> value)
129 m_weeksOfTheYear = value;
132 bool EventRecurrenceRule::getSetPosition() const
134 return m_setPosition;
137 void EventRecurrenceRule::setSetPosition(bool value)
139 m_setPosition = value;
142 std::vector<time_t> EventRecurrenceRule::getExceptions() const
147 void EventRecurrenceRule::setExceptions(std::vector<time_t> value)
149 m_exceptions = value;
152 std::string EventRecurrenceRule::getTimeZone() const
157 void EventRecurrenceRule::setTimeZone(std::string value)