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

#include <AlexaLauncherInterface.h>

Inheritance diagram for alexaClientSDK::acsdkAlexaLauncherInterfaces::AlexaLauncherInterface:
Inheritance graph
[legend]

Classes

struct  Response
 

Public Member Functions

virtual ~AlexaLauncherInterface ()=default
 
virtual Response launchTarget (const acsdkAlexaLauncherInterfaces::TargetState &targetState)=0
 
virtual acsdkAlexaLauncherInterfaces::TargetState getLauncherTargetState ()=0
 
virtual bool addObserver (const std::weak_ptr< AlexaLauncherObserverInterface > &observer)=0
 
virtual void removeObserver (const std::weak_ptr< AlexaLauncherObserverInterface > &observer)=0
 

Detailed Description

The AlexaLauncherInterface carries out launcher actions such as 'LaunchTarget'

An implementation of the AlexaLauncherInterface lets the user control the launcher related interactions. This can be called by multiple callers; for example the AlexaLauncher Capability Agent or the application’s GUI.

This interface can report to subscribers implementing the AlexaLauncherObserverInterface when there is a target state change.

Note
Implementations of this interface must be thread-safe.

Constructor & Destructor Documentation

◆ ~AlexaLauncherInterface()

virtual alexaClientSDK::acsdkAlexaLauncherInterfaces::AlexaLauncherInterface::~AlexaLauncherInterface ( )
virtualdefault

Virtual destructor to assure proper cleanup of derived types.

Member Function Documentation

◆ addObserver()

virtual bool alexaClientSDK::acsdkAlexaLauncherInterfaces::AlexaLauncherInterface::addObserver ( const std::weak_ptr< AlexaLauncherObserverInterface > &  observer)
pure virtual

Adds a AlexaLauncherObserverInterface observer.

Note
If AlexaLauncherInterface implementation has configured its instance's property as proactively reported, then it is required to notify observers of AlexaLauncherObserverInterface for any change in its property state. This includes notifying the value when the device starts, if it is different from the last reported value.
Parameters
observerThe reference to the AlexaLauncherObserverInterface.

◆ getLauncherTargetState()

virtual acsdkAlexaLauncherInterfaces::TargetState alexaClientSDK::acsdkAlexaLauncherInterfaces::AlexaLauncherInterface::getLauncherTargetState ( )
pure virtual

Get the current launcher target on the device.

Note
If AlexaLauncherInterface implementation has configured its instance's property as retrievable, this method should return the current launch target state. Unlike AlexaLauncherObserverInterface observer methods, this returns the current target state at any given point when requested, without a change in target state.
Returns
Return the current TargetState

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaLauncherHandler.

◆ launchTarget()

virtual Response alexaClientSDK::acsdkAlexaLauncherInterfaces::AlexaLauncherInterface::launchTarget ( const acsdkAlexaLauncherInterfaces::TargetState targetState)
pure virtual

Launch target on the device.

Parameters
targetStateThe target to launch, this can be an app or a GUI shortcut.
Returns
A AlexaLauncherResponse to indicate whether target was successfully launched or encountered an error while launching. AlexaLauncherResponse.responseType should return SUCCESS if there are no errors while launching the target. Otherwise, it should return the corresponding error code along with a log message AlexaLauncherResponse.errorMessage that would be logged in cloud for debugging purposes.

Implemented in alexaClientSDK::sampleApplications::common::EndpointAlexaLauncherHandler.

◆ removeObserver()

virtual void alexaClientSDK::acsdkAlexaLauncherInterfaces::AlexaLauncherInterface::removeObserver ( const std::weak_ptr< AlexaLauncherObserverInterface > &  observer)
pure virtual

Removes an observer of AlexaLauncherObserverInterface.

Parameters
observerThe reference to the AlexaLauncherObserverInterface.

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