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

#include <CapabilityResources.h>

Public Member Functions

 CapabilityResources ()
bool addFriendlyNameWithAssetId (const resources::AlexaAssetId &assetId)
bool addFriendlyNameWithText (const std::string &text, const sdkInterfaces::LocaleAssetsManagerInterface::Locale &locale)
bool isValid () const
std::string toJson () const

Detailed Description

This class represents the resources used by a Capability, communicated as friendly names to AVS.

See also

Constructor & Destructor Documentation

◆ CapabilityResources()

alexaClientSDK::avsCommon::avs::CapabilityResources::CapabilityResources ( )

The constructor.

Member Function Documentation

◆ addFriendlyNameWithAssetId()

bool alexaClientSDK::avsCommon::avs::CapabilityResources::addFriendlyNameWithAssetId ( const resources::AlexaAssetId assetId)

Function to add friendly name with asset id.

It is recommended to use asset identifier whenever available, as the friendly name are already localized into all Alexa supported languages.
assetIdThe asset id of the friendly name using AlexaAssetId.
Return true if successful in adding the asset id, otherwise false.

◆ addFriendlyNameWithText()

bool alexaClientSDK::avsCommon::avs::CapabilityResources::addFriendlyNameWithText ( const std::string &  text,
const sdkInterfaces::LocaleAssetsManagerInterface::Locale locale 

Function to add friendly name with text value and its locale.

When using this method it is recommended to provide the friendly names in all the Alexa supported languages. See the class-level link to find the currently supported languages.
Providing an unsupported locale will result in Discovery failure.
textThe text of the friendly name.
localeThe locale of the friendly name Locale.
Return true if successful in adding the text and locale, otherwise false.

◆ isValid()

bool alexaClientSDK::avsCommon::avs::CapabilityResources::isValid ( ) const

Function to check if the CapabilityResources is valid.

Return true if valid, otherwise false.

◆ toJson()

std::string alexaClientSDK::avsCommon::avs::CapabilityResources::toJson ( ) const

Helper function to convert a FriendlyName to a json string.

This follows the AVS discovery message format.
A json string of FriendlyName.

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

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