mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-07-18 12:04:03 -04:00
Connected all (?) necessary cellular events to the HFP profile Fixed audio issues when connected with HFP Some cleanup
61 lines
1.4 KiB
C++
61 lines
1.4 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 "CommandData.hpp"
|
|
|
|
namespace bluetooth
|
|
{
|
|
|
|
class Command
|
|
{
|
|
public:
|
|
enum Type
|
|
{
|
|
StartScan,
|
|
StopScan,
|
|
getDevicesAvailable,
|
|
VisibilityOn,
|
|
VisibilityOff,
|
|
ConnectAudio,
|
|
DisconnectAudio,
|
|
PowerOn,
|
|
PowerOff,
|
|
Pair,
|
|
Unpair,
|
|
StartRinging,
|
|
StopRinging,
|
|
StartRouting,
|
|
StartStream,
|
|
StopStream,
|
|
CallAnswered,
|
|
CallTerminated,
|
|
CallStarted,
|
|
IncomingCallNumber,
|
|
SignalStrengthData,
|
|
OperatorNameData,
|
|
BatteryLevelData,
|
|
NetworkStatusData,
|
|
None,
|
|
};
|
|
|
|
struct CommandPack
|
|
{
|
|
Command::Type commandType = Command::None;
|
|
std::unique_ptr<CommandData> data = nullptr;
|
|
};
|
|
|
|
explicit Command(CommandPack &&);
|
|
explicit Command(Command::Type type)
|
|
{
|
|
pack.commandType = type;
|
|
}
|
|
auto getType() const noexcept -> Command::Type;
|
|
auto getData() -> DataVariant;
|
|
|
|
private:
|
|
CommandPack pack;
|
|
};
|
|
|
|
} // namespace bluetooth
|