16 #ifndef ALEXA_CLIENT_SDK_CAPABILITYAGENTS_PLAYBACKCONTROLLER_INCLUDE_PLAYBACKCONTROLLER_PLAYBACKROUTER_H_ 17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_PLAYBACKCONTROLLER_INCLUDE_PLAYBACKCONTROLLER_PLAYBACKROUTER_H_ 25 namespace capabilityAgents {
26 namespace playbackController {
31 ,
public std::enable_shared_from_this<PlaybackRouter> {
41 std::shared_ptr<avsCommon::sdkInterfaces::PlaybackHandlerInterface> defaultHandler,
42 std::shared_ptr<acsdkShutdownManagerInterfaces::ShutdownNotifierInterface> shutdownNotifier);
51 static std::shared_ptr<PlaybackRouter>
create(
52 std::shared_ptr<avsCommon::sdkInterfaces::PlaybackHandlerInterface> defaultHandler);
65 std::shared_ptr<avsCommon::sdkInterfaces::PlaybackHandlerInterface> handler,
66 std::shared_ptr<avsCommon::sdkInterfaces::LocalPlaybackHandlerInterface> localHandler =
nullptr)
override;
68 std::shared_ptr<avsCommon::sdkInterfaces::LocalPlaybackHandlerInterface> localHandler)
override;
70 virtual bool localSeekTo(std::chrono::milliseconds location,
bool fromStart)
override;
77 PlaybackRouter(std::shared_ptr<avsCommon::sdkInterfaces::PlaybackHandlerInterface> defaultHandler);
81 void doShutdown()
override;
85 std::shared_ptr<avsCommon::sdkInterfaces::PlaybackHandlerInterface> m_handler;
88 std::shared_ptr<avsCommon::sdkInterfaces::LocalPlaybackHandlerInterface> m_localHandler;
91 std::shared_ptr<avsCommon::sdkInterfaces::PlaybackHandlerInterface> m_defaultHandler;
94 std::mutex m_handlerMutex;
101 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_PLAYBACKCONTROLLER_INCLUDE_PLAYBACKCONTROLLER_PLAYBACKROUTER_H_ virtual bool localSeekTo(std::chrono::milliseconds location, bool fromStart) override
virtual void buttonPressed(avsCommon::avs::PlaybackButton button) override
virtual void togglePressed(avsCommon::avs::PlaybackToggle toggle, bool action) override
virtual void useDefaultHandlerWith(std::shared_ptr< avsCommon::sdkInterfaces::LocalPlaybackHandlerInterface > localHandler) override
static std::shared_ptr< PlaybackRouter > create(std::shared_ptr< avsCommon::sdkInterfaces::PlaybackHandlerInterface > defaultHandler)
Definition: RequiresShutdown.h:32
PlaybackButton
Enumeration class for supported playback buttons.
Definition: PlaybackButtons.h:26
PlaybackOperation
Definition: LocalPlaybackHandlerInterface.h:40
virtual void switchToDefaultHandler() override
static std::shared_ptr< PlaybackRouterInterface > createPlaybackRouterInterface(std::shared_ptr< avsCommon::sdkInterfaces::PlaybackHandlerInterface > defaultHandler, std::shared_ptr< acsdkShutdownManagerInterfaces::ShutdownNotifierInterface > shutdownNotifier)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: PlaybackRouterInterface.h:33
virtual void setHandler(std::shared_ptr< avsCommon::sdkInterfaces::PlaybackHandlerInterface > handler, std::shared_ptr< avsCommon::sdkInterfaces::LocalPlaybackHandlerInterface > localHandler=nullptr) override
virtual ~PlaybackRouter()=default
Definition: PlaybackRouter.h:28
PlaybackToggle
Definition: PlaybackButtons.h:46
virtual bool localOperation(avsCommon::sdkInterfaces::LocalPlaybackHandlerInterface::PlaybackOperation op) override
action
Definition: upload.py:393