Files
MuditaOS/module-services/service-cellular/call/api/CallMulticast.cpp
Lefucjusz 015d8ea4ed [MOS-29] Fix invalid screen after missed call
Fix of the issue that missed call triggered
view that shown 'call ended' text.
2023-02-08 17:59:28 +01:00

59 lines
2.2 KiB
C++

// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#include "CallMulticast.hpp"
#include "service-cellular/CellularMessage.hpp"
void CallMulticast::notifyIncomingCall()
{
owner->bus.sendMulticast(std::make_shared<cellular::IncomingCallMessage>(),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyIdentifiedCall(const utils::PhoneNumber::View &number)
{
owner->bus.sendMulticast(std::make_shared<cellular::CallerIdMessage>(number),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyCallAborted()
{
owner->bus.sendMulticast(std::make_shared<cellular::CallAbortedNotification>(),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyOutgoingCallAnswered()
{
owner->bus.sendMulticast(std::make_shared<cellular::CallOutgoingAccepted>(),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyCallStarted(const utils::PhoneNumber &number, const CallType &type)
{
owner->bus.sendMulticast(std::make_shared<cellular::CallStartedNotification>(number, type == CallType::CT_INCOMING),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyCallEnded()
{
owner->bus.sendMulticast(std::make_shared<cellular::CallEndedNotification>(),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyCallMissed()
{
owner->bus.sendMulticast(std::make_shared<cellular::CallMissedNotification>(),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyCallActive()
{
owner->bus.sendMulticast(std::make_shared<cellular::CallActiveNotification>(),
sys::BusChannel::ServiceCellularNotifications);
}
void CallMulticast::notifyCallDurationUpdate(const time_t &duration)
{
owner->bus.sendMulticast(std::make_shared<cellular::CallDurationNotification>(duration),
sys::BusChannel::ServiceCellularNotifications);
}