AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
BlueZAVRCPTarget.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_INCLUDE_BLUEZ_BLUEZAVRCPTARGET_H_
17 #define ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_INCLUDE_BLUEZ_BLUEZAVRCPTARGET_H_
18 
19 #include <memory>
20 #include <mutex>
21 
25 #include "BlueZ/BlueZUtils.h"
26 
27 namespace alexaClientSDK {
28 namespace bluetoothImplementations {
29 namespace blueZ {
30 
33 public:
40  static std::shared_ptr<BlueZAVRCPTarget> create(std::shared_ptr<DBusProxy> mediaControlProxy);
41 
44  std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::services::SDPRecordInterface> getRecord() override;
45  void setup() override;
46  void cleanup() override;
48 
51  bool play() override;
52  bool pause() override;
53  bool next() override;
54  bool previous() override;
56 
57 private:
59  BlueZAVRCPTarget(std::shared_ptr<DBusProxy> mediaControlProxy);
60 
62  std::shared_ptr<avsCommon::utils::bluetooth::AVRCPTargetRecord> m_record;
63 
65  std::mutex m_cmdMutex;
66 
68  std::shared_ptr<DBusProxy> m_mediaControlProxy;
69 };
70 
71 } // namespace blueZ
72 } // namespace bluetoothImplementations
73 } // namespace alexaClientSDK
74 
75 #endif // ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_INCLUDE_BLUEZ_BLUEZAVRCPTARGET_H_
void cleanup() override
Called for any necessary cleanup of the service.
A BlueZ implementation of the AVRCPTargetInterface.
Definition: BlueZAVRCPTarget.h:32
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::services::SDPRecordInterface > getRecord() override
void setup() override
Called for any necessary setup of the service.
Used to implement an instance of AVRCPTarget (Audio/Video Remote Control Profile).
Definition: AVRCPTargetInterface.h:84
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
static std::shared_ptr< BlueZAVRCPTarget > create(std::shared_ptr< DBusProxy > mediaControlProxy)

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0