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.
17 #include "AlarmRecurrence.h"
23 AlarmRecurrence::AlarmRecurrence()
25 m_frequency = NO_RECURRENCE;
29 AlarmRecurrence::~AlarmRecurrence()
33 void AlarmRecurrence::setFrequency(AlarmRecurrence::alarm_frequency_e frequency)
35 m_frequency = frequency;
38 AlarmRecurrence::alarm_frequency_e AlarmRecurrence::getFrequency()
42 void AlarmRecurrence::setInterval(int interval)
44 m_interval = interval;
46 int AlarmRecurrence::getInterval()
50 void AlarmRecurrence::setDaysOfTheWeek(std::vector<std::string> daysOfTheWeek)
53 m_daysOfTheWeek.clear();
54 m_daysOfTheWeek.assign(daysOfTheWeek.begin(), daysOfTheWeek.end());
55 m_frequency = DAYS_OF_THE_WEEK_RECURRENCE;
57 std::vector<std::string> AlarmRecurrence::getDaysOfTheWeek()
59 return m_daysOfTheWeek;
62 void AlarmRecurrence::setData(AlarmRecurrencePtr ptr)
64 setFrequency(ptr->getFrequency());
65 setInterval(ptr->getInterval());
66 setDaysOfTheWeek(ptr->getDaysOfTheWeek());