![]()  | 
  
    AlexaClientSDK
    3.0.0
    
   A cross-platform, modular SDK for interacting with the Alexa Voice Service 
   | 
 
#include <SettingCallbackAdapter.h>


Public Types | |
| using | ValueType = typename ManagerT::template ValueType< id > | 
| Setting value type.  More... | |
| using | FunctionType = std::function< void(const ValueType &, SettingNotifications)> | 
| Callback function value type.  More... | |
Public Member Functions | |
| virtual | ~SettingCallbackAdapter ()=default | 
Functions from @c SettingCallbackAdapterInterface  | |
| bool | addToManager (ManagerT &manager) override | 
| void | removeFromManager (ManagerT &manager) override | 
  Public Member Functions inherited from alexaClientSDK::settings::SettingCallbackAdapterInterface< ManagerT > | |
| virtual | ~SettingCallbackAdapterInterface ()=default | 
Static Public Member Functions | |
| static std::shared_ptr< SettingCallbackAdapter > | create (FunctionType callback) | 
A SettingCallbackAdapter can be used to register callback functions called when there is a setting notification.
This is an example of how to use this adapter.
| ManagerT | The setting manager type that this callback will be added to. | 
| id | The id of the setting inside the manager. | 
| using alexaClientSDK::settings::SettingCallbackAdapter< ManagerT, id >::FunctionType = std::function<void(const ValueType&, SettingNotifications)> | 
Callback function value type.
| using alexaClientSDK::settings::SettingCallbackAdapter< ManagerT, id >::ValueType = typename ManagerT::template ValueType<id> | 
Setting value type.
      
  | 
  virtualdefault | 
The virtual destructor.
      
  | 
  overridevirtual | 
Add callback to the given manager.
| manager | Manager that has the setting to be observed. | 
true if it succeeds;  otherwise. The template keyword is required because addObserver definition depends on ManagerT.
Implements alexaClientSDK::settings::SettingCallbackAdapterInterface< ManagerT >.
      
  | 
  static | 
Creates a SettingCallbackAdapter object.
| callback | The function callback that should be called upon notification. | 
      
  | 
  overridevirtual | 
Remove callback from the given manager.
| manager | Manager that has the setting that was being observed. | 
The template keyword is required because removeObserver definition depends on ManagerT.
Implements alexaClientSDK::settings::SettingCallbackAdapterInterface< ManagerT >.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0