16 #ifndef ALEXA_CLIENT_SDK_CAPABILITYAGENTS_POWERCONTROLLER_INCLUDE_POWERCONTROLLER_POWERCONTROLLERCAPABILITYAGENT_H_ 17 #define ALEXA_CLIENT_SDK_CAPABILITYAGENTS_POWERCONTROLLER_INCLUDE_POWERCONTROLLER_POWERCONTROLLERCAPABILITYAGENT_H_ 31 namespace capabilityAgents {
32 namespace powerController {
44 ,
public std::enable_shared_from_this<PowerControllerCapabilityAgent> {
64 static std::shared_ptr<PowerControllerCapabilityAgent>
create(
66 std::shared_ptr<avsCommon::sdkInterfaces::powerController::PowerControllerInterface> powerController,
67 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
68 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> responseSender,
69 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
70 bool isProactivelyReported,
120 std::shared_ptr<avsCommon::sdkInterfaces::powerController::PowerControllerInterface> powerController,
121 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
122 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> responseSender,
123 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
124 bool isProactivelyReported,
129 void doShutdown()
override;
142 void removeDirective(std::shared_ptr<DirectiveInfo> info);
149 void executeSetHandlingCompleted(std::shared_ptr<DirectiveInfo> info);
165 void executeProvideState(
176 void executeSendResponseEvent(
177 const std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
178 const std::pair<avsCommon::avs::AlexaResponseType, std::string> result);
191 bool m_isProactivelyReported;
194 bool m_isRetrievable;
197 std::shared_ptr<avsCommon::sdkInterfaces::powerController::PowerControllerInterface> m_powerController;
200 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
203 std::shared_ptr<avsCommon::sdkInterfaces::AlexaInterfaceMessageSenderInterface> m_responseSender;
213 #endif // ALEXA_CLIENT_SDK_CAPABILITYAGENTS_POWERCONTROLLER_INCLUDE_POWERCONTROLLER_POWERCONTROLLERCAPABILITYAGENT_H_ Definition: CapabilityAgent.h:47
void cancelDirective(std::shared_ptr< DirectiveInfo > info) override
Definition: CapabilityTag.h:32
static std::shared_ptr< PowerControllerCapabilityAgent > create(const EndpointIdentifier &endpointId, std::shared_ptr< avsCommon::sdkInterfaces::powerController::PowerControllerInterface > powerController, 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)
Single-thread executor implementation.
Definition: Executor.h:45
void provideState(const avsCommon::avs::CapabilityTag &stateProviderName, const avsCommon::sdkInterfaces::ContextRequestToken contextRequestToken) override
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
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
Definition: PowerControllerCapabilityAgent.h:40
AlexaStateChangeCauseType
Definition: AlexaStateChangeCauseType.h:28
bool hasReportableStateProperties() override
avsCommon::sdkInterfaces::endpoints::EndpointIdentifier EndpointIdentifier
Alias to improve readability.
Definition: PowerControllerCapabilityAgent.h:47
void handleDirective(std::shared_ptr< DirectiveInfo > info) override
Definition: PowerControllerObserverInterface.h:38
void onPowerStateChanged(const PowerState &powerState, avsCommon::sdkInterfaces::AlexaStateChangeCauseType cause) override
avsCommon::sdkInterfaces::powerController::PowerControllerObserverInterface::PowerState PowerState
Definition: PowerControllerInterface.h:39
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
Definition: CapabilityState.h:31
void preHandleDirective(std::shared_ptr< DirectiveInfo > info) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
type
Definition: upload.py:443
avsCommon::avs::CapabilityConfiguration getCapabilityConfiguration()
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
Definition: CapabilityConfiguration.h:42
bool canStateBeRetrieved() override
Definition: PowerControllerObserverInterface.h:33