16 #ifndef ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SHAREDAVSSETTINGPROTOCOL_H_ 17 #define ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SHAREDAVSSETTINGPROTOCOL_H_ 61 static std::unique_ptr<SharedAVSSettingProtocol>
create(
63 std::shared_ptr<SettingEventSenderInterface> eventSender,
64 std::shared_ptr<storage::DeviceSettingStorageInterface> settingStorage,
65 std::shared_ptr<avsCommon::sdkInterfaces::AVSConnectionManagerInterface> connectionManager,
66 const std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface>&
metricRecorder,
67 bool isDefaultCloudAuthoritative =
false);
135 std::shared_ptr<SettingEventSenderInterface> eventSender,
136 std::shared_ptr<storage::DeviceSettingStorageInterface> settingStorage,
137 std::shared_ptr<avsCommon::sdkInterfaces::AVSConnectionManagerInterface> connectionManager,
138 const std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface>& metricRecorder,
139 bool isDefaultCloudAuthoritative);
144 void executeSynchronizeOnConnected();
150 const bool m_isDefaultCloudAuthoritative;
153 std::shared_ptr<SettingEventSenderInterface> m_eventSender;
156 std::shared_ptr<storage::DeviceSettingStorageInterface> m_storage;
159 std::shared_ptr<avsCommon::sdkInterfaces::AVSConnectionManagerInterface> m_connectionManager;
162 std::shared_ptr<SettingConnectionObserver> m_connectionObserver;
165 std::unique_ptr<Request> m_pendingRequest;
167 std::shared_ptr<avsCommon::utils::metrics::MetricRecorderInterface> m_metricRecorder;
170 std::mutex m_requestLock;
179 #endif // ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SHAREDAVSSETTINGPROTOCOL_H_ std::function< std::pair< bool, std::string >()> ApplyChangeFunction
Definition: SettingProtocolInterface.h:46
static std::unique_ptr< SharedAVSSettingProtocol > create(const SettingEventMetadata &metadata, std::shared_ptr< SettingEventSenderInterface > eventSender, std::shared_ptr< storage::DeviceSettingStorageInterface > settingStorage, std::shared_ptr< avsCommon::sdkInterfaces::AVSConnectionManagerInterface > connectionManager, const std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > &metricRecorder, bool isDefaultCloudAuthoritative=false)
bool restoreValue(ApplyDbChangeFunction applyChange, SettingNotificationFunction notifyObservers) override
std::function< std::pair< bool, std::string >(const std::string &dbValue)> ApplyDbChangeFunction
Definition: SettingProtocolInterface.h:56
::std::string string
Definition: gtest-port.h:1097
bool avsChange(ApplyChangeFunction applyChange, RevertChangeFunction revertChange, SettingNotificationFunction notifyObservers) override
Single-thread executor implementation.
Definition: Executor.h:45
std::function< void(SettingNotifications notification)> SettingNotificationFunction
Definition: SettingProtocolInterface.h:63
bool clearData() override
static std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > metricRecorder
Metric recorder shared ptr.
Definition: BaseAPLCapabilityAgentTest.cpp:261
void connectionStatusChangeCallback(bool isConnected)
Definition: SharedAVSSettingProtocol.h:45
~SharedAVSSettingProtocol()
std::function< std::string()> RevertChangeFunction
Definition: SettingProtocolInterface.h:70
SetSettingResult
Definition: SetSettingResult.h:23
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: SettingProtocolInterface.h:38
SetSettingResult localChange(ApplyChangeFunction applyChange, RevertChangeFunction revertChange, SettingNotificationFunction notifyObservers) override