AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Public Attributes | List of all members
alexaClientSDK::acsdkAlexaSeekControllerInterfaces::AlexaSeekControllerInterface::Response Struct Reference

#include <AlexaSeekControllerInterface.h>

Public Types

enum  Type {
  Type::SUCCESS, Type::ALREADY_IN_OPERATION, Type::CANCELED_BY_NEW_REQUEST, Type::NO_CONTENT_AVAILABLE,
  Type::CONTENT_CANNOT_BE_SEEKED, Type::INTERNAL_ERROR
}
 

Public Member Functions

 Response (std::chrono::milliseconds currentMediaPosition)
 
 Response (Type type, const std::string &errorMessage)
 

Public Attributes

Type type
 The AlexaSeekControllerInterface response type. More...
 
std::chrono::milliseconds currentMediaPosition
 
std::string errorMessage
 

Detailed Description

Struct for holding AlexaSeekController response for AlexaSeekController interface

type should be SUCCESS and currentMediaPosition should be set to the current media's timestamp position after seeking if there are no errors while executing seek controller operation. Otherwise, it should return the corresponding error response type type along with a log message errorMessage that would be logged in the cloud, for the purposes of aiding debugging.

Member Enumeration Documentation

◆ Type

Enum for the different error types understood by the AlexaSeekController capability agent.

Enumerator
SUCCESS 

Device processed command successfully without any errors.

ALREADY_IN_OPERATION 

Indicates the operation will be canceled due to an existing seek operation still processing on the device. This error should be returned as the response to the new operation if the device chooses to have the previous request take precedence.

CANCELED_BY_NEW_REQUEST 

Indicates the operation will be canceled as a new seek operation is initiated before the previous operation is completed. This error should be returned as the response to the previous operation if the device chooses to have the new request take precedence.

NO_CONTENT_AVAILABLE 

Indicates there is no audio or video content that is available when a seek operation is invoked.

CONTENT_CANNOT_BE_SEEKED 

Indicates the current audio or video content cannot be seeked. For example, a YouTube video ad.

INTERNAL_ERROR 

An error occurred that can't be described by one of the other error types. For example, a runtime exception occurred. We recommend that you always send a more specific error type, if possible.

Constructor & Destructor Documentation

◆ Response() [1/2]

alexaClientSDK::acsdkAlexaSeekControllerInterfaces::AlexaSeekControllerInterface::Response::Response ( std::chrono::milliseconds  currentMediaPosition)
inline

Constructor for Response. This response should be used when the seek operation is executed successfully on the device and should send back the new timestamp of the current media currentMediaPosition after seeking. Initializes the type to SUCCESS by default.

Parameters
currentMediaPositionThe media's new timestamp position in milliseconds after executing the seek operation.

◆ Response() [2/2]

alexaClientSDK::acsdkAlexaSeekControllerInterfaces::AlexaSeekControllerInterface::Response::Response ( Type  type,
const std::string &  errorMessage 
)
inline

Constructor for Response. This response should be used when the seek operation is not executed successfully on the device. Initializes the currentMediaPosition to -1 to indicate an error and should not be used when type is SUCCESS.

Parameters
typeThe response type Type. Should indicate a corresponding error type and must not be SUCCESS.
errorMessageThe error message if type is other than SUCCESS.

Member Data Documentation

◆ currentMediaPosition

std::chrono::milliseconds alexaClientSDK::acsdkAlexaSeekControllerInterfaces::AlexaSeekControllerInterface::Response::currentMediaPosition

The current position of the video or audio content in milliseconds after seeking. This value must always be greater than or equal to zero if the operation is successful and should be negative if errors are encountered during the execution of the seek operation.

◆ errorMessage

std::string alexaClientSDK::acsdkAlexaSeekControllerInterfaces::AlexaSeekControllerInterface::Response::errorMessage

The error message for logging if the type is any other than SUCCESS, for the purposes of aiding debugging.

◆ type

Type alexaClientSDK::acsdkAlexaSeekControllerInterfaces::AlexaSeekControllerInterface::Response::type

The AlexaSeekControllerInterface response type.


The documentation for this struct 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