AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
ExternalMediaPlayerObserverInterface.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 ACSDKEXTERNALMEDIAPLAYERINTERFACES_EXTERNALMEDIAPLAYEROBSERVERINTERFACE_H_
17 #define ACSDKEXTERNALMEDIAPLAYERINTERFACES_EXTERNALMEDIAPLAYEROBSERVERINTERFACE_H_
18 
20 
22 
23 namespace alexaClientSDK {
24 namespace acsdkExternalMediaPlayerInterfaces {
25 
34 
42 
44  bool loggedIn;
45 
49 };
50 
52 }
53 
55  loggedIn{loggedIn},
57 }
58 
59 inline bool operator==(
60  const ObservableSessionProperties& observableSessionPropertiesA,
61  const ObservableSessionProperties& observableSessionPropertiesB) {
62  return observableSessionPropertiesA.loggedIn == observableSessionPropertiesB.loggedIn &&
63  observableSessionPropertiesA.userName == observableSessionPropertiesB.userName;
64 }
65 
74 
84  const std::string& state,
85  const std::string& trackName,
86  const avsCommon::avs::PlayRequestor& playRequestor);
87 
90 
93 
96 };
97 
99  state{"IDLE"},
100  trackName{""},
101  playRequestor{} {};
102 
104  const std::string& state,
105  const std::string& trackName,
107  state{state},
109  // Parenthesis are used for initializing @c playRequester to work-around a
110  // bug in the C++ specification. see:
111  // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1288
113 
114 inline bool operator==(
115  const ObservablePlaybackStateProperties& observableA,
116  const ObservablePlaybackStateProperties& observableB) {
117  return observableA.state == observableB.state && observableA.trackName == observableB.trackName &&
118  observableA.playRequestor == observableB.playRequestor;
119 }
120 
126 public:
130  virtual ~ExternalMediaPlayerObserverInterface() = default;
131 
139  virtual void onLoginStateProvided(
140  const std::string& playerId,
141  const acsdkExternalMediaPlayerInterfaces::ObservableSessionProperties sessionStateProperties) = 0;
142 
150  virtual void onPlaybackStateProvided(
151  const std::string& playerId,
153 };
154 
155 } // namespace acsdkExternalMediaPlayerInterfaces
156 } // namespace alexaClientSDK
157 
158 #endif // ACSDKEXTERNALMEDIAPLAYERINTERFACES_EXTERNALMEDIAPLAYEROBSERVERINTERFACE_H_
std::string userName
Definition: ExternalMediaPlayerObserverInterface.h:48
Definition: ExternalMediaPlayerObserverInterface.h:29
bool loggedIn
Flag that identifies if a user is currently logged in or not.
Definition: ExternalMediaPlayerObserverInterface.h:44
::std::string string
Definition: gtest-port.h:1097
ObservablePlaybackStateProperties()
Definition: ExternalMediaPlayerObserverInterface.h:98
ObservableSessionProperties()
Definition: ExternalMediaPlayerObserverInterface.h:51
std::string trackName
The display name for the currently playing trackname of the track.
Definition: ExternalMediaPlayerObserverInterface.h:92
bool operator==(const ObservableSessionProperties &observableSessionPropertiesA, const ObservableSessionProperties &observableSessionPropertiesB)
Definition: ExternalMediaPlayerObserverInterface.h:59
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
std::string state
The players current state.
Definition: ExternalMediaPlayerObserverInterface.h:89
Definition: PlayRequestor.h:29
avsCommon::avs::PlayRequestor playRequestor
The playRequestor object.
Definition: ExternalMediaPlayerObserverInterface.h:95

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