AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | List of all members
alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface Class Referenceabstract

#include <LocaleAssetsManagerInterface.h>

Inheritance diagram for alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface:
Collaboration graph
[legend]

Public Types

using Locale = std::string
 
using LanguageTag = std::string
 
using WakeWords = std::set< std::string >
 
using WakeWordsSets = std::set< WakeWords >
 
using Locales = std::vector< Locale >
 
using LocaleCombinations = std::set< Locales >
 

Public Member Functions

virtual bool changeAssets (const Locales &locales, const WakeWords &wakeWords)=0
 
virtual void cancelOngoingChange ()=0
 
virtual std::set< LocalegetSupportedLocales () const =0
 
virtual LocaleCombinations getSupportedLocaleCombinations () const =0
 
virtual Locale getDefaultLocale () const =0
 
virtual Locales getDefaultLocales () const
 
virtual WakeWordsSets getDefaultSupportedWakeWords () const =0
 
virtual std::map< LanguageTag, WakeWordsSetsgetLanguageSpecificWakeWords () const =0
 
virtual std::map< Locale, WakeWordsSetsgetLocaleSpecificWakeWords () const =0
 
virtual WakeWordsSets getSupportedWakeWords (const Locale &locale) const =0
 
virtual void addLocaleAssetsObserver (const std::shared_ptr< LocaleAssetsObserverInterface > &observer)=0
 
virtual void removeLocaleAssetsObserver (const std::shared_ptr< LocaleAssetsObserverInterface > &observer)=0
 
virtual void setEndpointRegistrationManager (const std::shared_ptr< endpoints::EndpointRegistrationManagerInterface > &manager)=0
 
virtual ~LocaleAssetsManagerInterface ()=default
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::CapabilityConfigurationChangeObserverInterface
virtual ~CapabilityConfigurationChangeObserverInterface ()=default
 
virtual void onConfigurationChanged (const avs::CapabilityConfiguration &configuration)=0
 

Detailed Description

Interface for locale sensitive assets manager.

A LocaleAssetsManagerInterface implementation should provide methods to get the supported locales and wake words in the device. It should also implement a mechanism to change the current device locale and wake words.

The methods prepareAssets and cancelPrepare MUST be thread safe.

Member Typedef Documentation

◆ LanguageTag

Alias for the language tag. The language tag should follow BCP 47 format.

◆ Locale

Alias for the locale. The locale should follow BCP 47 format and it's composed of a language tag and a region tag, e.g.: en-CA.

◆ LocaleCombinations

Represent the combinations of locales.

◆ Locales

Represent a collection of locale. This needs to be a vector because the collection is ordered, the locale at index zero is the primary locale.

◆ WakeWords

Represent a collection of wake words.

◆ WakeWordsSets

Represent a set of wake words.

Constructor & Destructor Documentation

◆ ~LocaleAssetsManagerInterface()

virtual alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::~LocaleAssetsManagerInterface ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addLocaleAssetsObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::addLocaleAssetsObserver ( const std::shared_ptr< LocaleAssetsObserverInterface > &  observer)
pure virtual

Add a locale assets observer to be notified when locale assets have updated.

Parameters
observerThe observer to add.

Implemented in alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ cancelOngoingChange()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::cancelOngoingChange ( )
pure virtual

Method used to cancel an ongoing prepareAssets call.

This will get called when there is a change to the required assets. It's up to the implementation to decide how and when to cancel the ongoing operation.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ changeAssets()

virtual bool alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::changeAssets ( const Locales locales,
const WakeWords wakeWords 
)
pure virtual

Method to change the current assets.

Parameters
localesThe locales.
wakeWordsThe wake words that should be available and enabled.
Returns
true if it succeeds; false otherwise.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getDefaultLocale()

virtual Locale alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getDefaultLocale ( ) const
pure virtual

Get the default locale.

Deprecated:
Use getDefaultLocales
Returns
The default locale.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getDefaultLocales()

LocaleAssetsManagerInterface::Locales alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getDefaultLocales ( ) const
inlinevirtual

Get the default multilingual locales.

Returns
The default multilingual locales.

Reimplemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getDefaultSupportedWakeWords()

virtual WakeWordsSets alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getDefaultSupportedWakeWords ( ) const
pure virtual

Get the default valid concurrent wake words sets.

Returns
The valid concurrent wake words sets supported in most locales.
Note
See getLocaleSpecificWakeWords() for locales that have a different set of supported wake words.
Warning
The supported set of wake words MUST include ALEXA.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getLanguageSpecificWakeWords()

virtual std::map<LanguageTag, WakeWordsSets> alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getLanguageSpecificWakeWords ( ) const
pure virtual

Function that return valid concurrent wake words sets per language (if and only if locale support a set of wake words that's different than the default set).

Returns
A map of valid concurrent wake words sets per language.
Warning
The supported wake words MUST include ALEXA for all languages.ExecutorTest.cpp

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getLocaleSpecificWakeWords()

virtual std::map<Locale, WakeWordsSets> alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getLocaleSpecificWakeWords ( ) const
pure virtual

Function that return the valid concurrent wake words sets per locale (if and only if locale support a set of wake words that's different than the default set or the language set).

Returns
A map of valid concurrent wake words sets per locale.
Warning
The supported wake words MUST include ALEXA for all locales.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getSupportedLocaleCombinations()

virtual LocaleCombinations alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getSupportedLocaleCombinations ( ) const
pure virtual

Get the supported locales combinations.

Returns
A vector with all the supported locales combinations.
Note
Order matters for the locale combination, as the first locale presented is the primary locale. Each combination will have more than one locale, and each locale in the combination must be a supported locale.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getSupportedLocales()

virtual std::set<Locale> alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getSupportedLocales ( ) const
pure virtual

Get the supported locales.

Returns
A set with all the supported locales.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ getSupportedWakeWords()

virtual WakeWordsSets alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::getSupportedWakeWords ( const Locale locale) const
pure virtual

Get the valid concurrent wake words sets for the given locale.

Parameters
localeThe target locale.
Returns
The valid concurrent wake words sets of the given locale.

Implemented in alexaClientSDK::sampleApplications::ipcServerSampleApp::LocaleAssetsManager, and alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ removeLocaleAssetsObserver()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::removeLocaleAssetsObserver ( const std::shared_ptr< LocaleAssetsObserverInterface > &  observer)
pure virtual

Remove a previously registered observer.

Parameters
observerThe observer to be removed.

Implemented in alexaClientSDK::sampleApp::LocaleAssetsManager.

◆ setEndpointRegistrationManager()

virtual void alexaClientSDK::avsCommon::sdkInterfaces::LocaleAssetsManagerInterface::setEndpointRegistrationManager ( const std::shared_ptr< endpoints::EndpointRegistrationManagerInterface > &  manager)
pure virtual

Set the EndpointRegistrationManager to update locales/wakewords capabilities.

Parameters
managerThe pointer to EndpointRegistrationManager.

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