mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-19 04:24:05 -04:00
We get Token on play, and require it in stop. While we cant stop sound by title & data set to play. And adding standard handling causes either totally synchronous calls or requires multiple additional guards it seemed like best use. Fixed expectation for the same named Response, but meant for bell Needed so that - we ring only when needed - we handle CLIP and RING properly Applied style Missed file added Moved SML logger as it's usefull to some more common parts of code
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "NotificationsConfiguration.hpp"
|
|
#include "policies/CallNotificationPolicy.hpp"
|
|
#include "policies/SMSNotificationPolicy.hpp"
|
|
#include <PhoneModes/Observer.hpp>
|
|
#include <Service/Service.hpp>
|
|
#include <PhoneNumber.hpp>
|
|
|
|
namespace notifications
|
|
{
|
|
class NotificationsHandler
|
|
{
|
|
public:
|
|
NotificationsHandler(sys::Service *parentService, NotificationsConfiguration ¬ifcationConfig);
|
|
void registerMessageHandlers();
|
|
|
|
private:
|
|
void incomingSMSHandler();
|
|
|
|
void policyNumberCheck(const utils::PhoneNumber::View &number);
|
|
void playbackCallRingtone();
|
|
void playbackSMSRingtone();
|
|
|
|
sys::Service *parentService = nullptr;
|
|
NotificationsConfiguration ¬ifcationConfig;
|
|
CallNotificationPolicy currentCallPolicy;
|
|
SMSNotificationPolicy currentSMSPolicy;
|
|
};
|
|
} // namespace notifications
|