AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ExternalMediaAdapterInterface.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef ALEXA_CLIENT_SDK_ACSDKEXTERNALMEDIAPLAYERINTERFACES_INCLUDE_ACSDKEXTERNALMEDIAPLAYERINTERFACES_EXTERNALMEDIAADAPTERINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_ACSDKEXTERNALMEDIAPLAYERINTERFACES_INCLUDE_ACSDKEXTERNALMEDIAPLAYERINTERFACES_EXTERNALMEDIAADAPTERINTERFACE_H_
18 
19 #include <chrono>
20 #include <set>
21 #include <string>
22 #include <unordered_map>
23 
26 
27 namespace alexaClientSDK {
28 namespace acsdkExternalMediaPlayerInterfaces {
29 
32 enum class RequestType {
34  INIT,
35 
37  DEINIT,
38 
40  LOGIN,
41 
43  LOGOUT,
44 
46  REGISTER,
47 
49  PLAY,
50 
52  RESUME,
53 
55  PAUSE,
56 
58  STOP,
59 
62 
64  NEXT,
65 
67  PREVIOUS,
68 
70  START_OVER,
71 
74 
76  REWIND,
77 
80 
83 
86 
89 
92 
95 
97  FAVORITE,
98 
101 
103  UNFAVORITE,
104 
107 
109  SEEK,
110 
112  ADJUST_SEEK,
113 
115  SET_VOLUME,
116 
119 
121  SET_MUTE,
122 
125 
127  GET_INFO,
128 
130  ADD_USER,
131 
133  RESET_USER,
134 
136  NONE
137 };
138 
141  PLAY,
142 
144  RESUME,
145 
147  PAUSE,
148 
150  STOP,
151 
153  NEXT,
154 
156  PREVIOUS,
157 
159  START_OVER,
160 
162  FAST_FORWARD,
163 
165  REWIND,
166 
169 
172 
175 
178 
181 
183  FAVORITE,
184 
186  UNFAVORITE,
187 
189  SEEK,
190 
192  ADJUST_SEEK,
193 
194 };
195 
199 enum class ChangeCauseType {
202 
205 
208 
210  RULE_TRIGGER,
211 
214 };
215 
219 enum class Favorites {
221  FAVORITED,
222 
224  UNFAVORITED,
225 
227  NOT_RATED
228 };
229 
233 enum class MediaType {
235  TRACK,
236 
238  PODCAST,
239 
241  STATION,
242 
244  AD,
245 
247  SAMPLE,
248 
250  OTHER
251 };
252 
256 enum class Navigation {
260  DEFAULT,
264  NONE,
268  FOREGROUND
269 };
270 
277 inline std::string navigationToString(Navigation navigation) {
278  switch (navigation) {
279  case Navigation::DEFAULT:
280  return "DEFAULT";
281  case Navigation::NONE:
282  return "NONE";
284  return "FOREGROUND";
285  }
286  return "";
287 }
288 
296 inline std::ostream& operator<<(std::ostream& stream, const Navigation& navigation) {
297  return stream << navigationToString(navigation);
298 }
299 
306 inline Navigation stringToNavigation(const std::string& str) {
307  if (str == "DEFAULT") {
308  return Navigation::DEFAULT;
309  } else if (str == "NONE") {
310  return Navigation::NONE;
311  } else if (str == "FOREGROUND") {
312  return Navigation::FOREGROUND;
313  } else {
314  // default to DEFAULT
315  return Navigation::DEFAULT;
316  }
317 }
318 
323  /*
324  * Default Constructor.
325  */
327 
330  std::string playerId;
331 
334  std::string localPlayerId;
335 
337  std::string endpointId;
338 
340  bool loggedIn;
341 
344  std::string userName;
345 
347  bool isGuest;
348 
350  bool launched;
351 
356  bool active;
357 
359  std::string spiVersion;
360 
362  std::string playerCookie;
363 
366  std::string skillToken;
367 
370  std::string playbackSessionId;
371 
377  std::string accessToken;
378 
380  std::chrono::milliseconds tokenRefreshInterval;
381 
382 #ifdef MEDIA_PORTABILITY_ENABLED
383  std::string mediaSessionId;
386 
388  std::string correlationToken;
389 #endif
390 };
391 
398 
401  std::string playerId;
402 
404  std::string state;
405 
407  std::set<SupportedPlaybackOperation> supportedOperations;
408 
410  std::chrono::milliseconds trackOffset;
411 
414 
417 
420 
423  std::string type;
424 
426  std::string playbackSource;
427 
431  std::string playbackSourceId;
432 
438  std::string playbackId;
439 
441  std::string trackName;
442 
445  std::string trackId;
446 
449  std::string trackNumber;
450 
452  std::string artistName;
453 
457  std::string artistId;
458 
460  std::string albumName;
461 
465  std::string albumId;
466 
468  std::string tinyURL;
469 
471  std::string smallURL;
472 
474  std::string mediumURL;
475 
477  std::string largeURL;
478 
481  std::string coverId;
482 
485  std::string mediaProvider;
486 
490 
492  std::chrono::milliseconds duration;
493 
496 };
497 
502 public:
504  AdapterState() = default;
505 
508 
511 };
512 
521 public:
527  explicit ExternalMediaAdapterInterface(const std::string& adapterName);
528 
532  virtual ~ExternalMediaAdapterInterface() = default;
533 
539  std::string playContextToken;
541  int64_t index;
543  std::chrono::milliseconds offset;
545  std::string skillToken;
547  std::string playbackSessionId;
551  bool preload;
554 #ifdef MEDIA_PORTABILITY_ENABLED
555  std::string mediaSessionId;
558  std::string correlationToken;
559 #endif
560  std::string playbackTarget;
562 
585  const std::string& playContextToken,
586  int64_t index,
587  std::chrono::milliseconds offset,
588  const std::string& skillToken,
589  const std::string& playbackSessionId,
591  bool preload,
593 #ifdef MEDIA_PORTABILITY_ENABLED
594  const std::string& mediaSessionId,
595  const std::string& correlationToken,
596 #endif
597  const std::string& playbackTarget) :
599  index{index},
600  offset{offset},
604  preload{preload},
606 #ifdef MEDIA_PORTABILITY_ENABLED
607  mediaSessionId{mediaSessionId},
608  correlationToken{correlationToken},
609 #endif
611  }
612  };
613 
615  virtual void init() = 0;
616 
618  virtual void deInit() = 0;
619 
630  virtual void handleLogin(
631  const std::string& accessToken,
632  const std::string& userName,
633  bool forceLogin,
634  std::chrono::milliseconds tokenRefreshInterval) = 0;
635 
639  virtual void handleLogout() = 0;
640 
647  virtual void handlePlay(const HandlePlayParams& params) = 0;
648 
658  virtual void handlePlayControl(
659  RequestType requestType,
660 #ifdef MEDIA_PORTABILITY_ENABLED
663  const std::string& mediaSessionId,
664  const std::string& correlationToken,
665 #endif
666  const std::string& playbackTarget) = 0;
667 
673  virtual void handleSeek(std::chrono::milliseconds offset) = 0;
674 
680  virtual void handleAdjustSeek(std::chrono::milliseconds deltaOffset) = 0;
681 
692  virtual void handleAuthorized(
693  bool authorized,
694  const std::string& playerId,
695  const std::string& defaultSkillToken) = 0;
696 
698  virtual AdapterState getState() = 0;
699 
706  virtual std::chrono::milliseconds getOffset() = 0;
707 };
708 
709 inline AdapterSessionState::AdapterSessionState() : loggedIn{false}, isGuest{false}, launched{false}, active{false} {
710 }
711 
713  state{"IDLE"},
714  trackOffset{0},
715  shuffleEnabled{false},
716  repeatEnabled{false},
717  favorites{Favorites::NOT_RATED},
718  mediaType{MediaType::TRACK},
719  duration{0} {
720 }
721 
722 inline ExternalMediaAdapterInterface::ExternalMediaAdapterInterface(const std::string& adapterName) :
723  RequiresShutdown{adapterName} {
724 }
725 
732 inline std::string RequestTypeToString(RequestType requestType) {
733  switch (requestType) {
734  case RequestType::INIT:
735  return "INIT";
736  case RequestType::DEINIT:
737  return "DEINIT";
738  case RequestType::LOGIN:
739  return "LOGIN";
740  case RequestType::LOGOUT:
741  return "LOGOUT";
743  return "REGISTER";
744  case RequestType::PLAY:
745  return "PLAY";
746  case RequestType::RESUME:
747  return "RESUME";
748  case RequestType::PAUSE:
749  return "PAUSE";
750  case RequestType::STOP:
751  return "STOP";
753  return "PAUSE_RESUME_TOGGLE";
754  case RequestType::NEXT:
755  return "NEXT";
757  return "PREVIOUS";
759  return "START_OVER";
761  return "FAST_FORWARD";
762  case RequestType::REWIND:
763  return "REWIND";
765  return "ENABLE_REPEAT_ONE";
767  return "DISABLE_REPEAT_ONE";
769  return "ENABLE_REPEAT";
771  return "DISABLE_REPEAT";
773  return "ENABLE_SHUFFLE";
775  return "DISABLE_SHUFFLE";
777  return "FAVORITE";
779  return "DESELECT_FAVORITE";
781  return "UNFAVORITE";
783  return "DESELECT_UNFAVORITE";
784  case RequestType::SEEK:
785  return "SEEK";
787  return "ADJUST_SEEK";
789  return "SET_VOLUME";
791  return "ADJUST_VOLUME";
793  return "SET_MUTE";
795  return "SET_DISPLAY_NAME";
797  return "GET_INFO";
799  return "ADD_USER";
801  return "RESET_USER";
802  case RequestType::NONE:
803  return "NONE";
804  }
805 
806  return "unknown request type";
807 }
808 
816  switch (operation) {
818  return "Play";
820  return "Resume";
822  return "Pause";
824  return "Stop";
826  return "Next";
828  return "Previous";
830  return "StartOver";
832  return "FastForward";
834  return "Rewind";
836  return "EnableRepeat";
838  return "EnableRepeatOne";
840  return "DisableRepeat";
842  return "EnableShuffle";
844  return "DisableShuffle";
846  return "Favorite";
848  return "Unfavorite";
850  return "SetSeekPosition";
852  return "AdjustSeekPosition";
853  }
854 
855  return "unknown operation";
856 }
857 
864 inline std::string ChangeTriggerToString(ChangeCauseType changeType) {
865  switch (changeType) {
867  return "VOICE_INTERACTION";
869  return "PHYSICAL_INTERACTION";
871  return "APP_INTERACTION";
873  return "RULE_TRIGGER";
875  return "PERIODIC_POLL";
876  }
877 
878  return "unknown changeTrigger";
879 }
880 
887 inline std::string RatingToString(Favorites rating) {
888  switch (rating) {
890  return "FAVORITED";
892  return "UNFAVORITED";
894  return "NOT_RATED";
895  }
896 
897  return "unknown rating";
898 }
899 
906 inline std::string MediaTypeToString(MediaType mediaType) {
907  switch (mediaType) {
908  case MediaType::TRACK:
909  return "TRACK";
910  case MediaType::PODCAST:
911  return "PODCAST";
912  case MediaType::STATION:
913  return "STATION";
914  case MediaType::AD:
915  return "AD";
916  case MediaType::SAMPLE:
917  return "SAMPLE";
918  case MediaType::OTHER:
919  return "OTHER";
920  }
921 
922  return "unknown mediaType";
923 }
924 
925 inline std::string SHUFFLE_STATUS_STRING(bool shuffleEnabled) {
926  return (shuffleEnabled == true) ? "SHUFFLED" : "NOT_SHUFFLED";
927 }
928 
929 inline std::string REPEAT_STATUS_STRING(bool repeatEnabled) {
930  return (repeatEnabled == true) ? "REPEATED" : "NOT_REPEATED";
931 }
932 
933 } // namespace acsdkExternalMediaPlayerInterfaces
934 } // namespace alexaClientSDK
935 
936 #endif // ALEXA_CLIENT_SDK_ACSDKEXTERNALMEDIAPLAYERINTERFACES_INCLUDE_ACSDKEXTERNALMEDIAPLAYERINTERFACES_EXTERNALMEDIAADAPTERINTERFACE_H_
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::playbackSourceId
std::string playbackSourceId
Definition: ExternalMediaAdapterInterface.h:431
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::deInit
virtual void deInit()=0
Method to de-initialize a third party library.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::offset
std::chrono::milliseconds offset
Offset to play from.
Definition: ExternalMediaAdapterInterface.h:543
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::~ExternalMediaAdapterInterface
virtual ~ExternalMediaAdapterInterface()=default
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::SET_DISPLAY_NAME
@ SET_DISPLAY_NAME
Set the name the external media player will show for this device.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::REGISTER
@ REGISTER
Register.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::UNFAVORITE
@ UNFAVORITE
Mark a track as not a favorite.(thumbs down)
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::PAUSE
@ PAUSE
Pause.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams
Definition: ExternalMediaAdapterInterface.h:537
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handlePlayControl
virtual void handlePlayControl(RequestType requestType, const std::string &playbackTarget)=0
alexaClientSDK::avsCommon::utils::RequiresShutdown
Definition: RequiresShutdown.h:32
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaTypeToString
std::string MediaTypeToString(MediaType mediaType)
Definition: ExternalMediaAdapterInterface.h:906
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeCauseType::RULE_TRIGGER
@ RULE_TRIGGER
Change was triggered by a rule.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::PLAY
@ PLAY
Play.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::START_OVER
@ START_OVER
Starover from the beginning.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::STOP
@ STOP
Stop.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::PLAY
@ PLAY
Play.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::skillToken
std::string skillToken
Definition: ExternalMediaAdapterInterface.h:366
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::init
virtual void init()=0
Method to initialize a third party library.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::DISABLE_SHUFFLE
@ DISABLE_SHUFFLE
Disable shuffle.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::NONE
@ NONE
None means there are no pending requests.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeTriggerToString
std::string ChangeTriggerToString(ChangeCauseType changeType)
Definition: ExternalMediaAdapterInterface.h:864
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleLogout
virtual void handleLogout()=0
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::REWIND
@ REWIND
rewind
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::ADJUST_SEEK
@ ADJUST_SEEK
Seek to an offset relative to the current offset.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::RESET_USER
@ RESET_USER
Reset User Message.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::playbackSessionId
std::string playbackSessionId
Definition: ExternalMediaAdapterInterface.h:370
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handlePlay
virtual void handlePlay(const HandlePlayParams &params)=0
alexaClientSDK::avsCommon::avs::PlayRequestor
Definition: PlayRequestor.h:29
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::FAVORITE
@ FAVORITE
Mark a track as favorite.(thumbs up true)
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::AdapterPlaybackState
AdapterPlaybackState()
Default constructor.
Definition: ExternalMediaAdapterInterface.h:712
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::active
bool active
Definition: ExternalMediaAdapterInterface.h:356
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::PAUSE_RESUME_TOGGLE
@ PAUSE_RESUME_TOGGLE
Pause or Resume depending on current state.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::supportedOperations
std::set< SupportedPlaybackOperation > supportedOperations
The set of states the default player can move into from its current state.
Definition: ExternalMediaAdapterInterface.h:407
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::skillToken
std::string skillToken
Associated skillToken.
Definition: ExternalMediaAdapterInterface.h:545
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::ENABLE_REPEAT_ONE
@ ENABLE_REPEAT_ONE
Enable Repeat of a track.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::UNFAVORITE
@ UNFAVORITE
Mark a track as not a favorite.(thumbs down true)
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::getState
virtual AdapterState getState()=0
Method to fetch the state(session state and playback state) of an adapter.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::playRequestor
avsCommon::avs::PlayRequestor playRequestor
The PlayRequestor object from the PLAY directive.
Definition: ExternalMediaAdapterInterface.h:495
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::endpointId
std::string endpointId
The unique device endpoint.
Definition: ExternalMediaAdapterInterface.h:337
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::playRequestor
avsCommon::avs::PlayRequestor playRequestor
PlayRequestor for indicating who requested playback.
Definition: ExternalMediaAdapterInterface.h:553
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperationToString
std::string SupportedPlaybackOperationToString(SupportedPlaybackOperation operation)
Definition: ExternalMediaAdapterInterface.h:815
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterState::AdapterState
AdapterState()=default
Default constructor.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::PAUSE
@ PAUSE
Pause.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Favorites
Favorites
Definition: ExternalMediaAdapterInterface.h:219
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::FAST_FORWARD
@ FAST_FORWARD
Fast-forward.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation
SupportedPlaybackOperation
Definition: ExternalMediaAdapterInterface.h:139
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::NEXT
@ NEXT
Next.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::spiVersion
std::string spiVersion
The service provider interface (SPI) version.
Definition: ExternalMediaAdapterInterface.h:359
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::artistId
std::string artistId
Definition: ExternalMediaAdapterInterface.h:457
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::index
int64_t index
Index for track.
Definition: ExternalMediaAdapterInterface.h:541
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::loggedIn
bool loggedIn
Flag that identifies if a user is currently logged in or not.
Definition: ExternalMediaAdapterInterface.h:340
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleAuthorized
virtual void handleAuthorized(bool authorized, const std::string &playerId, const std::string &defaultSkillToken)=0
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterState
Definition: ExternalMediaAdapterInterface.h:501
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType::STATION
@ STATION
The media is a station.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType
MediaType
Definition: ExternalMediaAdapterInterface.h:233
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::artistName
std::string artistName
The display name for the currently playing artist.
Definition: ExternalMediaAdapterInterface.h:452
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::DISABLE_REPEAT
@ DISABLE_REPEAT
Disable loop on.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::ENABLE_SHUFFLE
@ ENABLE_SHUFFLE
Enable shuffle.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::userName
std::string userName
Definition: ExternalMediaAdapterInterface.h:344
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType::OTHER
@ OTHER
The media type is something other than track/podcast/station/ad/sample.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::LOGOUT
@ LOGOUT
Logout.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::playbackSource
std::string playbackSource
The display name for current playback context, e.g. playlist name.
Definition: ExternalMediaAdapterInterface.h:426
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::mediumURL
std::string mediumURL
The URL for medium cover art image resource} .
Definition: ExternalMediaAdapterInterface.h:474
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::PREVIOUS
@ PREVIOUS
Previous.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::AdapterSessionState
AdapterSessionState()
Definition: ExternalMediaAdapterInterface.h:709
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RatingToString
std::string RatingToString(Favorites rating)
Definition: ExternalMediaAdapterInterface.h:887
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType::AD
@ AD
The media is an ad.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::SET_VOLUME
@ SET_VOLUME
Set volume level to a given volume.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::INIT
@ INIT
Initialization.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::albumId
std::string albumId
Definition: ExternalMediaAdapterInterface.h:465
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::DEINIT
@ DEINIT
DeInitialization.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::playerId
std::string playerId
Definition: ExternalMediaAdapterInterface.h:330
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::type
std::string type
Definition: ExternalMediaAdapterInterface.h:423
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::duration
std::chrono::milliseconds duration
Media item duration in milliseconds.
Definition: ExternalMediaAdapterInterface.h:492
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::operator<<
std::ostream & operator<<(std::ostream &stream, const AdapterEvent &event)
Definition: AdapterUtils.h:85
PlayRequestor.h
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Favorites::FAVORITED
@ FAVORITED
Favorite rating.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::ENABLE_REPEAT
@ ENABLE_REPEAT
Enable Loop on.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState
Definition: ExternalMediaAdapterInterface.h:395
RequiresShutdown.h
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::playContextToken
std::string playContextToken
Play context token for specifying what to play.
Definition: ExternalMediaAdapterInterface.h:539
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::trackOffset
std::chrono::milliseconds trackOffset
The offset of the track in milliseconds.
Definition: ExternalMediaAdapterInterface.h:410
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::trackId
std::string trackId
Definition: ExternalMediaAdapterInterface.h:445
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Navigation::FOREGROUND
@ FOREGROUND
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleAdjustSeek
virtual void handleAdjustSeek(std::chrono::milliseconds deltaOffset)=0
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::tokenRefreshInterval
std::chrono::milliseconds tokenRefreshInterval
The validity period of the token in milliseconds.
Definition: ExternalMediaAdapterInterface.h:380
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::ENABLE_SHUFFLE
@ ENABLE_SHUFFLE
Enable shuffle.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::PREVIOUS
@ PREVIOUS
Previous.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::START_OVER
@ START_OVER
Start over a track from the beginning.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::RESUME
@ RESUME
Resume.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Navigation::NONE
@ NONE
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::accessToken
std::string accessToken
Definition: ExternalMediaAdapterInterface.h:377
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeCauseType::PHYSICAL_INTERACTION
@ PHYSICAL_INTERACTION
Change was triggered by a physical interaction.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::shuffleEnabled
bool shuffleEnabled
Bool to identify if shuffling is enabled or not.
Definition: ExternalMediaAdapterInterface.h:413
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::navigationToString
std::string navigationToString(Navigation navigation)
Definition: ExternalMediaAdapterInterface.h:277
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::tinyURL
std::string tinyURL
The URL for tiny cover art image resource} .
Definition: ExternalMediaAdapterInterface.h:468
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::ADJUST_SEEK
@ ADJUST_SEEK
Seek to an offset relative to the current offset.
alexaClientSDK
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::NEXT
@ NEXT
Next.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Favorites::NOT_RATED
@ NOT_RATED
track not rated.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::playerId
std::string playerId
Definition: ExternalMediaAdapterInterface.h:401
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface
Definition: ExternalMediaAdapterInterface.h:520
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Navigation
Navigation
Definition: ExternalMediaAdapterInterface.h:256
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType::SAMPLE
@ SAMPLE
The media is a sample.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::isGuest
bool isGuest
Flag that identifies if the user currently logged in is a guest or not.
Definition: ExternalMediaAdapterInterface.h:347
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeCauseType::PERIODIC_POLL
@ PERIODIC_POLL
Change was triggered by periodic polling.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::albumName
std::string albumName
The display name of the currently playing album.
Definition: ExternalMediaAdapterInterface.h:460
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::launched
bool launched
Flag that identifies if an application has been launched or not.
Definition: ExternalMediaAdapterInterface.h:350
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Navigation::DEFAULT
@ DEFAULT
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::state
std::string state
The players current state.
Definition: ExternalMediaAdapterInterface.h:404
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::ADD_USER
@ ADD_USER
Add User Message.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType::TRACK
@ TRACK
The media is track.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::REWIND
@ REWIND
rewind
alexaClientSDK::avsCommon::utils::MediaType
MediaType
Definition: MediaType.h:29
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType
RequestType
Definition: ExternalMediaAdapterInterface.h:32
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::repeatEnabled
bool repeatEnabled
Bool to identify if looping of songs is enabled or not.
Definition: ExternalMediaAdapterInterface.h:416
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::FAST_FORWARD
@ FAST_FORWARD
Fast-forward.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::DISABLE_SHUFFLE
@ DISABLE_SHUFFLE
Disable shuffle.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::playbackSessionId
std::string playbackSessionId
Playback session id for identifying the session.
Definition: ExternalMediaAdapterInterface.h:547
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::coverId
std::string coverId
Definition: ExternalMediaAdapterInterface.h:481
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::trackName
std::string trackName
The display name for the currently playing trackname of the track.
Definition: ExternalMediaAdapterInterface.h:441
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleSeek
virtual void handleSeek(std::chrono::milliseconds offset)=0
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::MediaType::PODCAST
@ PODCAST
The media is a podcast.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeCauseType::VOICE_INTERACTION
@ VOICE_INTERACTION
The state change was triggered as result of voice interaction.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::DESELECT_UNFAVORITE
@ DESELECT_UNFAVORITE
Unmark a track as not a favorite.(thumbs down false)
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SHUFFLE_STATUS_STRING
std::string SHUFFLE_STATUS_STRING(bool shuffleEnabled)
Definition: ExternalMediaAdapterInterface.h:925
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::playerCookie
std::string playerCookie
The playerCookie to select version-specific content or actions.
Definition: ExternalMediaAdapterInterface.h:362
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::stringToNavigation
Navigation stringToNavigation(const std::string &str)
Definition: ExternalMediaAdapterInterface.h:306
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::SEEK
@ SEEK
Seek to a given offset.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::playbackTarget
std::string playbackTarget
Playback target to play on.
Definition: ExternalMediaAdapterInterface.h:561
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::handleLogin
virtual void handleLogin(const std::string &accessToken, const std::string &userName, bool forceLogin, std::chrono::milliseconds tokenRefreshInterval)=0
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::REPEAT_STATUS_STRING
std::string REPEAT_STATUS_STRING(bool repeatEnabled)
Definition: ExternalMediaAdapterInterface.h:929
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::ENABLE_REPEAT_ONE
@ ENABLE_REPEAT_ONE
Enable repeat of a track .
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::DISABLE_REPEAT_ONE
@ DISABLE_REPEAT_ONE
Disable Repeat of a track.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::GET_INFO
@ GET_INFO
Get Info.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::navigation
Navigation navigation
Navigation for indicating foreground or not.
Definition: ExternalMediaAdapterInterface.h:549
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterState::playbackState
AdapterPlaybackState playbackState
Variable to hold the playback state.
Definition: ExternalMediaAdapterInterface.h:510
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::trackNumber
std::string trackNumber
Definition: ExternalMediaAdapterInterface.h:449
alexaClientSDK::acsdkExternalMediaPlayer::HandlePlayParams
acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams HandlePlayParams
Definition: StaticExternalMediaPlayerAdapterHandler.cpp:23
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::largeURL
std::string largeURL
The URL for large cover art image resource} .
Definition: ExternalMediaAdapterInterface.h:477
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::preload
bool preload
Whether or not to preload first.
Definition: ExternalMediaAdapterInterface.h:551
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::playbackId
std::string playbackId
Definition: ExternalMediaAdapterInterface.h:438
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::LOGIN
@ LOGIN
Login.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::DESELECT_FAVORITE
@ DESELECT_FAVORITE
Unmark a track as favorite.(thumbs up false)
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeCauseType
ChangeCauseType
Definition: ExternalMediaAdapterInterface.h:199
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState
Definition: ExternalMediaAdapterInterface.h:322
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::mediaProvider
std::string mediaProvider
Definition: ExternalMediaAdapterInterface.h:485
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::mediaType
MediaType mediaType
Definition: ExternalMediaAdapterInterface.h:489
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterSessionState::localPlayerId
std::string localPlayerId
Definition: ExternalMediaAdapterInterface.h:334
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::DISABLE_REPEAT
@ DISABLE_REPEAT
Disable loop on.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ChangeCauseType::APP_INTERACTION
@ APP_INTERACTION
Change was triggered by an app interaction.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::ADJUST_VOLUME
@ ADJUST_VOLUME
Adjust volume level relative to the existing volume.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::SET_MUTE
@ SET_MUTE
Set mute to true/false.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterState::sessionState
AdapterSessionState sessionState
Variable to hold the session state.
Definition: ExternalMediaAdapterInterface.h:507
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::HandlePlayParams::HandlePlayParams
HandlePlayParams(const std::string &playContextToken, int64_t index, std::chrono::milliseconds offset, const std::string &skillToken, const std::string &playbackSessionId, Navigation navigation, bool preload, const avsCommon::avs::PlayRequestor &playRequestor, const std::string &playbackTarget)
Definition: ExternalMediaAdapterInterface.h:584
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::getOffset
virtual std::chrono::milliseconds getOffset()=0
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::SEEK
@ SEEK
Seek to a given offset.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::STOP
@ STOP
Stop.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::smallURL
std::string smallURL
The URL for small cover art image resource} .
Definition: ExternalMediaAdapterInterface.h:471
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::ENABLE_REPEAT
@ ENABLE_REPEAT
Enable Loop on.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::Favorites::UNFAVORITED
@ UNFAVORITED
Unfavorite rating.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::AdapterPlaybackState::favorites
Favorites favorites
The favorite status {"FAVORITED"/"UNFAVORITED"/"NOT_RATED"}.
Definition: ExternalMediaAdapterInterface.h:419
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::ExternalMediaAdapterInterface::ExternalMediaAdapterInterface
ExternalMediaAdapterInterface(const std::string &adapterName)
Definition: ExternalMediaAdapterInterface.h:722
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::SupportedPlaybackOperation::FAVORITE
@ FAVORITE
Mark a track as favorite.(thumbs up)
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestType::RESUME
@ RESUME
Resume.
alexaClientSDK::acsdkExternalMediaPlayerInterfaces::RequestTypeToString
std::string RequestTypeToString(RequestType requestType)
Definition: ExternalMediaAdapterInterface.h:732

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