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

#include <GUIClient.h>

Inheritance diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient:
Collaboration graph
[legend]

Public Member Functions

SampleAppReturnCode run ()
 
GUIClientInterface Functions
void setGUIManager (std::shared_ptr< gui::GUIServerInterface > guiManager) override
 
bool acquireFocus (std::string avsInterface, std::string channelName, avsCommon::avs::ContentType contentType, std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > channelObserver) override
 
bool releaseFocus (std::string avsInterface, std::string channelName, std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > channelObserver) override
 
void sendMessage (messages::MessageInterface &message) override
 
bool finalizeClientInitialization (bool errorState) override
 
void handleInitializeAPLRenderers (rapidjson::Document &payload) override
 
void handleDisplayMetrics (rapidjson::Document &payload) override
 
void handleAplEvent (rapidjson::Document &payload) override
 
void handleRenderComplete (rapidjson::Document &payload) override
 
void handleLocalRenderDocument (rapidjson::Document &payload) override
 
void handleLocalExecuteCommands (rapidjson::Document &payload) override
 
void handleLocalClearDocument (rapidjson::Document &payload) override
 
void handleOnFocusChangedReceivedConfirmation (GUIToken token) override
 
void focusAcquireRequest (const GUIToken token, const std::string &avsInterface, const std::string &channelName, avsCommon::avs::ContentType contentType) override
 Internal function to execute. More...
 
void focusReleaseRequest (const GUIToken token, const std::string &avsInterface, const std::string &channelName) override
 Internal function to execute. More...
 
void setLocales (const std::string &localeStr) override
 
std::shared_ptr< ipc::IPCRoutergetIPCRouter () override
 Returns a reference to m_ipcRouter. More...
 
MessagingServerInterface Functions
bool start () override
 
void writeMessage (const std::string &payload) override
 
void setMessageListener (std::shared_ptr< MessageListenerInterface > messageListener) override
 
void stop () override
 
bool isReady () override
 
void setObserver (const std::shared_ptr< communication::MessagingServerObserverInterface > &observer) override
 
MessagingServerObserverInterface Function
void onConnectionOpened () override
 
void onConnectionClosed () override
 
MessageListenerInterface Function
void onMessage (const std::string &jsonMessage) override
 
AuthObserverInterface Function
void onAuthStateChange (AuthObserverInterface::State newState, AuthObserverInterface::Error newError) override
 
CapabilitiesObserverInterface Methods
void onCapabilitiesStateChange (avsCommon::sdkInterfaces::CapabilitiesObserverInterface::State newState, avsCommon::sdkInterfaces::CapabilitiesObserverInterface::Error newError, const std::vector< avsCommon::sdkInterfaces::endpoints::EndpointIdentifier > &addedOrUpdatedEndpoints, const std::vector< avsCommon::sdkInterfaces::endpoints::EndpointIdentifier > &deletedEndpoints) override
 
CustomerDataHandlerInterface Function

}

void clearData () override
 
UIAuthNotifierInterface Function
void notifyAuthorizationRequest (const std::string &url, const std::string &code) override
 
void notifyAuthorizationStateChange (avsCommon::sdkInterfaces::AuthObserverInterface::State state) override
 
UIStateAggregatorInterface Function
void notifyAlexaState (const std::string &state) override
 
RegistrationObserverInterface Functions
void onLogout () override
 
IPCDispatcherInterface Functions
bool dispatch (const std::string &message) override
 
AudioFocusManagerHandlerInterface methods
void acquireChannelRequest (const std::string &message) override
 
void releaseChannelRequest (const std::string &message) override
 
void focusChangedReport (const std::string &message) override
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::communication::MessagingServerInterface
virtual void setObserver (const std::shared_ptr< MessagingServerObserverInterface > &observer)=0
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::communication::MessagingInterface
virtual void setMessageListener (std::shared_ptr< MessageListenerInterface > messageListener)=0
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::RegistrationObserverInterface
virtual ~RegistrationObserverInterface ()=default
 
- 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::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface
virtual ~GUIClientInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
 RequiresShutdown (const std::string &name)
 
virtual ~RequiresShutdown ()
 Destructor. More...
 
const std::string & name () const
 
void shutdown ()
 
bool isShutdown () const
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandler
 CustomerDataHandler (const std::shared_ptr< registrationManager::CustomerDataManagerInterface > &dataManager)
 
virtual ~CustomerDataHandler ()
 
- Public Member Functions inherited from alexaClientSDK::registrationManager::CustomerDataHandlerInterface
virtual ~CustomerDataHandlerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::acsdkSampleApplicationInterfaces::UIAuthNotifierInterface
virtual ~UIAuthNotifierInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::acsdkSampleApplicationInterfaces::UIStateAggregatorInterface
virtual ~UIStateAggregatorInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::AudioFocusManagerHandlerInterface
virtual ~AudioFocusManagerHandlerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::SystemHandlerInterface
virtual ~SystemHandlerInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< GUIClientcreate (std::shared_ptr< MessagingServerInterface > serverImplementation, const std::shared_ptr< registrationManager::CustomerDataManagerInterface > customerDataManager, const std::shared_ptr< ipc::IPCVersionManager > ipcVersionManager, std::shared_ptr< avsCommon::utils::DeviceInfo > deviceInfo)
 

SystemHandlerInterface methods

}

void authorizationStateRequest (const std::string &message) override
 } More...
 
void alexaStateRequest (const std::string &message) override
 } More...
 
void authorizationInfoRequest (const std::string &message) override
 } More...
 
void localesRequest (const std::string &message) override
 } More...
 
void setAplClientBridge (std::shared_ptr< AplClientBridge > aplClientBridge, bool aplVersionChanged)
 } More...
 
void setAPLRuntimePresentationAdapter (const std::shared_ptr< APLRuntimePresentationAdapter > &aplRuntimePresentationAdapter)
 
void addToMediaPlayerMap (const std::string &name, const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &mediaPlayer)
 Adds a mediaplayer to the m_mediaPlayerMap with the key as the name and value as the mediaplayer. More...
 
void initIPCRouter ()
 Initializes the IPC router. More...
 
void sendCompleteAuthorizationMessage (const std::string &url, const std::string &code, const std::string &clientId)
 
void sendSetAlexaStateMessage (const std::string &state)
 
void sendSetAuthorizationStateMessage (const std::string &state)
 
void sendSetLocalesMessage (const std::string &localeStr)
 

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...
 
- Public Types inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface
using GUIToken = uint64_t
 Alias for GUI provided token. More...
 

Detailed Description

Manages all GUI related operations to be called from the GUI and the SDK Encapsulates APL core Client implementation and APL Core integration point.

Member Function Documentation

◆ acquireChannelRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::acquireChannelRequest ( const std::string &  message)
overridevirtual

IPC Client sends this event to request the SDK to acquire audio focus for the given channel.

Parameters
messageIncoming IPC message from the IPC client.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::AudioFocusManagerHandlerInterface.

◆ acquireFocus()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::acquireFocus ( std::string  avsInterface,
std::string  channelName,
avsCommon::avs::ContentType  contentType,
std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface channelObserver 
)
overridevirtual

Request audio focus.

Parameters
avsInterfaceThe AVS Interface requesting focus.
channelNameThe channel to be requested.
contentTypeThe type of content acquiring focus.
channelObserverthe channelObserver to be notified.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ addToMediaPlayerMap()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::addToMediaPlayerMap ( const std::string &  name,
const std::shared_ptr< avsCommon::utils::mediaPlayer::MediaPlayerInterface > &  mediaPlayer 
)

Adds a mediaplayer to the m_mediaPlayerMap with the key as the name and value as the mediaplayer.

◆ alexaStateRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::alexaStateRequest ( const std::string &  message)
overridevirtual

}

Sets the APL Client Bridge

Parameters
aplClientBridgeThe APL Client bridge
aplVersionChangedTrue if the APL Client version has changed from last run.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::SystemHandlerInterface.

◆ authorizationInfoRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::authorizationInfoRequest ( const std::string &  message)
overridevirtual

}

Sets the APL Client Bridge

Parameters
aplClientBridgeThe APL Client bridge
aplVersionChangedTrue if the APL Client version has changed from last run.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::SystemHandlerInterface.

◆ authorizationStateRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::authorizationStateRequest ( const std::string &  message)
overridevirtual

}

Sets the APL Client Bridge

Parameters
aplClientBridgeThe APL Client bridge
aplVersionChangedTrue if the APL Client version has changed from last run.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::SystemHandlerInterface.

◆ clearData()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::clearData ( )
overridevirtual

Reset any internal state that may be associated with a particular user.

Warning
Object must succeed in deleting any customer data.
This method is called while CustomerDataManager is in a locked state. Do not call or wait for any CustomerDataManager operation.

Implements alexaClientSDK::registrationManager::CustomerDataHandlerInterface.

◆ create()

static std::shared_ptr<GUIClient> alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::create ( std::shared_ptr< MessagingServerInterface >  serverImplementation,
const std::shared_ptr< registrationManager::CustomerDataManagerInterface customerDataManager,
const std::shared_ptr< ipc::IPCVersionManager ipcVersionManager,
std::shared_ptr< avsCommon::utils::DeviceInfo deviceInfo 
)
static

Create a GUIClient

Parameters
serverImplementationAn implementation of MessagingInterface
customerDataManagerObject that will track the CustomerDataHandler.
Note
The serverImplementation should implement the start method in a blocking fashion.
Parameters
deviceInfoDeviceInfo which reflects the device setup credentials.
Returns
an instance of GUIClient.

◆ dispatch()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::dispatch ( const std::string &  message)
overridevirtual

Dispatches a message over IPC channel.

Parameters
messageMessage to be transmitted.

return true if successful.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::IPCDispatcherInterface.

◆ finalizeClientInitialization()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::finalizeClientInitialization ( bool  errorState)
overridevirtual

Finalize the client initialization with the error state so far passed from the caller.

Parameters
errorStateError state of the client initialization so far passed by the caller.
Returns
true if finalization succeeds.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ focusAcquireRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::focusAcquireRequest ( const GUIToken  token,
const std::string &  avsInterface,
const std::string &  channelName,
avsCommon::avs::ContentType  contentType 
)
overridevirtual

Internal function to execute.

See also
processFocusAcquireRequest

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ focusChangedReport()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::focusChangedReport ( const std::string &  message)
overridevirtual

IPC Client sends this event to inform the SDK that it has received the processFocusChanged directive.

Parameters
messageIncoming IPC message from the IPC client.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::AudioFocusManagerHandlerInterface.

◆ focusReleaseRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::focusReleaseRequest ( const GUIToken  token,
const std::string &  avsInterface,
const std::string &  channelName 
)
overridevirtual

Internal function to execute.

See also
processFocusReleaseRequest

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ getIPCRouter()

std::shared_ptr<ipc::IPCRouter> alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::getIPCRouter ( )
overridevirtual

◆ handleAplEvent()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleAplEvent ( rapidjson::Document &  payload)
overridevirtual

Handle aplEvent message.

Parameters
payloadThe payload retrieved from message holding this event.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleDisplayMetrics()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleDisplayMetrics ( rapidjson::Document &  payload)
overridevirtual

Handle displayMetrics message.

Parameters
payloadThe payload retrieved from message holding this event.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleInitializeAPLRenderers()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleInitializeAPLRenderers ( rapidjson::Document &  payload)
overridevirtual

Handle initialization of APL Renderers based on window and supported extensions reported by GUI app

Parameters
payloadThe payload retrieved from message holding this event.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleLocalClearDocument()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleLocalClearDocument ( rapidjson::Document &  payload)
overridevirtual

Handle Local ClearDocument message.

Parameters
payloadThe payload holding the local clear document directive.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleLocalExecuteCommands()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleLocalExecuteCommands ( rapidjson::Document &  payload)
overridevirtual

Handle Local ExecuteCommands message.

Parameters
payloadThe payload holding the local execute commands directive.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleLocalRenderDocument()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleLocalRenderDocument ( rapidjson::Document &  payload)
overridevirtual

Handle Local RenderDocument message.

Parameters
payloadThe payload holding the local render document directive.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleOnFocusChangedReceivedConfirmation()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleOnFocusChangedReceivedConfirmation ( GUIToken  token)
overridevirtual

Handle focus message received confirmation messages.

Parameters
tokenToken field in the focusChangedReport event.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ handleRenderComplete()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::handleRenderComplete ( rapidjson::Document &  payload)
overridevirtual

Handle renderComplete message.

Parameters
payloadThe payload retrieved from message holding this event.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ initIPCRouter()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::initIPCRouter ( )

Initializes the IPC router.

◆ isReady()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::isReady ( )
overridevirtual

◆ localesRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::localesRequest ( const std::string &  message)
overridevirtual

}

Sets the APL Client Bridge

Parameters
aplClientBridgeThe APL Client bridge
aplVersionChangedTrue if the APL Client version has changed from last run.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::SystemHandlerInterface.

◆ notifyAlexaState()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::notifyAlexaState ( const std::string &  state)
overridevirtual

Notify User interface about the interaction state

Parameters
stateUI state mainly to display the connection and Alexa states to user.

Implements alexaClientSDK::acsdkSampleApplicationInterfaces::UIStateAggregatorInterface.

◆ notifyAuthorizationRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::notifyAuthorizationRequest ( const std::string &  url,
const std::string &  code 
)
overridevirtual

Notify user interface about the authorization request. The request url and code will be used by the user to authorize.

Parameters
urlThe URL that the user needs to navigate to.
codeThe code that the user needs to enter once authorized.

Implements alexaClientSDK::acsdkSampleApplicationInterfaces::UIAuthNotifierInterface.

◆ notifyAuthorizationStateChange()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::notifyAuthorizationStateChange ( avsCommon::sdkInterfaces::AuthObserverInterface::State  state)
overridevirtual

Notify authorization state changes to GUI.

Parameters
stateChanged authorization state.

Implements alexaClientSDK::acsdkSampleApplicationInterfaces::UIAuthNotifierInterface.

◆ onAuthStateChange()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::onAuthStateChange ( AuthObserverInterface::State  newState,
AuthObserverInterface::Error  newError 
)
override

◆ onCapabilitiesStateChange()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::onCapabilitiesStateChange ( avsCommon::sdkInterfaces::CapabilitiesObserverInterface::State  newState,
avsCommon::sdkInterfaces::CapabilitiesObserverInterface::Error  newError,
const std::vector< avsCommon::sdkInterfaces::endpoints::EndpointIdentifier > &  addedOrUpdatedEndpointIds,
const std::vector< avsCommon::sdkInterfaces::endpoints::EndpointIdentifier > &  deletedEndpointIds 
)
overridevirtual

Notification that an CapabilitiesDelegate state has changed.

Note
Implementations of this method must not call CapabilitiesDelegate methods because the CapabilitiesDelegate may be in a 'locked' state at the time this call is made. If you do, then you may end up with a deadlock.
Parameters
newStateThe new state of the CapabilitiesDelegate.
newErrorThe error associated to the state change.
addedOrUpdatedEndpointIdsThe endpoint identifiers of endpoints sent in the addOrUpdateReport.
deletedEndpointIdsThe endpoint identifiers of endpoints sent in the deleteReport.

Implements alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesDelegateObserverInterface.

◆ onConnectionClosed()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::onConnectionClosed ( )
overridevirtual

◆ onConnectionOpened()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::onConnectionOpened ( )
overridevirtual

◆ onLogout()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::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.

◆ onMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::onMessage ( const std::string &  jsonMessage)
overridevirtual

Called when a new message is available on the arbitrary source channel

Note
Blocking in this handler will block delivery of further messages.
Parameters
jsonMessagean arbitrary string

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::communication::MessageListenerInterface.

◆ releaseChannelRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::releaseChannelRequest ( const std::string &  message)
overridevirtual

IPC Client sends this event to request the SDK to release audio focus for the given channel.

Parameters
messageIncoming IPC message from the IPC client.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::AudioFocusManagerHandlerInterface.

◆ releaseFocus()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::releaseFocus ( std::string  avsInterface,
std::string  channelName,
std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface channelObserver 
)
overridevirtual

Release audio focus.

Parameters
avsInterfaceThe AVS Interface releasing focus.
channelNameThe channel to be released.
channelObserverthe channelObserver to be notified.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ run()

SampleAppReturnCode alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::run ( )

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

Returns
Returns a SampleAppReturnCode.

◆ sendCompleteAuthorizationMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::sendCompleteAuthorizationMessage ( const std::string &  url,
const std::string &  code,
const std::string &  clientId 
)

Provides the IPC Client with information to complete CBL based authorization.

Parameters
urlThe url to use to complete CBL-based LWA authrorization.
codeThe CBL code to use to complete authorization.
clientIdAVS Device Id.

◆ sendMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::sendMessage ( messages::MessageInterface message)
overridevirtual

Send call state info.

Parameters
callStateInfoThe call state info. Sends a GUI Message to the server.
messageThe message to be written.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ sendSetAlexaStateMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::sendSetAlexaStateMessage ( const std::string &  state)

Informs the IPC Client of changes in the state of the Alexa client connection.

Parameters
stateEnumerated state of the Alexa client.

◆ sendSetAuthorizationStateMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::sendSetAuthorizationStateMessage ( const std::string &  state)

Informs the IPC Client of changes in Alexa Authorization status.

Parameters
stateEnumerated authorization state.

◆ sendSetLocalesMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::sendSetLocalesMessage ( const std::string &  localeStr)

Informs the IPC Client of changes in supported locales for the SDK.

Parameters
localeStrThe locale(s) for the device. In single-locale mode, contains one locale string. In multi-locale mode, the first string indicates the primary locale, and any other strings correspond to secondary locales.

◆ setAplClientBridge()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::setAplClientBridge ( std::shared_ptr< AplClientBridge aplClientBridge,
bool  aplVersionChanged 
)

}

Sets the APL Client Bridge

Parameters
aplClientBridgeThe APL Client bridge
aplVersionChangedTrue if the APL Client version has changed from last run.

◆ setAPLRuntimePresentationAdapter()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::setAPLRuntimePresentationAdapter ( const std::shared_ptr< APLRuntimePresentationAdapter > &  aplRuntimePresentationAdapter)

Sets the APL Runtime adapter

Parameters
aplRuntimePresentationAdapterShared pointer to APL runtime adapter

◆ setGUIManager()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::setGUIManager ( std::shared_ptr< gui::GUIServerInterface guiManager)
overridevirtual

Set a reference to a GUI Manager

Parameters
guiManagerClient related operations.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ setLocales()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::setLocales ( const std::string &  localeStr)
overridevirtual

Informs the IPC Client of changes in supported locales for the SDK.

Parameters
localeStrThe locale(s) for the device. In single-locale mode, contains one locale string. In multi-locale mode, the first string indicates the primary locale, and any other strings correspond to secondary locales.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClientInterface.

◆ setMessageListener()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::setMessageListener ( std::shared_ptr< MessageListenerInterface >  messageListener)
override

◆ setObserver()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::setObserver ( const std::shared_ptr< communication::MessagingServerObserverInterface > &  observer)
override

◆ start()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::start ( )
overridevirtual

Start the implementation of the MessagingInterface

Note
The implementation may choose to make this method blocking or non blocking.
Returns
true for success. False otherwise.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::communication::MessagingServerInterface.

◆ stop()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::stop ( )
overridevirtual

◆ writeMessage()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::gui::GUIClient::writeMessage ( const std::string &  payload)
overridevirtual

Write a message into a sink

Parameters
payloadan arbitrary string

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::communication::MessagingInterface.


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