15 #ifndef ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SETTINGCALLBACKS_H_ 16 #define ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SETTINGCALLBACKS_H_ 53 template <
typename ManagerT>
79 static std::shared_ptr<SettingCallbacks<ManagerT>>
create(std::shared_ptr<ManagerT> manager);
106 std::shared_ptr<ManagerT> m_manager;
109 std::vector<std::shared_ptr<SettingCallbackAdapterInterface<ManagerT>>> m_callbacks;
112 template <
typename ManagerT>
117 template <
typename ManagerT>
125 template <
typename ManagerT>
130 if (wrapper->addToManager(*m_manager)) {
131 m_callbacks.push_back(wrapper);
138 template <
typename ManagerT>
140 for (
auto& wrapper : m_callbacks) {
141 wrapper->removeFromManager(*m_manager);
146 template <
typename ManagerT>
153 #endif // ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SETTINGCALLBACKS_H_ virtual ~SettingCallbacks()
Definition: SettingCallbacks.h:113
static std::shared_ptr< SettingCallbackAdapter > create(FunctionType callback)
Definition: SettingCallbackAdapter.h:144
bool add(FunctionType< id > callback)
Definition: SettingCallbacks.h:127
Definition: SettingCallbacks.h:54
std::function< void(const ValueType< id > &, SettingNotifications)> FunctionType
Callback function value type.
Definition: SettingCallbacks.h:62
void removeAll()
Definition: SettingCallbacks.h:139
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
typename ManagerT::template ValueType< id > ValueType
Setting value type.
Definition: SettingCallbacks.h:58
static std::shared_ptr< SettingCallbacks< ManagerT > > create(std::shared_ptr< ManagerT > manager)
Definition: SettingCallbacks.h:118
SettingNotifications
Definition: SettingObserverInterface.h:28