~aleteoryx/muditaos

ref: 4f63943a4cf586e168fbb996f11adb7db40ff3e6 muditaos/module-services/service-time/include/service-time/AlarmServiceAPI.hpp -rw-r--r-- 1.4 KiB
4f63943a — rrandomsky [BH-1792] Updated button handling during pre wake up 1 year, 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include <Service/Service.hpp>

#include <time/dateCommon.hpp>

#include <ctime>
#include <vector>

struct AlarmEventRecord;

/**
 * @brief Basic interface alarm API
 */
namespace alarms
{

    namespace AlarmServiceAPI
    {
        bool requestGetAlarm(sys::Service *serv, unsigned int id);
        bool requestAddAlarm(sys::Service *serv, const AlarmEventRecord &alarmEvent);
        bool requestUpdateAlarm(sys::Service *serv, const AlarmEventRecord &alarmEvent);
        bool requestRemoveAlarm(sys::Service *serv, unsigned int id);
        bool requestGetAlarmsInRange(sys::Service *serv, unsigned int offset, unsigned int limit);
        bool requestGetNextSingleEvents(sys::Service *serv);
        bool requestTurnOffRingingAlarm(sys::Service *serv, const std::uint32_t id);
        bool requestSnoozeRingingAlarm(sys::Service *serv, const std::uint32_t id, const TimePoint nextAlarmTime);
        bool requestStopAllSnoozedAlarms(sys::Service *serv);
        bool requestRegisterSnoozedAlarmsCountChangeCallback(sys::Service *serv);
        bool requestRegisterActiveAlarmsIndicatorHandler(sys::Service *serv);
        bool requestTurnOffPreWakeUp(sys::Service *serv);
    }; // namespace AlarmServiceAPI

} // namespace alarms