16 #ifndef ALEXA_CLIENT_SDK_ENDPOINTS_INCLUDE_ENDPOINTS_ENDPOINTBUILDER_H_ 17 #define ALEXA_CLIENT_SDK_ENDPOINTS_INCLUDE_ENDPOINTS_ENDPOINTBUILDER_H_ 71 static std::unique_ptr<EndpointBuilder>
create(
72 const std::shared_ptr<avsCommon::utils::DeviceInfo>& deviceInfo,
73 const std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface>& contextManager,
74 const std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface>& exceptionSender,
75 const std::shared_ptr<capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface>&
88 static std::unique_ptr<EndpointBuilder>
create(
90 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
91 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
92 std::shared_ptr<capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface> alexaMessageSender);
118 std::shared_ptr<avsCommon::sdkInterfaces::powerController::PowerControllerInterface> powerController,
119 bool isProactivelyReported,
120 bool isRetrievable)
override;
122 std::shared_ptr<avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface> toggleController,
125 bool isProactivelyReported,
127 bool isNonControllable =
false)
override;
129 const std::shared_ptr<avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesBuilderInterface>&
130 endpointCapabilitiesBuilder)
override;
132 std::shared_ptr<avsCommon::sdkInterfaces::modeController::ModeControllerInterface> modeController,
135 bool isProactivelyReported,
137 bool isNonControllable =
false)
override;
139 std::shared_ptr<avsCommon::sdkInterfaces::rangeController::RangeControllerInterface> rangeController,
142 bool isProactivelyReported,
144 bool isNonControllable =
false)
override;
147 std::shared_ptr<DirectiveHandlerInterface> directiveHandler)
override;
149 const std::shared_ptr<avsCommon::sdkInterfaces::CapabilityConfigurationInterface>& configurationInterface,
150 std::shared_ptr<DirectiveHandlerInterface> directiveHandler)
override;
152 const std::shared_ptr<avsCommon::sdkInterfaces::CapabilityConfigurationInterface>& configurationInterface)
154 std::unique_ptr<EndpointInterface>
build()
override;
170 using CapabilityBuilder =
171 std::function<std::pair<CapabilityConfiguration, std::shared_ptr<DirectiveHandlerInterface>>()>;
182 std::shared_ptr<avsCommon::utils::DeviceInfo> deviceInfo,
183 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> contextManager,
184 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> exceptionSender,
185 std::shared_ptr<capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface> alexaMessageSender);
190 void configureDefaultEndpoint();
197 std::unique_ptr<EndpointInterface> buildImplementation();
200 bool m_isConfigurationFinalized;
206 bool m_invalidConfiguration;
210 bool m_isDefaultEndpoint;
213 std::shared_ptr<avsCommon::utils::DeviceInfo> m_deviceInfo;
219 std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface> m_contextManager;
222 std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface> m_exceptionSender;
225 std::shared_ptr<capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface> m_alexaMessageSender;
228 std::list<CapabilityBuilder> m_capabilitiesBuilders;
231 std::list<CapabilityConfiguration> m_capabilityConfigurations;
234 std::list<std::shared_ptr<DirectiveHandlerInterface>> m_directiveHandlers;
237 std::list<std::shared_ptr<avsCommon::utils::RequiresShutdown>> m_requireShutdownObjects;
243 #endif // ALEXA_CLIENT_SDK_ENDPOINTS_INCLUDE_ENDPOINTS_ENDPOINTBUILDER_H_ Definition: DeviceInfo.h:31
Definition: ModeControllerAttributes.h:39
EndpointBuilder & withDescription(const std::string &description) override
EndpointBuilder & withEndpointId(const EndpointIdentifier &endpointId) override
EndpointBuilder & withRangeController(std::shared_ptr< avsCommon::sdkInterfaces::rangeController::RangeControllerInterface > rangeController, const std::string &instance, const avsCommon::sdkInterfaces::rangeController::RangeControllerAttributes &rangeControllerAttributes, bool isProactivelyReported, bool isRetrievable, bool isNonControllable=false) override
EndpointBuilder & withFriendlyName(const std::string &friendlyName) override
EndpointBuilder & withModeController(std::shared_ptr< avsCommon::sdkInterfaces::modeController::ModeControllerInterface > modeController, const std::string &instance, const avsCommon::sdkInterfaces::modeController::ModeControllerAttributes &modeControllerAttributes, bool isProactivelyReported, bool isRetrievable, bool isNonControllable=false) override
std::unique_ptr< EndpointInterface > build() override
::std::string string
Definition: gtest-port.h:1097
Definition: RangeControllerAttributes.h:38
EndpointBuilder & withDerivedEndpointId(const std::string &suffix) override
EndpointBuilder & withDeviceRegistration() override
static std::unique_ptr< EndpointBuilder > create(const std::shared_ptr< avsCommon::utils::DeviceInfo > &deviceInfo, const std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > &contextManager, const std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > &exceptionSender, const std::shared_ptr< capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface > &alexaMessageSender)
EndpointBuilder & withAdditionalAttributes(const std::string &manufacturer, const std::string &model, const std::string &serialNumber, const std::string &firmwareVersion, const std::string &softwareVersion, const std::string &customIdentifier) override
avsCommon::sdkInterfaces::endpoints::EndpointIdentifier EndpointIdentifier
Definition: EndpointBuilder.h:56
Definition: EndpointBuilder.h:51
Definition: EndpointBuilderInterface.h:66
EndpointBuilder & withCapabilityConfiguration(const std::shared_ptr< avsCommon::sdkInterfaces::CapabilityConfigurationInterface > &configurationInterface) override
EndpointBuilder & withCapability(const CapabilityConfiguration &configuration, std::shared_ptr< DirectiveHandlerInterface > directiveHandler) override
void finalizeAttributes()
Definition: AVSDiscoveryEndpointAttributes.h:41
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
EndpointBuilder & withEndpointCapabilitiesBuilder(const std::shared_ptr< avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesBuilderInterface > &endpointCapabilitiesBuilder) override
Definition: ToggleControllerAttributes.h:34
EndpointBuilder & withPowerController(std::shared_ptr< avsCommon::sdkInterfaces::powerController::PowerControllerInterface > powerController, bool isProactivelyReported, bool isRetrievable) override
Definition: DefaultEndpointBuilder.h:52
Definition: DirectiveHandlerInterface.h:39
EndpointBuilder & withConnections(const std::vector< std::map< std::string, std::string >> &connections) override
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
EndpointBuilder & withDisplayCategory(const std::vector< std::string > &displayCategories) override
Definition: CapabilityConfiguration.h:42
EndpointBuilder & withManufacturerName(const std::string &manufacturerName) override
EndpointBuilder & withCookies(const std::map< std::string, std::string > &cookies) override
EndpointBuilder & withToggleController(std::shared_ptr< avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface > toggleController, const std::string &instance, const avsCommon::sdkInterfaces::toggleController::ToggleControllerAttributes &toggleControllerAttributes, bool isProactivelyReported, bool isRetrievable, bool isNonControllable=false) override
Definition: EndpointInterface.h:38
virtual ~EndpointBuilder()