16 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_BLUETOOTH_BLUETOOTHEVENTS_H_ 17 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_BLUETOOTH_BLUETOOTHEVENTS_H_ 61 return static_cast<std::size_t
>(t);
83 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> getDevice()
const;
101 std::shared_ptr<A2DPRole> getA2DPRole()
const;
107 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::services::MediaCommand> getMediaCommand()
const;
114 bool isScanning()
const;
121 bool isA2DPEnabled()
const;
135 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> device =
nullptr,
139 std::shared_ptr<A2DPRole> role =
nullptr,
140 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::services::MediaCommand> mediaCommand =
nullptr,
141 bool scanningState =
false,
142 bool a2dpEnable =
false);
149 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> m_device;
158 std::shared_ptr<A2DPRole> m_a2dpRole;
161 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::services::MediaCommand> m_mediaCommand;
164 bool m_scanningState;
172 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> device,
175 std::shared_ptr<A2DPRole> a2dpRole,
176 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::services::MediaCommand> mediaCommand,
181 m_deviceState{deviceState},
182 m_mediaStreamingState{mediaStreamingState},
183 m_a2dpRole{a2dpRole},
184 m_mediaCommand{mediaCommand},
185 m_scanningState{scanningState},
186 m_a2dpEnable{a2dpEnable} {
199 return m_deviceState;
203 return m_mediaStreamingState;
212 return m_mediaCommand;
216 return m_scanningState;
234 const std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>& device);
238 const std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>& device) :
259 const std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>& device);
263 const std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>& device) :
283 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> device,
288 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> device,
308 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> device);
314 std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface> device) :
338 std::make_shared<avsCommon::sdkInterfaces::bluetooth::services::
MediaCommand>(command)) {
397 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_BLUETOOTH_BLUETOOTHEVENTS_H_
Definition: BluetoothEvents.h:227
bool isScanning() const
Definition: BluetoothEvents.h:215
avsCommon::sdkInterfaces::bluetooth::DeviceState getDeviceState() const
Definition: BluetoothEvents.h:198
Definition: BluetoothEvents.h:356
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::MediaCommand > getMediaCommand() const
Definition: BluetoothEvents.h:210
Definition: BluetoothEvents.h:252
MediaStreamingState
An Enum representing the current state of the stream.
Definition: MediaStreamingState.h:25
Definition: CapabilityConfiguration.h:190
Request to connect/disconnect a certain profile.
Definition: BluetoothEvents.h:275
std::shared_ptr< A2DPRole > getA2DPRole() const
Definition: BluetoothEvents.h:206
BluetoothEventType
The different Bluetooth event types.
Definition: BluetoothEvents.h:31
DeviceRemovedEvent(const std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > &device)
Definition: BluetoothEvents.h:262
Helper struct to allow enum class to be a key in collections.
Definition: BluetoothEvents.h:58
Represents when a device is discovered.
bool isA2DPEnabled() const
Definition: BluetoothEvents.h:219
Definition: BluetoothEvents.h:375
DeviceDiscoveredEvent(const std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > &device)
Definition: BluetoothEvents.h:237
When the scanning state of the host has changed.
Represents when a device is removed.
MediaCommand
An Enum representing Media commands.
Definition: AVRCPTargetInterface.h:32
ScanningStateChangedEvent(bool isScanning)
Definition: BluetoothEvents.h:361
ToggleA2DPProfileStateChangedEvent(bool a2dpEnable)
Definition: BluetoothEvents.h:380
Represents when the A2DP streaming state changes.
BluetoothEventType getType() const
Definition: BluetoothEvents.h:189
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::size_t operator()(T t) const
Definition: BluetoothEvents.h:60
A2DPRole
An Enum representing the current A2DP role.
Definition: A2DPRole.h:25
DeviceState
Definition: BluetoothDeviceInterface.h:48
Represents when the state of a device changes.
type
Definition: upload.py:443
DeviceStateChangedEvent(std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > device, avsCommon::sdkInterfaces::bluetooth::DeviceState newState)
Definition: BluetoothEvents.h:287
MediaStreamingState getMediaStreamingState() const
Definition: BluetoothEvents.h:202
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > getDevice() const
Definition: BluetoothEvents.h:193
BluetoothEvent(BluetoothEventType type, std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > device=nullptr, avsCommon::sdkInterfaces::bluetooth::DeviceState deviceState=avsCommon::sdkInterfaces::bluetooth::DeviceState::IDLE, MediaStreamingState mediaStreamingState=MediaStreamingState::IDLE, std::shared_ptr< A2DPRole > role=nullptr, std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::MediaCommand > mediaCommand=nullptr, bool scanningState=false, bool a2dpEnable=false)
Definition: BluetoothEvents.h:170
Definition: BluetoothEvents.h:344
Represents when a media command has been received.
Base class for a BluetoothEvent.
Definition: BluetoothEvents.h:66
When the BluetoothDeviceManager has initialized.
BluetoothDeviceManagerInitializedEvent()
Definition: BluetoothEvents.h:349