AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <ArtifactWrapper.h>
Public Member Functions | |
~ArtifactWrapper () override=default | |
bool | operator== (const ArtifactWrapper &rhs) const |
bool | operator!= (const ArtifactWrapper &rhs) const |
std::string | name () const override |
bool | download () const override |
bool | isAvailable () const override |
bool | isPending () const override |
std::shared_ptr< commonInterfaces::ArtifactRequest > | getRequest () const override |
std::string | getPath () const override |
commonInterfaces::Priority | getPriority () const override |
bool | setPriority (commonInterfaces::Priority priority) override |
void | erase () override |
void | addWeakPtrObserver (const std::weak_ptr< clientInterfaces::ArtifactChangeObserver > &observer) override |
Add a weak reference to an observer. More... | |
void | removeWeakPtrObserver (const std::weak_ptr< clientInterfaces::ArtifactChangeObserver > &observer) override |
Remove an observer. More... | |
Public Member Functions inherited from alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface | |
virtual | ~ArtifactWrapperInterface ()=default |
virtual void | addWeakPtrObserver (const std::weak_ptr< ArtifactChangeObserver > &observer)=0 |
virtual void | removeWeakPtrObserver (const std::weak_ptr< ArtifactChangeObserver > &observer)=0 |
Public Member Functions inherited from alexaClientSDK::notifier::Notifier< clientInterfaces::ArtifactChangeObserver > | |
Notifier () | |
void | addObserver (const std::shared_ptr< clientInterfaces::ArtifactChangeObserver > &observer) override |
Add an observer. More... | |
void | removeObserver (const std::shared_ptr< clientInterfaces::ArtifactChangeObserver > &observer) override |
Remove an observer. More... | |
void | addWeakPtrObserver (const std::weak_ptr< clientInterfaces::ArtifactChangeObserver > &observer) override |
Add a weak reference to an observer. More... | |
void | removeWeakPtrObserver (const std::weak_ptr< clientInterfaces::ArtifactChangeObserver > &observer) override |
Remove an observer. More... | |
void | notifyObservers (std::function< void(const std::shared_ptr< clientInterfaces::ArtifactChangeObserver > &)> notify) override |
Notify the observers in the order that they were added. More... | |
bool | notifyObserversInReverse (std::function< void(const std::shared_ptr< clientInterfaces::ArtifactChangeObserver > &)> notify) override |
Notify the observers in the reverse order that they were added. More... | |
void | setAddObserverFunction (std::function< void(const std::shared_ptr< clientInterfaces::ArtifactChangeObserver > &)> addObserverFunc) override |
Set a function for notifications on an observer additions. More... | |
Public Member Functions inherited from alexaClientSDK::notifierInterfaces::NotifierInterface< clientInterfaces::ArtifactChangeObserver > | |
virtual | ~NotifierInterface ()=default |
Public Member Functions inherited from alexaClientSDK::acsdkCommunicationInterfaces::CommunicationPropertyChangeSubscriber< int > | |
virtual | ~CommunicationPropertyChangeSubscriber ()=default |
Public Member Functions inherited from alexaClientSDK::acsdkCommunicationInterfaces::CommunicationPropertyChangeSubscriber< std::string > | |
virtual | ~CommunicationPropertyChangeSubscriber ()=default |
Static Public Member Functions | |
static std::shared_ptr< ArtifactWrapper > | create (const std::shared_ptr< commonInterfaces::AmdCommunicationInterface > &amdComm, const std::shared_ptr< commonInterfaces::ArtifactRequest > &request, const std::shared_ptr< clientInterfaces::ArtifactUpdateValidator > &updateValidator=nullptr) |
This class provides a mechanism for controlling artifacts in asset manager through aipc.
|
overridedefault |
|
inlineoverridevirtual |
Add a weak reference to an observer.
Method adds a weak reference to observer. If the same observer has already been added as a strong or weak reference, the method does nothing.
If the observer function has been installed prior to this call, it will be invoked with the newly added observer.
[in] | observer | The observer to add. If observer is nullptr, the method does nothing. |
Implements alexaClientSDK::notifierInterfaces::NotifierInterface< clientInterfaces::ArtifactChangeObserver >.
|
static |
Creates an artifact wrapper and request a download and creation on asset manager side. If the creation was successful or if the artifact already existed on asset manager, then this will return a valid artifact wrapper to manage that artifact.
aipcWrapper | REQUIRED, for aipc communication with asset manager |
request | REQUIRED, to uniquely identify the artifact to download or use. |
updateValidator | OPTIONAL, if none is provided, then the update will always be applied. Otherwise, the validator will be used to confirm that the new artifact is valid and should be applied. |
|
overridevirtual |
Requests the download of the artifact referenced by this wrapper if not already downloaded or downloading.
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
overridevirtual |
Requests the removal and cleanup of the given artifact.
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
overridevirtual |
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
overridevirtual |
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
inlineoverridevirtual |
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
inlineoverridevirtual |
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
inlineoverridevirtual |
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
inlineoverridevirtual |
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
|
inline |
|
inline |
|
inlineoverridevirtual |
Remove an observer.
Method removes a strong or weak reference to observer. If the class doesn't have a strong or weak reference to observer, the method does nothing.
[in] | observer | The observer to remove. If observer is nullptr, the method does nothing. |
Implements alexaClientSDK::notifierInterfaces::NotifierInterface< clientInterfaces::ArtifactChangeObserver >.
|
overridevirtual |
Sets the priority accordingly.
Implements alexaClientSDK::acsdkAssets::clientInterfaces::ArtifactWrapperInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0