AlexaClientSDK  1.23.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
PlaybackRouterInterface.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_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_PLAYBACKROUTERINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_PLAYBACKROUTERINTERFACE_H_
18 
19 #include <memory>
20 #include <iostream>
21 
24 
25 namespace alexaClientSDK {
26 namespace avsCommon {
27 namespace sdkInterfaces {
28 
34 public:
38  virtual ~PlaybackRouterInterface() = default;
39 
47  virtual void buttonPressed(avsCommon::avs::PlaybackButton button) = 0;
48 
56  virtual void togglePressed(avsCommon::avs::PlaybackToggle toggle, bool action) = 0;
57 
65  virtual void setHandler(
66  std::shared_ptr<PlaybackHandlerInterface> handler,
67  std::shared_ptr<LocalPlaybackHandlerInterface> localHandler = nullptr) = 0;
68 
72  virtual void switchToDefaultHandler() = 0;
73 
78  virtual void useDefaultHandlerWith(std::shared_ptr<LocalPlaybackHandlerInterface> localHandler){};
79 
88  return false;
89  };
90 
98  virtual bool localSeekTo(std::chrono::milliseconds location, bool fromStart) {
99  return false;
100  };
101 };
102 
103 } // namespace sdkInterfaces
104 } // namespace avsCommon
105 } // namespace alexaClientSDK
106 
107 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_PLAYBACKROUTERINTERFACE_H_
virtual void setHandler(std::shared_ptr< PlaybackHandlerInterface > handler, std::shared_ptr< LocalPlaybackHandlerInterface > localHandler=nullptr)=0
PlaybackButton
Enumeration class for supported playback buttons.
Definition: PlaybackButtons.h:26
virtual void buttonPressed(avsCommon::avs::PlaybackButton button)=0
virtual void togglePressed(avsCommon::avs::PlaybackToggle toggle, bool action)=0
PlaybackOperation
Available local operations.
Definition: LocalPlaybackHandlerInterface.h:38
virtual bool localSeekTo(std::chrono::milliseconds location, bool fromStart)
Definition: PlaybackRouterInterface.h:98
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual bool localOperation(LocalPlaybackHandlerInterface::PlaybackOperation op)
Definition: PlaybackRouterInterface.h:87
virtual void useDefaultHandlerWith(std::shared_ptr< LocalPlaybackHandlerInterface > localHandler)
Definition: PlaybackRouterInterface.h:78
PlaybackToggle
Definition: PlaybackButtons.h:46

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