16 #ifndef ALEXA_CLIENT_SDK_ACSDKEXTERNALMEDIAPLAYER_INCLUDE_ACSDKEXTERNALMEDIAPLAYER_EXTERNALMEDIAADAPTERHANDLER_H_ 17 #define ALEXA_CLIENT_SDK_ACSDKEXTERNALMEDIAPLAYER_INCLUDE_ACSDKEXTERNALMEDIAPLAYER_EXTERNALMEDIAADAPTERHANDLER_H_ 24 #include <unordered_map> 31 #include <rapidjson/document.h> 37 namespace acsdkExternalMediaPlayer {
61 ,
public std::enable_shared_from_this<ExternalMediaAdapterHandler> {
75 bool initializeAdapterHandler(
76 std::shared_ptr<alexaClientSDK::avsCommon::sdkInterfaces::SpeakerManagerInterface> speakerManager);
97 bool includePlaybackSessionId =
false,
98 std::function<
void(rapidjson::Value::Object&, rapidjson::Value::AllocatorType&)> createPayload =
99 [](rapidjson::Value::Object& v, rapidjson::Value::AllocatorType& a) {});
105 void reportDiscoveredPlayers(
106 const std::vector<acsdkExternalMediaPlayerInterfaces::DiscoveredPlayerInfo>& discoveredPlayers);
113 bool removeDiscoveredPlayer(
const std::string& localPlayerId);
134 virtual bool handleLogin(
139 std::chrono::milliseconds tokenRefreshInterval) = 0;
146 virtual bool handleLogout(
const std::string& localPlayerId) = 0;
163 virtual bool handlePlayControl(
175 virtual bool handleSeek(
const std::string& localPlayerId, std::chrono::milliseconds offset) = 0;
183 virtual bool handleAdjustSeek(
const std::string& localPlayerId, std::chrono::milliseconds deltaOffset) = 0;
192 virtual bool handleGetAdapterState(
201 virtual std::chrono::milliseconds handleGetOffset(
const std::string& localPlayerId);
207 virtual void handleSetVolume(int8_t volume) = 0;
213 virtual void handleSetMute(
bool mute) = 0;
217 virtual void doShutdown()
override;
225 std::vector<acsdkExternalMediaPlayerInterfaces::PlayerInfo> updatePlayerInfo(
226 const std::vector<acsdkExternalMediaPlayerInterfaces::PlayerInfo>& playerList)
override;
232 std::chrono::milliseconds tokenRefreshInterval)
override;
233 bool logout(
const std::string& localPlayerId)
override;
239 bool seek(
const std::string& localPlayerId, std::chrono::milliseconds offset)
override;
240 bool adjustSeek(
const std::string& localPlayerId, std::chrono::milliseconds deltaOffset)
override;
242 std::vector<acsdkExternalMediaPlayerInterfaces::AdapterState> getAdapterStates()
override;
243 std::chrono::milliseconds getOffset(
const std::string& localPlayerId)
override;
244 void setExternalMediaPlayer(
const std::shared_ptr<acsdkExternalMediaPlayerInterfaces::ExternalMediaPlayerInterface>
245 externalMediaPlayer)
override;
250 void onSpeakerSettingsChanged(
258 std::unordered_map<std::string, acsdkExternalMediaPlayerInterfaces::PlayerInfo> m_playerInfoMap;
273 std::condition_variable m_attemptedSetFocusPlayerInFocusCondition;
279 #endif // ALEXA_CLIENT_SDK_ACSDKEXTERNALMEDIAPLAYER_INCLUDE_ACSDKEXTERNALMEDIAPLAYER_EXTERNALMEDIAADAPTERHANDLER_H_
::std::string string
Definition: gtest-port.h:1097
Single-thread executor implementation.
Definition: Executor.h:45
Type
Definition: ChannelVolumeInterface.h:37
Definition: SpeakerManagerObserverInterface.h:32
Definition: SpeakerInterface.h:42
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
type
Definition: upload.py:443
Source
Indicates whether the source of the call is from an AVS Directive or through a Local API call...
Definition: SpeakerManagerObserverInterface.h:35