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

Observes user input from the console and notifies the interaction manager of the user's intentions. More...

#include <UserInputManager.h>

Inheritance diagram for alexaClientSDK::sampleApp::UserInputManager:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApp::UserInputManager:
Collaboration graph
[legend]

Public Member Functions

SampleAppReturnCode run ()
 
RegistrationObserverInterface Functions
void onLogout () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface
virtual ~AuthObserverInterface ()=default
 
virtual void onAuthStateChange (State newState, Error error)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesDelegateObserverInterface
virtual ~CapabilitiesDelegateObserverInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::RegistrationObserverInterface
virtual ~RegistrationObserverInterface ()=default
 

Static Public Member Functions

static std::unique_ptr< UserInputManagercreate (std::shared_ptr< sampleApplications::common::InteractionManager > interactionManager, std::shared_ptr< GuiRenderer > guiRenderer, std::shared_ptr< ConsoleReader > consoleReader, std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > localeAssetsManager, const avsCommon::sdkInterfaces::endpoints::EndpointIdentifier &defaultEndpointId)
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::AuthObserverInterface
enum  State {
  State::UNINITIALIZED, State::REFRESHED, State::EXPIRED, State::UNRECOVERABLE_ERROR,
  State::AUTHORIZING
}
 The enum State describes the state of authorization. More...
 
enum  Error {
  Error::SUCCESS, Error::UNKNOWN_ERROR, Error::AUTHORIZATION_FAILED, Error::UNAUTHORIZED_CLIENT,
  Error::SERVER_ERROR, Error::INVALID_REQUEST, Error::INVALID_VALUE, Error::AUTHORIZATION_EXPIRED,
  Error::UNSUPPORTED_GRANT_TYPE, Error::INVALID_CODE_PAIR, Error::AUTHORIZATION_PENDING, Error::SLOW_DOWN,
  Error::INTERNAL_ERROR, Error::INVALID_CBL_CLIENT_ID
}
 The enum Error encodes possible errors which may occur when changing state. More...
 
- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesDelegateObserverInterface
enum  State { State::UNINITIALIZED, State::SUCCESS, State::FATAL_ERROR, State::RETRIABLE_ERROR }
 The enum State describes the state of the CapabilitiesDelegate. More...
 
enum  Error {
  Error::UNINITIALIZED, Error::SUCCESS, Error::UNKNOWN_ERROR, Error::CANCELED,
  Error::FORBIDDEN, Error::SERVER_INTERNAL_ERROR, Error::BAD_REQUEST
}
 The enum Error encodes possible errors which may occur when changing state. More...
 

Detailed Description

Observes user input from the console and notifies the interaction manager of the user's intentions.

Member Function Documentation

◆ create()

static std::unique_ptr<UserInputManager> alexaClientSDK::sampleApp::UserInputManager::create ( std::shared_ptr< sampleApplications::common::InteractionManager interactionManager,
std::shared_ptr< GuiRenderer guiRenderer,
std::shared_ptr< ConsoleReader consoleReader,
std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface localeAssetsManager,
const avsCommon::sdkInterfaces::endpoints::EndpointIdentifier defaultEndpointId 
)
static

Create a UserInputManager.

Parameters
interactionManagerAn instance of the InteractionManager used to manage user input.
guiRendererAn instance of GuiRenderer to be used to fetch playback states.
consoleReaderThe ConsoleReader to read inputs from console.
localeAssetsManagerThe LocaleAssetsManagerInterface that provides the supported locales.
defaultEndpointIdThe EndpointIdentifier of the default endpoint.
Returns
Returns a new UserInputManager, or nullptr if the operation failed.

◆ onLogout()

void alexaClientSDK::sampleApp::UserInputManager::onLogout ( )
overridevirtual

Notification that the current customer has logged out.

Warning
This method is called while RegistrationManager is in a locked state. The callback must not block on calls to RegistrationManager methods either.

Implements alexaClientSDK::registrationManager::RegistrationObserverInterface.

◆ run()

SampleAppReturnCode alexaClientSDK::sampleApp::UserInputManager::run ( )

Processes user input until a quit command or a device reset is triggered.

Returns
Returns a SampleAppReturnCode.

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