15 #ifndef ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_TYPES_LOCALEWAKEWORDSSETTING_H_ 16 #define ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_TYPES_LOCALEWAKEWORDSSETTING_H_ 67 static std::shared_ptr<LocaleWakeWordsSetting>
create(
68 std::shared_ptr<SettingEventSenderInterface> localeEventSender,
69 std::shared_ptr<SettingEventSenderInterface> wakeWordsEventSender,
70 std::shared_ptr<storage::DeviceSettingStorageInterface> settingStorage,
71 std::shared_ptr<avsCommon::sdkInterfaces::LocaleAssetsManagerInterface> assetsManager);
84 bool clearData(
const WakeWords& WakeWords)
override;
101 struct RequestParameters {
115 const WakeWords wakeWords;
124 const WakeWords& wakeWords);
135 std::shared_ptr<SettingEventSenderInterface> localeEventSender,
136 std::shared_ptr<SettingEventSenderInterface> wakeWordsEventSender,
137 std::shared_ptr<storage::DeviceSettingStorageInterface> settingStorage,
138 std::shared_ptr<avsCommon::sdkInterfaces::LocaleAssetsManagerInterface> assetsManager);
163 void synchronize(
const RequestParameters& request);
170 void synchronizeWakeWords(
const RequestParameters& request);
177 void synchronizeLocale(
const RequestParameters& request);
184 void handleFailure(
const RequestParameters& request);
192 bool storeValues(
const RequestParameters& request);
200 void executeChangeValue(
const RequestParameters& request);
206 void notifyObserversOfCancellationLocked(
const RequestParameters& request);
207 void notifyObserversOfFailure(
const RequestParameters& request);
208 void notifyObserversOfSuccess(
const RequestParameters& request);
209 void notifyObserversOfChangeInProgress(
const RequestParameters& request);
219 inline bool isLatestRequestLocked(
const RequestParameters& request)
const;
225 void restoreInitialValue();
232 void clearPendingRequest(
const RequestParameters& request);
242 std::pair<bool, WakeWords> supportedWakeWords(
const DeviceLocales& locale,
const WakeWords& wakeWords);
245 std::shared_ptr<SettingEventSenderInterface> m_localeEventSender;
248 std::shared_ptr<SettingEventSenderInterface> m_wakeWordsEventSender;
251 std::shared_ptr<storage::DeviceSettingStorageInterface> m_storage;
257 std::unique_ptr<RequestParameters> m_pendingRequest;
266 std::shared_ptr<avsCommon::sdkInterfaces::LocaleAssetsManagerInterface> m_assetsManager;
276 #endif // ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_TYPES_LOCALEWAKEWORDSSETTING_H_ ChangedReason
Definition: ConnectionStatusObserverInterface.h:50
static std::shared_ptr< LocaleWakeWordsSetting > create(std::shared_ptr< SettingEventSenderInterface > localeEventSender, std::shared_ptr< SettingEventSenderInterface > wakeWordsEventSender, std::shared_ptr< storage::DeviceSettingStorageInterface > settingStorage, std::shared_ptr< avsCommon::sdkInterfaces::LocaleAssetsManagerInterface > assetsManager)
Definition: LocaleWakeWordsSetting.h:40
std::set< WakeWord > WakeWords
Alias for a set of wake words type.
Definition: DeviceSettingsManager.h:43
Definition: SettingInterface.h:45
Single-thread executor implementation.
Definition: Executor.h:45
Definition: ConnectionStatusObserverInterface.h:31
~LocaleWakeWordsSetting()
SettingStatus
Definition: SettingStatus.h:25
SetSettingResult setLocalChange(const DeviceLocales &locale) override
RequestType
Type of request.
Definition: LocaleWakeWordsSetting.h:49
void onConnectionStatusChanged(const Status status, const ChangedReason reason) override
SetSettingResult
Definition: SetSettingResult.h:23
unsigned int RequestId
Alias for request id.
Definition: LocaleWakeWordsSetting.h:46
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
bool setAvsChange(const DeviceLocales &locale) override
bool clearData(const DeviceLocales &locale) override
std::vector< Locale > DeviceLocales
Alias for locales enabled in the device.
Definition: DeviceSettingsManager.h:37
Status
Definition: ConnectionStatusObserverInterface.h:36