AlexaClientSDK  3.0.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 
95  const SpeakerInterface::SpeakerSettings& speakerSettings,
96  const NotificationProperties& properties){};
97 
108  virtual std::future<bool> adjustVolume(
110  int8_t delta,
111  const NotificationProperties& properties) = 0;
112 
123  virtual std::future<bool> setMute(
125  bool mute,
126  const NotificationProperties& properties) = 0;
127 
142  virtual std::future<bool> setVolume(
144  int8_t volume,
145  bool forceNoNotifications = false,
147 
162  virtual std::future<bool> adjustVolume(
164  int8_t delta,
165  bool forceNoNotifications = false,
167 
182  virtual std::future<bool> setMute(
184  bool mute,
185  bool forceNoNotifications = false,
187 
188 #ifdef ENABLE_MAXVOLUME_SETTING
189 
199  virtual std::future<bool> setMaximumVolumeLimit(const int8_t maximumVolumeLimit) = 0;
200 #endif // ENABLE_MAXVOLUME_SETTING
201 
211  virtual std::future<bool> getSpeakerSettings(
213  SpeakerInterface::SpeakerSettings* settings) = 0;
214 
222  virtual void addSpeakerManagerObserver(std::shared_ptr<SpeakerManagerObserverInterface> observer) = 0;
223 
231  virtual void removeSpeakerManagerObserver(std::shared_ptr<SpeakerManagerObserverInterface> observer) = 0;
232 
243  virtual void addChannelVolumeInterface(std::shared_ptr<ChannelVolumeInterface> channelVolumeInterface) = 0;
244 
248  virtual ~SpeakerManagerInterface() = default;
249 };
250 
251 } // namespace sdkInterfaces
252 } // namespace avsCommon
253 } // namespace alexaClientSDK
254 
255 #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 void onExternalSpeakerSettingsUpdate(ChannelVolumeInterface::Type type, const SpeakerInterface::SpeakerSettings &speakerSettings, const NotificationProperties &properties)
Definition: SpeakerManagerInterface.h:93
type
Definition: upload.py:443
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 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0