AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::test::TestObserver Class Reference

A test observer that mocks out the DialogUXStateObserverInterface#onDialogUXStateChanged() call. More...

Inheritance diagram for alexaClientSDK::avsCommon::test::TestObserver:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::test::TestObserver:
Collaboration graph
[legend]

Public Member Functions

 TestObserver ()
 
void onDialogUXStateChanged (DialogUXStateObserverInterface::DialogUXState newState) override
 
DialogUXStateObserverInterface::DialogUXState waitForStateChange (std::chrono::milliseconds timeout, bool *uxChanged)
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::DialogUXStateObserverInterface
virtual ~DialogUXStateObserverInterface ()=default
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::DialogUXStateObserverInterface
enum  DialogUXState {
  DialogUXState::IDLE, DialogUXState::LISTENING, DialogUXState::EXPECTING, DialogUXState::THINKING,
  DialogUXState::SPEAKING, DialogUXState::FINISHED
}
 The different dialog specific AVS UX states. More...
 
- Static Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::DialogUXStateObserverInterface
static std::string stateToString (DialogUXState state)
 

Detailed Description

A test observer that mocks out the DialogUXStateObserverInterface#onDialogUXStateChanged() call.

Constructor & Destructor Documentation

◆ TestObserver()

alexaClientSDK::avsCommon::test::TestObserver::TestObserver ( )
inline

Constructor.

Member Function Documentation

◆ onDialogUXStateChanged()

void alexaClientSDK::avsCommon::test::TestObserver::onDialogUXStateChanged ( DialogUXStateObserverInterface::DialogUXState  newState)
inlineoverridevirtual

Implementation of the DialogUXStateObserverInterface#onDialogUXStateChanged() callback.

Parameters
newStateThe new UX state of the observer.

Implements alexaClientSDK::avsCommon::sdkInterfaces::DialogUXStateObserverInterface.

◆ waitForStateChange()

DialogUXStateObserverInterface::DialogUXState alexaClientSDK::avsCommon::test::TestObserver::waitForStateChange ( std::chrono::milliseconds  timeout,
bool *  uxChanged 
)
inline

Waits for the UXStateObserverInterface##onUXStateChanged() callback.

Parameters
timeoutThe amount of time to wait for the callback.
uxChangedAn output parameter that notifies the caller whether a callback occurred.
Returns
Returns true if the callback occured within the timeout period and false otherwise.

The documentation for this class was generated from the following file:

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