AlexaClientSDK  1.22.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesObserverInterface Class Referenceabstract

#include <CapabilitiesObserverInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesObserverInterface:
Inheritance graph
[legend]

Public Types

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 Member Functions

virtual ~CapabilitiesObserverInterface ()=default
 
virtual void onCapabilitiesStateChange (State newState, Error newError, const std::vector< std::string > &addedOrUpdatedEndpointIds, const std::vector< std::string > &deletedEndpointIds)=0
 

Detailed Description

This interface is used to observe changes to the state of the CapabilitiesDelegate.

Member Enumeration Documentation

◆ Error

The enum Error encodes possible errors which may occur when changing state.

Enumerator
UNINITIALIZED 

The state (and hence the error) has not been initialized.

SUCCESS 

Success.

UNKNOWN_ERROR 

An unknown error occurred.

CANCELED 

The request was canceled.

FORBIDDEN 

The authorization failed.

SERVER_INTERNAL_ERROR 

The server encountered a runtime error.

BAD_REQUEST 

The request is missing a required parameter, has an invalid value, or is otherwise improperly formed.

◆ State

The enum State describes the state of the CapabilitiesDelegate.

Enumerator
UNINITIALIZED 

CapabilitiesDelegate is uninitialized.

SUCCESS 

The Capabilities API message went through without issues.

FATAL_ERROR 

The message did not go through because of issues that need fixing.

RETRIABLE_ERROR 

The message did not go through, but you can retry to see if you succeed.

Constructor & Destructor Documentation

◆ ~CapabilitiesObserverInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesObserverInterface::~CapabilitiesObserverInterface ( )
virtualdefault

Virtual destructor to assure proper cleanup of derived types.

Member Function Documentation

◆ onCapabilitiesStateChange()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::CapabilitiesObserverInterface::onCapabilitiesStateChange ( State  newState,
Error  newError,
const std::vector< std::string > &  addedOrUpdatedEndpointIds,
const std::vector< std::string > &  deletedEndpointIds 
)
pure virtual

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.

The documentation for this class was generated from the following file:

AlexaClientSDK 1.22.0 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0