AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
SpeakerManagerInterface.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_SPEAKERMANAGERINTERFACE_H_
17 #define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_SPEAKERMANAGERINTERFACE_H_
18 
19 #include <future>
20 #include <memory>
21 
24 
25 namespace alexaClientSDK {
26 namespace avsCommon {
27 namespace sdkInterfaces {
28 
34 public:
49  bool notifyAVS = true,
50  bool notifyObservers = true) :
53  source{source} {
54  }
55 
56  // Setting this to true will ensure AVS to be notified of the change.
57  bool notifyAVS;
58  // Setting this to true will ensure observers to be notified of the change.
60  // Whether the call is a result from an AVS directive or local interaction.
62  };
63 
74  virtual std::future<bool> setVolume(
76  int8_t volume,
77  const NotificationProperties& properties) = 0;
78 
89  virtual std::future<bool> adjustVolume(
91  int8_t delta,
92  const NotificationProperties& properties) = 0;
93 
104  virtual std::future<bool> setMute(
106  bool mute,
107  const NotificationProperties& properties) = 0;
108 
123  virtual std::future<bool> setVolume(
125  int8_t volume,
126  bool forceNoNotifications = false,
128 
143  virtual std::future<bool> adjustVolume(
145  int8_t delta,
146  bool forceNoNotifications = false,
148 
163  virtual std::future<bool> setMute(
165  bool mute,
166  bool forceNoNotifications = false,
168 
169 #ifdef ENABLE_MAXVOLUME_SETTING
170 
180  virtual std::future<bool> setMaximumVolumeLimit(const int8_t maximumVolumeLimit) = 0;
181 #endif // ENABLE_MAXVOLUME_SETTING
182 
192  virtual std::future<bool> getSpeakerSettings(
194  SpeakerInterface::SpeakerSettings* settings) = 0;
195 
203  virtual void addSpeakerManagerObserver(std::shared_ptr<SpeakerManagerObserverInterface> observer) = 0;
204 
212  virtual void removeSpeakerManagerObserver(std::shared_ptr<SpeakerManagerObserverInterface> observer) = 0;
213 
224  virtual void addChannelVolumeInterface(std::shared_ptr<ChannelVolumeInterface> channelVolumeInterface) = 0;
225 
229  virtual ~SpeakerManagerInterface() = default;
230 };
231 
232 } // namespace sdkInterfaces
233 } // namespace avsCommon
234 } // namespace alexaClientSDK
235 
236 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_SPEAKERMANAGERINTERFACE_H_
virtual std::future< bool > setVolume(ChannelVolumeInterface::Type type, int8_t volume, const NotificationProperties &properties)=0
virtual void removeSpeakerManagerObserver(std::shared_ptr< SpeakerManagerObserverInterface > observer)=0
SpeakerManagerObserverInterface::Source source
Definition: SpeakerManagerInterface.h:61
virtual void addChannelVolumeInterface(std::shared_ptr< ChannelVolumeInterface > channelVolumeInterface)=0
NotificationProperties(SpeakerManagerObserverInterface::Source source=SpeakerManagerObserverInterface::Source::LOCAL_API, bool notifyAVS=true, bool notifyObservers=true)
Definition: SpeakerManagerInterface.h:47
virtual std::future< bool > adjustVolume(ChannelVolumeInterface::Type type, int8_t delta, const NotificationProperties &properties)=0
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual std::future< bool > getSpeakerSettings(ChannelVolumeInterface::Type type, SpeakerInterface::SpeakerSettings *settings)=0
Source
Indicates whether the source of the call is from an AVS Directive or through a Local API call...
Definition: SpeakerManagerObserverInterface.h:35
virtual void addSpeakerManagerObserver(std::shared_ptr< SpeakerManagerObserverInterface > observer)=0
virtual std::future< bool > setMute(ChannelVolumeInterface::Type type, bool mute, const NotificationProperties &properties)=0

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