38 lines
743 B
C++
38 lines
743 B
C++
#include "schedule/schedule_coordinator.h"
|
|
|
|
namespace borla {
|
|
|
|
bool ScheduleCoordinator::AddReminder(uint32_t duration_seconds)
|
|
{
|
|
return reminders_.Add(duration_seconds);
|
|
}
|
|
|
|
void ScheduleCoordinator::CancelReminder(TimerCancelScope scope)
|
|
{
|
|
reminders_.Cancel(scope);
|
|
}
|
|
|
|
bool ScheduleCoordinator::SetAlarm(const AlarmEntry& alarm)
|
|
{
|
|
return alarms_.Set(alarm);
|
|
}
|
|
|
|
void ScheduleCoordinator::DeleteAlarm(int32_t id)
|
|
{
|
|
alarms_.Delete(id);
|
|
}
|
|
|
|
bool ScheduleCoordinator::SyncAlarms(const AlarmList& alarms)
|
|
{
|
|
return alarms_.Sync(alarms);
|
|
}
|
|
|
|
void ScheduleCoordinator::SetAlarmToneIndices(
|
|
int8_t set_tone_index,
|
|
int8_t wake_tone_index)
|
|
{
|
|
alarms_.SetToneIndices(set_tone_index, wake_tone_index);
|
|
}
|
|
|
|
} // namespace borla
|