AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
MockBluetoothDeviceManager.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 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_BLUETOOTH_MOCKBLUETOOTHDEVICEMANAGER_H_
16 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_BLUETOOTH_MOCKBLUETOOTHDEVICEMANAGER_H_
17 
18 #include <gmock/gmock.h>
19 
21 
22 namespace alexaClientSDK {
23 namespace avsCommon {
24 namespace sdkInterfaces {
25 namespace bluetooth {
26 namespace test {
27 
28 using namespace ::testing;
29 
34 public:
35  std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface> getHostController() override;
36  std::list<std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>> getDiscoveredDevices()
37  override;
38  std::shared_ptr<avsCommon::utils::bluetooth::BluetoothEventBus> getEventBus() override;
39 
47  std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface> hostcontroller,
48  std::list<std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>> discoveredDevices,
49  std::shared_ptr<avsCommon::utils::bluetooth::BluetoothEventBus> eventBus);
50 
51 protected:
52  std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface> m_hostController;
53  std::list<std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>> m_discoveredDevices;
54  std::shared_ptr<avsCommon::utils::bluetooth::BluetoothEventBus> m_eventBus;
55 };
56 
57 inline std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface>
59  return m_hostController;
60 }
61 
62 inline std::list<std::shared_ptr<avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>>
64  return m_discoveredDevices;
65 }
66 
67 inline std::shared_ptr<avsCommon::utils::bluetooth::BluetoothEventBus> MockBluetoothDeviceManager::getEventBus() {
68  return m_eventBus;
69 }
70 
72  std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface>
73  hostcontroller,
74  std::list<std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface>>
75  discoveredDevices,
76  std::shared_ptr<alexaClientSDK::avsCommon::utils::bluetooth::BluetoothEventBus> eventBus) :
77  m_hostController{hostcontroller},
78  m_discoveredDevices(discoveredDevices),
79  m_eventBus(eventBus) {
80 }
81 
82 } // namespace test
83 } // namespace bluetooth
84 } // namespace sdkInterfaces
85 } // namespace avsCommon
86 } // namespace alexaClientSDK
87 
88 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_BLUETOOTH_MOCKBLUETOOTHDEVICEMANAGER_H_
Definition: gmock-actions.h:53
Definition: AmdMetricWrapperTest.cpp:24
std::shared_ptr< avsCommon::utils::bluetooth::BluetoothEventBus > m_eventBus
Definition: MockBluetoothDeviceManager.h:54
std::list< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > > m_discoveredDevices
Definition: MockBluetoothDeviceManager.h:53
std::list< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface > > getDiscoveredDevices() override
Definition: MockBluetoothDeviceManager.h:63
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface > getHostController() override
Definition: MockBluetoothDeviceManager.h:58
std::shared_ptr< avsCommon::utils::bluetooth::BluetoothEventBus > getEventBus() override
Definition: MockBluetoothDeviceManager.h:67
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface > m_hostController
Definition: MockBluetoothDeviceManager.h:52
MockBluetoothDeviceManager(std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothHostControllerInterface > hostcontroller, std::list< std::shared_ptr< avsCommon::sdkInterfaces::bluetooth::BluetoothDeviceInterface >> discoveredDevices, std::shared_ptr< avsCommon::utils::bluetooth::BluetoothEventBus > eventBus)
Definition: MockBluetoothDeviceManager.h:71

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