AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
DefaultEndpointBuilder.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_ENDPOINTS_INCLUDE_ENDPOINTS_DEFAULTENDPOINTBUILDER_H_
17 #define ALEXA_CLIENT_SDK_ENDPOINTS_INCLUDE_ENDPOINTS_DEFAULTENDPOINTBUILDER_H_
18 
19 #include <memory>
20 #include <string>
21 
38 
40 
41 namespace alexaClientSDK {
42 namespace endpoints {
43 
53 public:
63 
74 
86  const std::shared_ptr<avsCommon::utils::DeviceInfo>& deviceInfo,
87  const std::shared_ptr<avsCommon::sdkInterfaces::ContextManagerInterface>& contextManager,
88  const std::shared_ptr<avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface>& exceptionSender,
89  const std::shared_ptr<capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface>&
90  alexaMessageSender);
91 
95  virtual ~DefaultEndpointBuilder();
96 
101  DefaultEndpointBuilder& withEndpointId(const EndpointIdentifier& endpointId) override;
102  DefaultEndpointBuilder& withFriendlyName(const std::string& friendlyName) override;
103  DefaultEndpointBuilder& withDescription(const std::string& description) override;
104  DefaultEndpointBuilder& withManufacturerName(const std::string& manufacturerName) override;
105  DefaultEndpointBuilder& withDisplayCategory(const std::vector<std::string>& displayCategories) override;
107  const std::string& manufacturer,
108  const std::string& model,
109  const std::string& serialNumber,
110  const std::string& firmwareVersion,
111  const std::string& softwareVersion,
112  const std::string& customIdentifier) override;
114  const std::vector<std::map<std::string, std::string>>& connections) override;
115  DefaultEndpointBuilder& withCookies(const std::map<std::string, std::string>& cookies) override;
117  std::shared_ptr<avsCommon::sdkInterfaces::powerController::PowerControllerInterface> powerController,
118  bool isProactivelyReported,
119  bool isRetrievable) override;
121  std::shared_ptr<avsCommon::sdkInterfaces::toggleController::ToggleControllerInterface> toggleController,
122  const std::string& instance,
124  bool isProactivelyReported,
125  bool isRetrievable,
126  bool isNonControllable = false) override;
128  const std::shared_ptr<avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesBuilderInterface>&
129  endpointCapabilitiesBuilder) override;
131  std::shared_ptr<avsCommon::sdkInterfaces::modeController::ModeControllerInterface> modeController,
132  const std::string& instance,
134  bool isProactivelyReported,
135  bool isRetrievable,
136  bool isNonControllable = false) override;
138  std::shared_ptr<avsCommon::sdkInterfaces::rangeController::RangeControllerInterface> rangeController,
139  const std::string& instance,
141  bool isProactivelyReported,
142  bool isRetrievable,
143  bool isNonControllable = false) override;
145  const CapabilityConfiguration& configuration,
146  std::shared_ptr<DirectiveHandlerInterface> directiveHandler) override;
148  const std::shared_ptr<avsCommon::sdkInterfaces::CapabilityConfigurationInterface>& configurationInterface,
149  std::shared_ptr<DirectiveHandlerInterface> directiveHandler) override;
151  const std::shared_ptr<avsCommon::sdkInterfaces::CapabilityConfigurationInterface>& configurationInterface)
152  override;
153  std::unique_ptr<EndpointInterface> build() override;
155 
156 private:
162  explicit DefaultEndpointBuilder(std::unique_ptr<EndpointBuilder> builder);
163 
165  std::unique_ptr<EndpointBuilder> m_builder;
166 };
167 
168 } // namespace endpoints
169 } // namespace alexaClientSDK
170 
171 #endif // ALEXA_CLIENT_SDK_ENDPOINTS_INCLUDE_ENDPOINTS_DEFAULTENDPOINTBUILDER_H_
DefaultEndpointBuilder & withFriendlyName(const std::string &friendlyName) override
avsCommon::sdkInterfaces::endpoints::EndpointIdentifier EndpointIdentifier
Definition: DefaultEndpointBuilder.h:57
static acsdkManufactory::Annotated< DefaultEndpointAnnotation, EndpointBuilderInterface > createDefaultEndpointBuilderInterface(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)
DefaultEndpointBuilder & withEndpointCapabilitiesBuilder(const std::shared_ptr< avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesBuilderInterface > &endpointCapabilitiesBuilder) override
DefaultEndpointBuilder & withManufacturerName(const std::string &manufacturerName) override
::std::string string
Definition: gtest-port.h:1097
DefaultEndpointBuilder & withPowerController(std::shared_ptr< avsCommon::sdkInterfaces::powerController::PowerControllerInterface > powerController, bool isProactivelyReported, bool isRetrievable) override
static acsdkManufactory::Annotated< DefaultEndpointAnnotation, EndpointCapabilitiesRegistrarInterface > createDefaultEndpointCapabilitiesRegistrarInterface(acsdkManufactory::Annotated< DefaultEndpointAnnotation, EndpointBuilderInterface > builder)
DefaultEndpointBuilder & withCookies(const std::map< std::string, std::string > &cookies) override
DefaultEndpointBuilder & 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
avsCommon::sdkInterfaces::endpoints::DefaultEndpointAnnotation DefaultEndpointAnnotation
Definition: AlexaInterfaceCapabilityAgentTest.cpp:50
DefaultEndpointBuilder & withDeviceRegistration() override
DefaultEndpointBuilder & 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
DefaultEndpointBuilder & withDisplayCategory(const std::vector< std::string > &displayCategories) override
DefaultEndpointBuilder & 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
DefaultEndpointBuilder & withCapability(const CapabilityConfiguration &configuration, std::shared_ptr< DirectiveHandlerInterface > directiveHandler) override
DefaultEndpointBuilder & withConnections(const std::vector< std::map< std::string, std::string >> &connections) override
Definition: AVSDiscoveryEndpointAttributes.h:41
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
DefaultEndpointBuilder & withEndpointId(const EndpointIdentifier &endpointId) override
DefaultEndpointBuilder & withDerivedEndpointId(const std::string &suffix) override
Definition: DefaultEndpointBuilder.h:52
std::string EndpointIdentifier
Definition: EndpointIdentifier.h:38
Definition: CapabilityConfiguration.h:42
DefaultEndpointBuilder & 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
DefaultEndpointBuilder & withDescription(const std::string &description) override
DefaultEndpointBuilder & withCapabilityConfiguration(const std::shared_ptr< avsCommon::sdkInterfaces::CapabilityConfigurationInterface > &configurationInterface) override

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