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::alexaLiveViewControllerInterfaces::LiveViewControllerInterface Class Referenceabstract

#include <LiveViewControllerInterface.h>

Inheritance diagram for alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface:
Inheritance graph
[legend]

Classes

struct  Response
 
struct  StartLiveViewRequest
 

Public Member Functions

virtual ~LiveViewControllerInterface ()=default
 
virtual Response start (std::unique_ptr< StartLiveViewRequest > request)=0
 
virtual Response stop ()=0
 
virtual Response setCameraState (CameraState cameraState)=0
 
virtual Configuration getConfiguration ()=0
 
virtual bool addObserver (std::weak_ptr< LiveViewControllerObserverInterface > observer)=0
 
virtual void removeObserver (std::weak_ptr< LiveViewControllerObserverInterface > observer)=0
 

Detailed Description

The LiveViewControllerInterface carries out camera live view actions such as starting or stopping a live stream.

Note
Implementations of this interface must be thread-safe.

Constructor & Destructor Documentation

◆ ~LiveViewControllerInterface()

virtual alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::~LiveViewControllerInterface ( )
virtualdefault

Virtual destructor to assure proper cleanup of derived types.

Member Function Documentation

◆ addObserver()

virtual bool alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::addObserver ( std::weak_ptr< LiveViewControllerObserverInterface observer)
pure virtual

Adds a LiveViewControllerObserverInterface observer.

Parameters
observerThe observer which to callback.
Returns
true if the observer was successfully added; otherwise false.

◆ getConfiguration()

virtual Configuration alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::getConfiguration ( )
pure virtual

Returns the LiveViewController configuration.

Returns
A Configuration object that contains the supported display modes, overlay types and overlay positions.

Implemented in alexaClientSDK::alexaLiveViewController::test::MockAlexaLiveViewControllerInterface, and alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter.

◆ removeObserver()

virtual void alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::removeObserver ( std::weak_ptr< LiveViewControllerObserverInterface observer)
pure virtual

Removes an observer of LiveViewControllerObserverInterface.

Parameters
observerThe observer which to callback.

◆ setCameraState()

virtual Response alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::setCameraState ( CameraState  cameraState)
pure virtual

Update the camera state based on the LiveViewController interaction with other components.

Parameters
cameraStateIncoming camera state.
Returns
Whether camera state has been updated successfully, or if an error was encountered in the process. LiveViewControllerInterface::Response.type should return SUCCESS if no errors were encountered. Otherwise, LiveViewControllerInterface::Response.type should contain the corresponding error code along with a log message in LiveViewControllerInterface::Response.errorMessage.

Implemented in alexaClientSDK::alexaLiveViewController::test::MockAlexaLiveViewControllerInterface, and alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter.

◆ start()

virtual Response alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::start ( std::unique_ptr< StartLiveViewRequest request)
pure virtual

Start camera live view stream based on the user request.

Parameters
requestThe request for the StartLiveView directive.
Returns
whether camera live view stream has been started successfully, or if an error was encountered in the process. LiveViewControllerInterface::Response.type should return SUCCESS if no errors were encountered. Otherwise, LiveViewControllerInterface::Response.type should contain the corresponding error code along with a log message in LiveViewControllerInterface::Response.errorMessage.

Implemented in alexaClientSDK::alexaLiveViewController::test::MockAlexaLiveViewControllerInterface.

◆ stop()

virtual Response alexaClientSDK::alexaLiveViewControllerInterfaces::LiveViewControllerInterface::stop ( )
pure virtual

Stop camera live view stream.

Returns
whether camera live view stream has been stopped successfully, or if an error was encountered in the process. LiveViewControllerInterface::Response.type should return SUCCESS if no errors were encountered. Otherwise, LiveViewControllerInterface::Response.type should contain the corresponding error code along with a log message in LiveViewControllerInterface::Response.errorMessage.

Implemented in alexaClientSDK::alexaLiveViewController::test::MockAlexaLiveViewControllerInterface, and alexaClientSDK::sampleApplications::ipcServerSampleApp::liveViewController::LiveViewControllerPresentationAdapter.


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