mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-19 14:40:57 -04:00
Some devices were sending hangup message during connecting, which caused call ended screen - now it's disabled unless a call has been picked up
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <Service/ServiceForward.hpp>
|
|
|
|
namespace bluetooth
|
|
{
|
|
class CellularInterface
|
|
{
|
|
public:
|
|
virtual ~CellularInterface() = default;
|
|
virtual bool answerIncomingCall(sys::Service *service) = 0;
|
|
virtual bool hangupCall(sys::Service *service) = 0;
|
|
};
|
|
|
|
class CellularInterfaceImpl : public CellularInterface
|
|
{
|
|
public:
|
|
bool answerIncomingCall(sys::Service *service) override;
|
|
bool hangupCall(sys::Service *service) override;
|
|
|
|
private:
|
|
bool callActive = false;
|
|
};
|
|
|
|
class AudioInterface
|
|
{
|
|
public:
|
|
virtual ~AudioInterface() = default;
|
|
virtual bool startAudioRouting(sys::Service *service) = 0;
|
|
};
|
|
class AudioInterfaceImpl : public AudioInterface
|
|
{
|
|
public:
|
|
bool startAudioRouting(sys::Service *service) override;
|
|
};
|
|
} // namespace bluetooth
|