16 #ifndef ALEXA_CLIENT_SDK_CAPABILITYAGENTS_TOGGLECONTROLLER_INCLUDE_TOGGLECONTROLLER_TOGGLECONTROLLERCAPABILITYAGENT_H_ 17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_TOGGLECONTROLLER_INCLUDE_TOGGLECONTROLLER_TOGGLECONTROLLERCAPABILITYAGENT_H_ 32 namespace capabilityAgents {
33 namespace toggleController {
45 ,
public std::enable_shared_from_this<ToggleControllerCapabilityAgent> {
69 static std::shared_ptr<ToggleControllerCapabilityAgent>
create(
73 std::shared_ptr<avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface> toggleController,
74 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
75 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> responseSender,
76 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
77 bool isProactivelyReported,
79 bool isNonControllable =
false);
134 std::shared_ptr<avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface> toggleController,
135 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
136 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> responseSender,
137 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
138 bool isProactivelyReported,
140 bool isNonControllable =
false);
144 void doShutdown()
override;
159 void removeDirective(std::shared_ptr<DirectiveInfo> info);
166 void executeSetHandlingCompleted(std::shared_ptr<DirectiveInfo> info);
182 void executeProvideState(
193 void executeSendResponseEvent(
194 const std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
195 std::pair<avsCommon::avs::AlexaResponseType, std::string> result);
211 bool m_isProactivelyReported;
214 bool m_isRetrievable;
217 bool m_isNonControllable;
223 std::shared_ptr<avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface> m_toggleController;
226 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
229 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> m_responseSender;
239 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_TOGGLECONTROLLER_INCLUDE_TOGGLECONTROLLER_TOGGLECONTROLLERCAPABILITYAGENT_H_ Definition: CapabilityAgent.h:47
bool hasReportableStateProperties() override
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: CapabilityTag.h:32
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
::std::string string
Definition: gtest-port.h:1097
void cancelDirective(std::shared_ptr< DirectiveInfo > info) override
Single-thread executor implementation.
Definition: Executor.h:45
unsigned int ContextRequestToken
Alias for the token used to identify a context request.
Definition: ContextRequestToken.h:23
Definition: RequiresShutdown.h:32
ExceptionErrorType
Definition: ExceptionErrorType.h:28
static std::shared_ptr< ToggleControllerCapabilityAgent > create(const EndpointIdentifier &endpointId, const std::string &instance, const avsCommon::sdkInterfaces::toggleController::ToggleControllerAttributes &toggleControllerAttributes, std::shared_ptr< avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface > toggleController, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface > responseSender, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionSender, bool isProactivelyReported, bool isRetrievable, bool isNonControllable=false)
void handleDirective(std::shared_ptr< DirectiveInfo > info) override
avsCommon::sdkInterfaces::endpoints::EndpointIdentifier EndpointIdentifier
Alias to improve readability.
Definition: ToggleControllerCapabilityAgent.h:48
avsCommon::avs::CapabilityConfiguration getCapabilityConfiguration()
AlexaStateChangeCauseType
Definition: AlexaStateChangeCauseType.h:28
avsCommon::sdkInterfaces::toggleController::ToggleControllerObserverInterface::ToggleState ToggleState
Alias to improve readability.
Definition: ToggleControllerInterface.h:41
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
Definition: ToggleControllerCapabilityAgent.h:41
Definition: CapabilityState.h:31
void onToggleStateChanged(const ToggleState &toggleState, avsCommon::sdkInterfaces::AlexaStateChangeCauseType cause) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
Definition: ToggleControllerAttributes.h:34
type
Definition: upload.py:443
Definition: ToggleControllerObserverInterface.h:36
bool canStateBeRetrieved() override
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
Definition: CapabilityConfiguration.h:42
Definition: ToggleControllerObserverInterface.h:31
void preHandleDirective(std::shared_ptr< DirectiveInfo > info) override
void provideState(const avsCommon::avs::CapabilityTag &stateProviderName, const avsCommon::sdkInterfaces::ContextRequestToken contextRequestToken) override