16 #ifndef ACSDKEQUALIZER_EQUALIZERCAPABILITYAGENT_H_ 17 #define ACSDKEQUALIZER_EQUALIZERCAPABILITYAGENT_H_ 22 #include <rapidjson/document.h> 43 namespace acsdkEqualizer {
49 :
public std::enable_shared_from_this<EqualizerCapabilityAgent>
73 static std::shared_ptr<EqualizerCapabilityAgent>
create(
74 std::shared_ptr<acsdkEqualizer::EqualizerController> equalizerController,
75 std::shared_ptr<avsCommon::sdkInterfaces::CapabilitiesDelegateInterface> capabilitiesDelegate,
76 std::shared_ptr<acsdkEqualizerInterfaces::EqualizerStorageInterface> equalizerStorage,
77 std::shared_ptr<registrationManager::CustomerDataManagerInterface> customerDataManager,
78 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionEncounteredSender,
79 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
80 std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender);
86 void preHandleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info)
override;
87 void handleDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info)
override;
88 void cancelDirective(std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info)
override;
129 std::shared_ptr<acsdkEqualizer::EqualizerController> equalizerController,
130 std::shared_ptr<avsCommon::sdkInterfaces::CapabilitiesDelegateInterface> capabilitiesDelegate,
131 std::shared_ptr<acsdkEqualizerInterfaces::EqualizerStorageInterface> equalizerStorage,
132 std::shared_ptr<registrationManager::CustomerDataManagerInterface> customerDataManager,
133 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionEncounteredSender,
134 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
135 std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> messageSender);
140 void generateCapabilityConfiguration();
150 void fixConfigurationDesynchronization();
160 bool handleSetBandsDirective(
161 std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
162 rapidjson::Document& document);
172 bool handleAdjustBandsDirective(
173 std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
174 rapidjson::Document& document);
184 bool handleResetBandsDirective(
185 std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
186 rapidjson::Document& document);
196 bool handleSetModeDirective(
197 std::shared_ptr<avsCommon::avs::CapabilityAgent::DirectiveInfo> info,
198 rapidjson::Document& document);
201 std::shared_ptr<acsdkEqualizer::EqualizerController> m_equalizerController;
204 std::shared_ptr<avsCommon::sdkInterfaces::CapabilitiesDelegateInterface> m_capabilitiesDelegate;
207 std::shared_ptr<acsdkEqualizerInterfaces::EqualizerStorageInterface> m_equalizerStorage;
210 std::unordered_set<std::shared_ptr<avsCommon::avs::CapabilityConfiguration>> m_capabilityConfigurations;
213 std::shared_ptr<avsCommon::sdkInterfaces::MessageSenderInterface> m_messageSender;
216 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
222 std::mutex m_storageMutex;
228 #endif // ACSDKEQUALIZER_EQUALIZERCAPABILITYAGENT_H_ Definition: EqualizerCapabilityAgent.h:48
Definition: CapabilityAgent.h:47
void onEqualizerStateChanged(const acsdkEqualizerInterfaces::EqualizerState &state) override
void handleDirectiveImmediately(std::shared_ptr< avsCommon::avs::AVSDirective > directive) override
Definition: CapabilityConfigurationInterface.h:32
void handleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
static std::shared_ptr< EqualizerCapabilityAgent > create(std::shared_ptr< acsdkEqualizer::EqualizerController > equalizerController, std::shared_ptr< avsCommon::sdkInterfaces::CapabilitiesDelegateInterface > capabilitiesDelegate, std::shared_ptr< acsdkEqualizerInterfaces::EqualizerStorageInterface > equalizerStorage, std::shared_ptr< registrationManager::CustomerDataManagerInterface > customerDataManager, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionEncounteredSender, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::MessageSenderInterface > messageSender)
void preHandleDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Single-thread executor implementation.
Definition: Executor.h:45
Definition: RequiresShutdown.h:32
void onEqualizerSameStateChanged(const acsdkEqualizerInterfaces::EqualizerState &state) override
Definition: EqualizerControllerListenerInterface.h:27
void clearData() override
std::unordered_map< directiveRoutingRule::DirectiveRoutingRule, BlockingPolicy > DirectiveHandlerConfiguration
Definition: DirectiveHandlerConfiguration.h:32
~EqualizerCapabilityAgent() override=default
std::unordered_set< std::shared_ptr< avsCommon::avs::CapabilityConfiguration > > getCapabilityConfigurations() override
Definition: EqualizerTypes.h:82
void cancelDirective(std::shared_ptr< avsCommon::avs::CapabilityAgent::DirectiveInfo > info) override
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
avsCommon::avs::DirectiveHandlerConfiguration getConfiguration() const override
void doShutdown() override
Definition: CustomerDataHandler.h:34