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

#include <LiveViewControllerPresentationAdapter.h>

Inheritance diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter:
Collaboration graph
[legend]

Public Member Functions

PresentationObserverInterface functions
void onPresentationAvailable (presentationOrchestratorInterfaces::PresentationRequestToken id, std::shared_ptr< presentationOrchestratorInterfaces::PresentationInterface > presentation) override
 
void onPresentationStateChanged (presentationOrchestratorInterfaces::PresentationRequestToken id, presentationOrchestratorInterfaces::PresentationState newState) override
 
bool onNavigateBack (presentationOrchestratorInterfaces::PresentationRequestToken id) override
 
void cameraMicrophoneStateChanged (const std::string &message) override
 
void cameraFirstFrameRendered (const std::string &message) override
 
void windowIdReport (const std::string &message) override
 
LiveViewControllerInterface::Response start (std::unique_ptr< LiveViewControllerInterface::StartLiveViewRequest > request) override
 } More...
 
LiveViewControllerInterface::Response stop () override
 
LiveViewControllerInterface::Response setCameraState (alexaLiveViewControllerInterfaces::CameraState cameraState) override
 
alexaLiveViewControllerInterfaces::Configuration getConfiguration () override
 
bool addObserver (std::weak_ptr< alexaLiveViewControllerInterfaces::LiveViewControllerObserverInterface > observer) override
 
void removeObserver (std::weak_ptr< alexaLiveViewControllerInterfaces::LiveViewControllerObserverInterface > observer) override
 
AplLiveViewExtensionObserverInterface methods

}

void handleCameraExitRequest () override
 
void handleChangeCameraMicStateRequest (bool micOn) override
 
AudioInputProcessorObserverInterface methods

}

void onStateChanged (State state) override
 
void onASRProfileChanged (const std::string &profile) override
 
- Public Member Functions inherited from alexaClientSDK::presentationOrchestratorInterfaces::PresentationObserverInterface
virtual ~PresentationObserverInterface ()=default
 
virtual void onPresentationAvailable (PresentationRequestToken id, std::shared_ptr< PresentationInterface > presentation)=0
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::ipc::LiveViewCameraHandlerInterface
virtual ~LiveViewCameraHandlerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface
virtual ~LiveViewControllerInterface ()=default
 
virtual Response start (std::unique_ptr< StartLiveViewRequest > request)=0
 
virtual bool addObserver (std::weak_ptr< LiveViewControllerObserverInterface > observer)=0
 
virtual void removeObserver (std::weak_ptr< LiveViewControllerObserverInterface > observer)=0
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface
virtual ~AudioInputProcessorObserverInterface ()=default
 Destructor. More...
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::SpeechInteractionHandlerInterface
virtual ~SpeechInteractionHandlerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::sampleApplications::ipcServerSampleApp::extensions::liveView::AplLiveViewExtensionObserverInterface
virtual ~AplLiveViewExtensionObserverInterface ()=default
 

Static Public Member Functions

static std::shared_ptr< LiveViewControllerPresentationAdaptercreate (const std::shared_ptr< ipc::IPCHandlerRegistrationInterface > &ipcHandlerRegistrar, const std::shared_ptr< AplClientBridge > &aplClientBridge)
 
- Static Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface
static std::string stateToString (State state)
 

SpeechInteractionHandlerInterface Methods

}

std::future< bool > notifyOfWakeWord (capabilityAgents::aip::AudioProvider wakeWordAudioProvider, avsCommon::avs::AudioInputStream::Index beginIndex, avsCommon::avs::AudioInputStream::Index endIndex, std::string keyword, std::chrono::steady_clock::time_point startOfSpeechTimestamp, std::shared_ptr< const std::vector< char >> KWDMetadata=nullptr) override
 Pointer to the PresentationInterface presentation association. More...
 
std::future< bool > notifyOfTapToTalk (capabilityAgents::aip::AudioProvider tapToTalkAudioProvider, avsCommon::avs::AudioInputStream::Index beginIndex=capabilityAgents::aip::AudioInputProcessor::INVALID_INDEX, std::chrono::steady_clock::time_point startOfSpeechTimestamp=std::chrono::steady_clock::now()) override
 Pointer to the PresentationInterface presentation association. More...
 
std::future< bool > notifyOfHoldToTalkStart (capabilityAgents::aip::AudioProvider holdToTalkAudioProvider, std::chrono::steady_clock::time_point startOfSpeechTimestamp=std::chrono::steady_clock::now(), avsCommon::avs::AudioInputStream::Index beginIndex=capabilityAgents::aip::AudioInputProcessor::INVALID_INDEX) override
 Pointer to the PresentationInterface presentation association. More...
 
std::future< bool > notifyOfHoldToTalkEnd () override
 Pointer to the PresentationInterface presentation association. More...
 
std::future< bool > notifyOfTapToTalkEnd () override
 Pointer to the PresentationInterface presentation association. More...
 
void setPresentationOrchestrator (std::shared_ptr< presentationOrchestratorInterfaces::PresentationOrchestratorClientInterface > poClient)
 } More...
 
void setInteractionManager (std::shared_ptr< common::InteractionManager > interactionManager)
 
void handleSetCameraMicrophoneState (bool enabled)
 

Additional Inherited Members

- Public Types inherited from alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface
enum  State { State::IDLE, State::EXPECTING_SPEECH, State::RECOGNIZING, State::BUSY }
 The different states the AudioInputProcessor can be in. More...
 

Detailed Description

This class interprets the LiveViewController contract for user interface.

Member Function Documentation

◆ addObserver()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::addObserver ( std::weak_ptr< alexaLiveViewControllerInterfaces::LiveViewControllerObserverInterface observer)
override

name LiveViewCameraHandlerInterface methods

◆ cameraFirstFrameRendered()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::cameraFirstFrameRendered ( const std::string &  message)
overridevirtual

◆ cameraMicrophoneStateChanged()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::cameraMicrophoneStateChanged ( const std::string &  message)
overridevirtual

◆ create()

static std::shared_ptr<LiveViewControllerPresentationAdapter> alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::create ( const std::shared_ptr< ipc::IPCHandlerRegistrationInterface > &  ipcHandlerRegistrar,
const std::shared_ptr< AplClientBridge > &  aplClientBridge 
)
static

Create an instance of LiveViewControllerPresentationAdapter.

Parameters
ipcHandlerRegistrarPointer to the ipc::IPCHandlerRegistrationInterface.
aplClientBridgePointer to the AplClientBridge to support live view APL extension.
Returns
Shared pointer to the LiveViewControllerPresentationAdapter.

◆ getConfiguration()

alexaLiveViewControllerInterfaces::Configuration alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::getConfiguration ( )
overridevirtual

name LiveViewCameraHandlerInterface methods

Implements alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface.

◆ handleCameraExitRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::handleCameraExitRequest ( )
overridevirtual

Used to notify the observer when the extension has issued a request to exit the camera. The observer should stop the active camera.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::extensions::liveView::AplLiveViewExtensionObserverInterface.

◆ handleChangeCameraMicStateRequest()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::handleChangeCameraMicStateRequest ( bool  enabled)
overridevirtual

Used to notify the observer when the extension has issued a request to open the camera microphone. The observer should open the microphone for communication over the camera.

Parameters
enabledtrue if requesting to enable the microphone.

Implements alexaClientSDK::sampleApplications::ipcServerSampleApp::extensions::liveView::AplLiveViewExtensionObserverInterface.

◆ handleSetCameraMicrophoneState()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::handleSetCameraMicrophoneState ( bool  enabled)

Handle setting microphone state for live view camera use cases.

Parameters
enabledwhether microphone should be turned on for live view camera experiences or not.

◆ notifyOfHoldToTalkEnd()

std::future<bool> alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::notifyOfHoldToTalkEnd ( )
overridevirtual

Pointer to the PresentationInterface presentation association.

Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeechInteractionHandlerInterface.

◆ notifyOfHoldToTalkStart()

std::future<bool> alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::notifyOfHoldToTalkStart ( capabilityAgents::aip::AudioProvider  holdToTalkAudioProvider,
std::chrono::steady_clock::time_point  startOfSpeechTimestamp = std::chrono::steady_clock::now(),
avsCommon::avs::AudioInputStream::Index  beginIndex = capabilityAgents::aip::AudioInputProcessor::INVALID_INDEX 
)
overridevirtual

Pointer to the PresentationInterface presentation association.

Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeechInteractionHandlerInterface.

◆ notifyOfTapToTalk()

std::future<bool> alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::notifyOfTapToTalk ( capabilityAgents::aip::AudioProvider  tapToTalkAudioProvider,
avsCommon::avs::AudioInputStream::Index  beginIndex = capabilityAgents::aip::AudioInputProcessor::INVALID_INDEX,
std::chrono::steady_clock::time_point  startOfSpeechTimestamp = std::chrono::steady_clock::now() 
)
overridevirtual

Pointer to the PresentationInterface presentation association.

Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeechInteractionHandlerInterface.

◆ notifyOfTapToTalkEnd()

std::future<bool> alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::notifyOfTapToTalkEnd ( )
overridevirtual

Pointer to the PresentationInterface presentation association.

Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeechInteractionHandlerInterface.

◆ notifyOfWakeWord()

std::future<bool> alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::notifyOfWakeWord ( capabilityAgents::aip::AudioProvider  wakeWordAudioProvider,
avsCommon::avs::AudioInputStream::Index  beginIndex,
avsCommon::avs::AudioInputStream::Index  endIndex,
std::string  keyword,
std::chrono::steady_clock::time_point  startOfSpeechTimestamp,
std::shared_ptr< const std::vector< char >>  KWDMetadata = nullptr 
)
overridevirtual

Pointer to the PresentationInterface presentation association.

Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeechInteractionHandlerInterface.

◆ onASRProfileChanged()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::onASRProfileChanged ( const std::string &  profile)
overridevirtual

This function is called when the active ASRProfile changes.

Parameters
profileThe string representation of the active ASRProfile. Use the associated getASRProfile to retrieve the ASRProfile value.

Reimplemented from alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface.

◆ onNavigateBack()

bool alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::onNavigateBack ( presentationOrchestratorInterfaces::PresentationRequestToken  id)
overridevirtual

Called by the presentation orchestrator to perform custom back navigation on a presentation if supported

Parameters
idThe identifier for the presentation, as provided when the window was initially requested
Returns
true if the observer handled back navigation, false if the presentation orchestrator should handle back

Implements alexaClientSDK::presentationOrchestratorInterfaces::PresentationObserverInterface.

◆ onPresentationAvailable()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::onPresentationAvailable ( presentationOrchestratorInterfaces::PresentationRequestToken  id,
std::shared_ptr< presentationOrchestratorInterfaces::PresentationInterface presentation 
)
override

◆ onPresentationStateChanged()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::onPresentationStateChanged ( presentationOrchestratorInterfaces::PresentationRequestToken  id,
presentationOrchestratorInterfaces::PresentationState  newState 
)
overridevirtual

Called when the presentation state has changed

Parameters
idThe identifier for this presentation, as provided when the window was initially requested
newStateThe new presentation state

Implements alexaClientSDK::presentationOrchestratorInterfaces::PresentationObserverInterface.

◆ onStateChanged()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::onStateChanged ( State  state)
overridevirtual

This function is called when the state of the observed AudioInputProcessor changes. This function will block processing of audio inputs, so implementations should return quickly.

Parameters
stateThe new state of the AudioInputProcessor.

Implements alexaClientSDK::avsCommon::sdkInterfaces::AudioInputProcessorObserverInterface.

◆ removeObserver()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::removeObserver ( std::weak_ptr< alexaLiveViewControllerInterfaces::LiveViewControllerObserverInterface observer)
override

name LiveViewCameraHandlerInterface methods

◆ setCameraState()

LiveViewControllerInterface::Response alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::setCameraState ( alexaLiveViewControllerInterfaces::CameraState  cameraState)
overridevirtual

name LiveViewCameraHandlerInterface methods

Implements alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface.

◆ setInteractionManager()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::setInteractionManager ( std::shared_ptr< common::InteractionManager interactionManager)

Set the interaction manager

Parameters
interactionManagerpointer to the interaction manager.

◆ setPresentationOrchestrator()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::setPresentationOrchestrator ( std::shared_ptr< presentationOrchestratorInterfaces::PresentationOrchestratorClientInterface poClient)

}

Set the presentation orchestrator

Parameters
poClientpointer to the presentation orchestrator

◆ start()

LiveViewControllerInterface::Response alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::start ( std::unique_ptr< LiveViewControllerInterface::StartLiveViewRequest >  request)
override

}

name LiveViewControllerInterface methods

◆ stop()

LiveViewControllerInterface::Response alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::stop ( )
overridevirtual

name LiveViewCameraHandlerInterface methods

Implements alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface.

◆ windowIdReport()

void alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter::windowIdReport ( const std::string &  message)
overridevirtual

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