#include <ExternalMediaAdapterInterface.h>
The ExternalMediaAdapterInterface specifies the interface of an adapter object to interact with a third party music service provider library. The adapter object handles session management of an user with the third party library/cloud and provides users with an interface to manage behaviors to control their play queue.
◆ ExternalMediaAdapterInterface()
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::ExternalMediaAdapterInterface |
( |
const std::string & |
adapterName | ) |
|
|
inlineexplicit |
◆ ~ExternalMediaAdapterInterface()
virtual alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::~ExternalMediaAdapterInterface |
( |
| ) |
|
|
virtualdefault |
◆ deInit()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::deInit |
( |
| ) |
|
|
pure virtual |
Method to de-initialize a third party library.
◆ getOffset()
virtual std::chrono::milliseconds alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::getOffset |
( |
| ) |
|
|
pure virtual |
This function retrieves the offset of the current track the adapter is handling.
- Returns
- This returns the offset in milliseconds.
◆ getState()
virtual AdapterState alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::getState |
( |
| ) |
|
|
pure virtual |
Method to fetch the state(session state and playback state) of an adapter.
◆ handleAdjustSeek()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleAdjustSeek |
( |
std::chrono::milliseconds |
deltaOffset | ) |
|
|
pure virtual |
Method to seek to an offset from the current position.
- Parameters
-
deltaOffset | The offset to seek to relative to the current offset. |
◆ handleAuthorized()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleAuthorized |
( |
bool |
authorized, |
|
|
const std::string & |
playerId, |
|
|
const std::string & |
defaultSkillToken |
|
) |
| |
|
pure virtual |
Method to alert if a player has been authorized. This method also provides the playerId and skillToken as identified by the cloud. Authorization may be revoked.
- Parameters
-
authorized | Whether the player is authorized. |
playerId | The playerId of this player. |
defaultSkillToken | The default skillToken to use if no directives have supplied one yet. |
◆ handleLogin()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleLogin |
( |
const std::string & |
accessToken, |
|
|
const std::string & |
userName, |
|
|
bool |
forceLogin, |
|
|
std::chrono::milliseconds |
tokenRefreshInterval |
|
) |
| |
|
pure virtual |
Method to allow a user to login to a third party music provider.
- Parameters
-
accessToken | The access context of the user identifier. |
userName | The userName of the user logging in. |
forceLogin | bool which signifies if the adapter has to a force a login or merely cache the access token. |
tokenRefreshInterval | The duration in milliseconds for which the accessToken is valid. |
◆ handleLogout()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleLogout |
( |
| ) |
|
|
pure virtual |
Method that handles logging out a user from a third party library/cloud.
◆ handlePlay()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handlePlay |
( |
const HandlePlayParams & |
params | ) |
|
|
pure virtual |
Method to allow a user to initiate play from a third party music service provider based on a play context.
- Parameters
-
params | Handle play parameters required for playback |
◆ handlePlayControl()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handlePlayControl |
( |
RequestType |
requestType, |
|
|
const std::string & |
playbackTarget |
|
) |
| |
|
pure virtual |
Method to initiate the different types of play control like PLAY/PAUSE/RESUME/NEXT/...
- Parameters
-
requestType | The type of REQUEST. Will always be PLAY/PAUSE/RESUME/NEXT... |
playbackTarget | The PlaybackTarget is used to specify the targeted device that will handle the play control. |
isLocal | Whether play control is locally triggered on device |
◆ handleSeek()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleSeek |
( |
std::chrono::milliseconds |
offset | ) |
|
|
pure virtual |
Method to seek to the given offset.
- Parameters
-
offset | The offset to seek to. |
◆ init()
virtual void alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::init |
( |
| ) |
|
|
pure virtual |
Method to initialize a third party library.
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/capabilities/ExternalMediaPlayer/acsdkExternalMediaPlayerInterfaces/include/acsdkExternalMediaPlayerInterfaces/ExternalMediaAdapterInterface.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0