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

#include <MockDirectiveHandler.h>

Inheritance diagram for alexaClientSDK::adsl::test::DirectiveHandlerMockAdapter:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::adsl::test::DirectiveHandlerMockAdapter:
Collaboration graph
[legend]

Public Member Functions

void preHandleDirective (std::shared_ptr< avsCommon::avs::AVSDirective > directive, std::unique_ptr< avsCommon::sdkInterfaces::DirectiveHandlerResultInterface > result) override
 
virtual void preHandleDirective (std::shared_ptr< avsCommon::avs::AVSDirective > directive, std::shared_ptr< avsCommon::sdkInterfaces::DirectiveHandlerResultInterface > result)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::DirectiveHandlerInterface
virtual ~DirectiveHandlerInterface ()=default
 
virtual void handleDirectiveImmediately (std::shared_ptr< avsCommon::avs::AVSDirective > directive)=0
 
virtual void preHandleDirective (std::shared_ptr< avsCommon::avs::AVSDirective > directive, std::unique_ptr< DirectiveHandlerResultInterface > result)=0
 
virtual bool handleDirective (const std::string &messageId)=0
 
virtual void cancelDirective (const std::string &messageId)=0
 
virtual void onDeregistered ()=0
 
virtual avs::DirectiveHandlerConfiguration getConfiguration () const =0
 

Detailed Description

gmock does not fully support C++11's move only semantics. Replaces the use of unique_ptr in DirectiveHandlerInterface with shared_ptr so that methods using unique_ptr can be mocked.

Member Function Documentation

◆ preHandleDirective() [1/2]

void alexaClientSDK::adsl::test::DirectiveHandlerMockAdapter::preHandleDirective ( std::shared_ptr< avsCommon::avs::AVSDirective directive,
std::unique_ptr< avsCommon::sdkInterfaces::DirectiveHandlerResultInterface result 
)
override

◆ preHandleDirective() [2/2]

virtual void alexaClientSDK::adsl::test::DirectiveHandlerMockAdapter::preHandleDirective ( std::shared_ptr< avsCommon::avs::AVSDirective directive,
std::shared_ptr< avsCommon::sdkInterfaces::DirectiveHandlerResultInterface result 
)
pure virtual

Variant of preHandleDirective taking a shared_ptr instead of a unique_ptr.

Parameters
directiveThe AVSDirective to be (pre) handled.
resultThe object to receive completion/failure notifications.

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