![]() |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <TestDirectiveHandler.h>
Classes | |
class | DirectiveParams |
TestDirectiveHandler is a mock of the DirectiveHandlerInterface
and allows tests to wait for invocations upon those interfaces and inspect the parameters of those invocations.
alexaClientSDK::integration::test::TestDirectiveHandler::TestDirectiveHandler | ( | avsCommon::avs::DirectiveHandlerConfiguration | config | ) |
Constructor.
config | The avsCommon::avs::DirectiveHandlerConfiguration for the directive handler for registering with a directive sequencer. |
|
overridevirtual |
Cancel an ongoing preHandleDirective()
or handleDirective()
operation for the specified AVSDirective
. Once this has been called the DirectiveHandler
should not expect to receive further calls regarding this directive.
AVSDirectives
.messageId | The message ID of a directive previously passed to preHandleDirective(). |
Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
overridevirtual |
Returns the configuration of the directive handler.
The configuration consists of multiple directive routing rules and their respective blocking policy. The directives will be matched from the most specific rule (with all fields defined) to the least specific rule (which only matches the directive endpointId).
avs::DirectiveHandlerConfiguration
of the handler. Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
overridevirtual |
Handle the action specified by the directive identified by messageId
. The handling of subsequent directives with the same DialogRequestId
may be blocked until the DirectiveHandler
calls the setSucceeded()
method of the DirectiveHandlingResult
instance passed in to the preHandleDirective()
call for the directive specified by messageId
. If handling of this directive fails such that subsequent directives with the same DialogRequestId
should be cancelled, this DirectiveHandler
should instead call setFailed() to indicate a failure.
ExceptionEncountered
message should be sent to AVS. AVSDirectives
.messageId | The message ID of a directive previously passed to preHandleDirective() . |
false
when messageId
is not recognized, else true
. Any errors related to handling of a valid messageId should be reported using DirectiveHandlerResultInterface::setFailed()
. Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
override |
|
overridevirtual |
Notification that this handler has been de-registered and will not receive any more calls.
Implements alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface.
|
override |
TestDirectiveHandler::DirectiveParams alexaClientSDK::integration::test::TestDirectiveHandler::waitForNext | ( | const std::chrono::seconds | duration | ) |
Function to retrieve the next DirectiveParams in the test queue or time out if the queue is empty. Takes a duration in seconds to wait before timing out.
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0