AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <EndpointBuilder.h>
Public Member Functions | |
virtual | ~EndpointBuilder () |
void | finalizeAttributes () |
@c EndpointBuilderInterface methods. | |
EndpointBuilder & | withDerivedEndpointId (const std::string &suffix) override |
EndpointBuilder & | withDeviceRegistration () override |
EndpointBuilder & | withEndpointId (const EndpointIdentifier &endpointId) override |
EndpointBuilder & | withFriendlyName (const std::string &friendlyName) override |
EndpointBuilder & | withDescription (const std::string &description) override |
EndpointBuilder & | withManufacturerName (const std::string &manufacturerName) override |
EndpointBuilder & | withDisplayCategory (const std::vector< std::string > &displayCategories) override |
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 |
EndpointBuilder & | withConnections (const std::vector< std::map< std::string, std::string >> &connections) override |
EndpointBuilder & | withCookies (const std::map< std::string, std::string > &cookies) override |
EndpointBuilder & | withPowerController (std::shared_ptr< avsCommon::sdkInterfaces::powerController::PowerControllerInterface > powerController, bool isProactivelyReported, bool isRetrievable) 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 |
EndpointBuilder & | withEndpointCapabilitiesBuilder (const std::shared_ptr< avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesBuilderInterface > &endpointCapabilitiesBuilder) 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 |
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 & | withCapability (const CapabilityConfiguration &configuration, std::shared_ptr< DirectiveHandlerInterface > directiveHandler) override |
EndpointBuilder & | withCapability (const std::shared_ptr< avsCommon::sdkInterfaces::CapabilityConfigurationInterface > &configurationInterface, std::shared_ptr< DirectiveHandlerInterface > directiveHandler) override |
EndpointBuilder & | withCapabilityConfiguration (const std::shared_ptr< avsCommon::sdkInterfaces::CapabilityConfigurationInterface > &configurationInterface) override |
std::unique_ptr< EndpointInterface > | build () override |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface | |
virtual | ~EndpointBuilderInterface ()=default |
virtual EndpointBuilderInterface & | withEndpointCapabilitiesBuilder (const std::shared_ptr< avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesBuilderInterface > &endpointCapabilitiesBuilder)=0 |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface | |
virtual | ~EndpointCapabilitiesRegistrarInterface ()=default |
virtual EndpointCapabilitiesRegistrarInterface & | withCapability (const std::shared_ptr< avsCommon::sdkInterfaces::CapabilityConfigurationInterface > &configurationInterface, std::shared_ptr< DirectiveHandlerInterface > directiveHandler)=0 |
virtual EndpointCapabilitiesRegistrarInterface & | withCapabilityConfiguration (const std::shared_ptr< avsCommon::sdkInterfaces::CapabilityConfigurationInterface > &configurationInterface)=0 |
Static Public Member Functions | |
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) |
static std::unique_ptr< EndpointBuilder > | create (const avsCommon::utils::DeviceInfo &deviceInfo, std::shared_ptr< avsCommon::sdkInterfaces::ContextManagerInterface > contextManager, std::shared_ptr< avsCommon::sdkInterfaces::ExceptionEncounteredSenderInterface > exceptionSender, std::shared_ptr< capabilityAgents::alexa::AlexaInterfaceMessageSenderInternalInterface > alexaMessageSender) |
Interface for an endpoint builder.
For the default endpoint, use DefaultEndpointBuilder
.
The builder is responsible for configuring and building an endpoint object. Once built, EndpointRegistrationManagerInterface
should be used to register the endpoint with AVS for it to be ready to use.
using alexaClientSDK::endpoints::EndpointBuilder::CapabilityConfiguration = avsCommon::avs::CapabilityConfiguration |
Alias to improve readability.
using alexaClientSDK::endpoints::EndpointBuilder::DirectiveHandlerInterface = avsCommon::sdkInterfaces::DirectiveHandlerInterface |
Alias to improve readability.
using alexaClientSDK::endpoints::EndpointBuilder::EndpointAttributes = avsCommon::avs::AVSDiscoveryEndpointAttributes |
Alias to improve readability.
using alexaClientSDK::endpoints::EndpointBuilder::EndpointIdentifier = avsCommon::sdkInterfaces::endpoints::EndpointIdentifier |
Alias to improve readability.
using alexaClientSDK::endpoints::EndpointBuilder::EndpointInterface = avsCommon::sdkInterfaces::endpoints::EndpointInterface |
Alias to improve readability.
|
virtual |
Destructor.
|
overridevirtual |
Builds an endpoint with the configured properties / components.
Build will fail iff the format of any attribute is invalid or if a mandatory attribute is missing.
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
static |
Creates an EndpointBuilder.
deviceInfo | Structure with information about the Alexa client device. |
contextManager | Object used to retrieve the current state of an endpoint. |
exceptionSender | Object used to send exceptions. |
alexaInterfaceMessageSender | Object used to send AlexaInterface events. |
nullptr
.
|
static |
Creates an EndpointBuilder.
deviceInfo | Structure with information about the Alexa client device. |
contextManager | Object used to retrieve the current state of an endpoint. |
exceptionSender | Object used to send exceptions. |
alexaInterfaceMessageSender | Object used to send AlexaInterface events. |
nullptr
. void alexaClientSDK::endpoints::EndpointBuilder::finalizeAttributes | ( | ) |
Finalize attributes.
Once called, this builder will no longer allow endpoint attribute related configurations to be set. This allows applications to add more capabilities to the endpoint without changing its attributes.
|
overridevirtual |
Configures builder to set additional attributes that can be used to identify an endpoint.
manufacturer | The name of the manufacturer of the device. |
model | The name of the model of the device. |
serialNumber | The serial number of the device. |
firmwareVersion | The firmware version of the device. |
softwareVersion | The software version of the device. |
customIdentifier | Your custom identifier for the device. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Adds a capability.
configuration | The capability configuration. |
directiveHandler | The handler for the directives in the given namespace. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointCapabilitiesRegistrarInterface.
|
override |
|
override |
|
overridevirtual |
Configures builder to represent the methods that the endpoint uses to connect to the internet of smart home hub.
connections | The available connection methods and their attributes. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to store custom key value pair about the device.
cookies | Key value pairs for additional of the endpoint. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use an endpointId that is generated using the default endpoint id and the given suffix.
suffix | A suffix that should be unique for the given client. The build() function fails if it exceeds 10 characters. If the suffix is not unique, the newly-built endpoint will replace the previous endpoint which had the same suffix when registered. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use the given description.
description | The description of the endpoint. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Includes default Registration information to the endpoint.
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use the following display categories.
description | The display category the device belongs to. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
override |
|
overridevirtual |
Configures builder to use the given identifier for the new endpoint.
endpointId | An endpointId that identifies this endpoint. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use the given friendly name.
friendlyName | The friendly name used to identify the endpoint. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use name of the device manufacturer representing the endpoint.
description | The manufacturer name of the device representing the endpoint. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use a ModeControllerInterface
with instance
identifier.
withEndpointCapabilitiesBuilder()
method instead.modeController | An interface that provides the mode operations. |
instance | A non-empty string identifying an instance of a mode controller uniquely in a endpoint. |
modeControllerAttributes | The attributes used in capability discovery message. |
isProactivelyReported | Whether the property state change is proactively reported. |
isRetrievable | Whether the property state is retrievable. |
isNonControllable | Whether the property state can be controlled or not. This must be false for the property state to be controllable. Default is false . |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use a PowerControllerInterface
withEndpointCapabilitiesBuilder()
method instead.powerController | An interface that provides the power operations. |
isProactivelyReported | Whether the property state change is proactively reported. |
isRetrievable | Whether the property state is retrievable. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use a RangeControllerInteface
with instance
identifier.
withEndpointCapabilitiesBuilder()
method instead.rangeController | An interface that provides the range operations. |
instance | A non-empty string identifying an instance of a range controller uniquely in a endpoint. |
rangeControllerAttributes | The attributes used in capability discovery message. |
isProactivelyReported | Whether the property state change is proactively reported. |
isRetrievable | Whether the property state is retrievable. |
isNonControllable | Whether the property state can be controlled or not. This must be false for the property state to be controllable. Default is false . |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
|
overridevirtual |
Configures builder to use a ToggleControllerInterface
with instance
identifier.
withEndpointCapabilitiesBuilder()
method instead.toggleController | An interface that performs the toggle operations. |
instance | A non-empty string identifying an instance of a toggle controller uniquely in a endpoint. |
toggleControllerAttributes | The attributes used in capability discovery message. |
isProactivelyReported | Whether the property state change is proactively reported. |
isRetrievable | Whether the property state is retrievable. |
isNonControllable | Whether the property state can be controlled or not. This must be false for the property state to be controllable. Default is false . |
Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointBuilderInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0