avs-device-sdk/BluetoothImplementations/BlueZ/test/Mock/include/MockDBusProxy.h

51 lines
1.7 KiB
C
Raw Normal View History

Version 1.8 alexa-client-sdk Changes in this update: Enhancements Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline. Alerts in the background now stream in 10 sec intervals, rather than continuously. Added support for France to the sample app. friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController. Bug Fixes Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table. Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread. Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined. Known Issues The ACL may encounter issues if audio attachments are received but not consumed. SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release. The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth. Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback. When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming. The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported. On some products, interrupted Bluetooth playback may not resume if other content is locally streamed. On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters. On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
/*
* Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
#ifndef ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_TEST_MOCK_INCLUDE_MOCKDBUSPROXY_H_
#define ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_TEST_MOCK_INCLUDE_MOCKDBUSPROXY_H_
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "BlueZ/BlueZUtils.h"
namespace alexaClientSDK {
namespace bluetoothImplementations {
namespace blueZ {
namespace test {
using namespace ::testing;
/**
* A mock class of @c DBusProxy.
*/
class MockDBusProxy : public DBusProxy {
public:
MockDBusProxy() : DBusProxy{nullptr, ""} {};
MOCK_METHOD2(create, std::shared_ptr<DBusProxy>(const std::string&, const std::string&));
MOCK_METHOD3(callMethod, ManagedGVariant(const std::string&, GVariant*, GError**));
MOCK_METHOD4(callMethodWithFDList, ManagedGVariant(const std::string&, GVariant*, GUnixFDList**, GError**));
MOCK_METHOD0(getObjectPath, std::string());
MOCK_METHOD0(get, GDBusProxy*());
};
#endif // ALEXA_CLIENT_SDK_BLUETOOTHIMPLEMENTATIONS_BLUEZ_TEST_MOCK_INCLUDE_MOCKDBUSPROXY_H_
} // namespace test
} // namespace blueZ
} // namespace bluetoothImplementations
} // namespace alexaClientSDK