AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
LocaleHandler.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_CAPABILITYAGENTS_SYSTEM_INCLUDE_SYSTEM_LOCALEHANDLER_H_
17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_SYSTEM_INCLUDE_SYSTEM_LOCALEHANDLER_H_
18 
19 #include <memory>
20 #include <string>
21 
26 
27 namespace alexaClientSDK {
28 namespace capabilityAgents {
29 namespace system {
30 
35 public:
43  static std::unique_ptr<LocaleHandler> create(
44  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
45  std::shared_ptr<settings::LocalesSetting> localeSetting);
46 
50  void handleDirectiveImmediately(std::shared_ptr<avsCommon::avs::AVSDirective> directive) override;
51  void preHandleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
52  void handleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
53  void cancelDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info) override;
55 
62 
63 private:
69  void executeHandleDirective(std::shared_ptr<CapabilityAgent::DirectiveInfo> info);
70 
77  void sendProcessingDirectiveException(
78  std::shared_ptr<CapabilityAgent::DirectiveInfo> info,
79  const std::string& errorMessage);
80 
86  void handleSetLocale(std::shared_ptr<CapabilityAgent::DirectiveInfo> info);
87 
95  std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
96  std::shared_ptr<settings::LocalesSetting> localeSetting);
97 
99  std::shared_ptr<settings::LocalesSetting> m_localeSetting;
100 
103 };
104 
105 } // namespace system
106 } // namespace capabilityAgents
107 } // namespace alexaClientSDK
108 
109 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_SYSTEM_INCLUDE_SYSTEM_LOCALEHANDLER_H_
Definition: CapabilityAgent.h:47
Definition: SettingEventMetadata.h:27
void preHandleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: LocaleHandler.cpp:104
static settings::SettingEventMetadata getLocaleEventsMetadata()
Definition: LocaleHandler.cpp:86
static std::unique_ptr< LocaleHandler > create(std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionSender, std::shared_ptr< settings::LocalesSetting > localeSetting)
Definition: LocaleHandler.cpp:63
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
Definition: LocaleHandler.cpp:91
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: LocaleHandler.cpp:96
void handleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: LocaleHandler.cpp:108
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
void cancelDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Definition: LocaleHandler.cpp:121

AlexaClientSDK 1.26.0 - Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0