AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::endpoints::Endpoint Class Reference

#include <Endpoint.h>

Inheritance diagram for alexaClientSDK::endpoints::Endpoint:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::endpoints::Endpoint:
Collaboration graph
[legend]

Public Types

using EndpointIdentifier = avsCommon::sdkInterfaces::endpoints::EndpointIdentifier
 
using EndpointAttributes = avsCommon::avs::AVSDiscoveryEndpointAttributes
 

Public Member Functions

 Endpoint (const EndpointAttributes &attributes)
 
 ~Endpoint ()
 
bool addCapability (const avsCommon::avs::CapabilityConfiguration &capabilityConfiguration, std::shared_ptr< avsCommon::sdkInterfaces::DirectiveHandlerInterface > directiveHandler)
 
bool removeCapability (const avsCommon::avs::CapabilityConfiguration &capabilityConfiguration)
 
bool addCapabilityConfiguration (const avsCommon::avs::CapabilityConfiguration &capabilityConfiguration)
 
bool validateEndpointAttributes (const EndpointAttributes &updatedAttributes)
 
void addRequireShutdownObjects (const std::list< std::shared_ptr< avsCommon::utils::RequiresShutdown >> &requireShutdownObjects)
 
@c EndpointInterface methods.
EndpointIdentifier getEndpointId () const override
 
EndpointAttributes getAttributes () const override
 
std::vector< avsCommon::avs::CapabilityConfigurationgetCapabilityConfigurations () const override
 
std::unordered_map< avsCommon::avs::CapabilityConfiguration, std::shared_ptr< avsCommon::sdkInterfaces::DirectiveHandlerInterface > > getCapabilities () const override
 
bool update (const std::shared_ptr< avsCommon::sdkInterfaces::endpoints::EndpointModificationData > &endpointModificationData) override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointInterface
virtual ~EndpointInterface ()=default
 
virtual bool update (const std::shared_ptr< EndpointModificationData > &endpointModificationData)=0
 

Detailed Description

Provides an implementation for EndpointInterface.

Member Typedef Documentation

◆ EndpointAttributes

Alias to improve readability.

◆ EndpointIdentifier

Alias to improve readability.

Constructor & Destructor Documentation

◆ Endpoint()

alexaClientSDK::endpoints::Endpoint::Endpoint ( const EndpointAttributes attributes)

Constructor.

Parameters
attributesThe endpoint attributes.

◆ ~Endpoint()

alexaClientSDK::endpoints::Endpoint::~Endpoint ( )

Destructor.

Member Function Documentation

◆ addCapability()

bool alexaClientSDK::endpoints::Endpoint::addCapability ( const avsCommon::avs::CapabilityConfiguration capabilityConfiguration,
std::shared_ptr< avsCommon::sdkInterfaces::DirectiveHandlerInterface directiveHandler 
)

Adds the capability configuration and its directive handler to the endpoint.

Parameters
capabilityConfigurationThe capability agent configuration.
directiveHandlerThe DirectiveHandler for this capability.
Returns
True if successful, else false.

◆ addCapabilityConfiguration()

bool alexaClientSDK::endpoints::Endpoint::addCapabilityConfiguration ( const avsCommon::avs::CapabilityConfiguration capabilityConfiguration)

This method is used to add capability configurations for interfaces that don't have any associated directive.

Parameters
capabilityConfiguration
Returns
true if successful; false otherwise.

◆ addRequireShutdownObjects()

void alexaClientSDK::endpoints::Endpoint::addRequireShutdownObjects ( const std::list< std::shared_ptr< avsCommon::utils::RequiresShutdown >> &  requireShutdownObjects)

This method can be used to add other objects that require shutdown during endpoint destruction.

Parameters
requireShutdownObjectsThe list of objects that require explicit shutdown calls.

◆ getAttributes()

EndpointAttributes alexaClientSDK::endpoints::Endpoint::getAttributes ( ) const
overridevirtual

The getter for the endpoint attributes.

Returns
The EndpointAttributes structure.

Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointInterface.

◆ getCapabilities()

std::unordered_map< avsCommon::avs::CapabilityConfiguration, std::shared_ptr<avsCommon::sdkInterfaces::DirectiveHandlerInterface> > alexaClientSDK::endpoints::Endpoint::getCapabilities ( ) const
overridevirtual

The getter for the capabilities that are supported by this endpoint.

Returns
The capabilities supported by the endpoint represented by a map of capability configurations and their respective directive handlers.

Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointInterface.

◆ getCapabilityConfigurations()

std::vector<avsCommon::avs::CapabilityConfiguration> alexaClientSDK::endpoints::Endpoint::getCapabilityConfigurations ( ) const
overridevirtual

The getter for the set of CapabilityConfigurations supported by this endpoint.

Returns
The set of CapabilityConfiguration supported by the endpoint.

Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointInterface.

◆ getEndpointId()

EndpointIdentifier alexaClientSDK::endpoints::Endpoint::getEndpointId ( ) const
overridevirtual

The getter for the endpoint identifier.

Returns
The endpoint identifier.

Implements alexaClientSDK::avsCommon::sdkInterfaces::endpoints::EndpointInterface.

◆ removeCapability()

bool alexaClientSDK::endpoints::Endpoint::removeCapability ( const avsCommon::avs::CapabilityConfiguration capabilityConfiguration)

Removes the capability configuration from the endpoint.

Parameters
capabilityConfigurationThe capability agent configuration.
Returns
True if successful, else false.

◆ update()

bool alexaClientSDK::endpoints::Endpoint::update ( const std::shared_ptr< avsCommon::sdkInterfaces::endpoints::EndpointModificationData > &  endpointModificationData)
override

◆ validateEndpointAttributes()

bool alexaClientSDK::endpoints::Endpoint::validateEndpointAttributes ( const EndpointAttributes updatedAttributes)

Validate the updated endpoint attributes.

Parameters
updatedAttributesThe updated endpoint attributes.
Returns
true if valid; false otherwise.

The documentation for this class was generated from the following file:

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