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

#include <FocusManagerInterface.h>

Public Member Functions

bool operator== (const Activity &rhs)
 
const std::string getInterface () const
 
std::chrono::milliseconds getPatienceDuration () const
 
avsCommon::avs::ContentType getContentType () const
 
void setContentType (avsCommon::avs::ContentType contentType)
 
avsCommon::avs::MixingBehavior getMixingBehavior () const
 
std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterfacegetChannelObserver () const
 
bool notifyObserver (avs::FocusState focus, avsCommon::avs::MixingBehavior behavior)
 

Static Public Member Functions

static std::shared_ptr< Activitycreate (const std::string &interfaceName, const std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > &channelObserver, const std::chrono::milliseconds &patienceDuration=std::chrono::milliseconds::zero(), const avsCommon::avs::ContentType contentType=avsCommon::avs::ContentType::NONMIXABLE)
 

Detailed Description

An activity representation of an entity that includes details of policy and patience duration that can acquire a channel.

If activity A has a patience duration greater than 0, and pushes the current activity B to background, activity B is eligible to be reinstated as foreground if activity A releases the channel before the duration of the patience has lapsed.

Member Function Documentation

◆ create()

std::shared_ptr< FocusManagerInterface::Activity > alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::create ( const std::string &  interfaceName,
const std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > &  channelObserver,
const std::chrono::milliseconds &  patienceDuration = std::chrono::milliseconds::zero(),
const avsCommon::avs::ContentType  contentType = avsCommon::avs::ContentType::NONMIXABLE 
)
inlinestatic

Constructs a new Activity object.

Parameters
interfaceNameThe Activity's interface.
channelObserverThe Activity's Channel Observer.
patienceDurationThe Activity's Patience Duration.
contentTypeThe Activity's Content Type.

◆ getChannelObserver()

std::shared_ptr< avsCommon::sdkInterfaces::ChannelObserverInterface > alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::getChannelObserver ( ) const
inline

Returns the channel observer of Activity.

Returns
The channel observer of Activity.

◆ getContentType()

avsCommon::avs::ContentType alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::getContentType ( ) const
inline

Returns the ContentType associated with the Activity.

Returns
The ContentType associated with this Activity.

◆ getInterface()

const std::string alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::getInterface ( ) const
inline

Returns the name of Activity's AVS interface.

Returns
The name of the AVS interface.

◆ getMixingBehavior()

avsCommon::avs::MixingBehavior alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::getMixingBehavior ( ) const
inline

Gets the last MixingBehavior set for this Activity.

Parameters
TheMixingBehavior to be set for this Activity

◆ getPatienceDuration()

std::chrono::milliseconds alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::getPatienceDuration ( ) const
inline

Returns the patience duration in milliseconds of Activity. After the release duration, the backgrounded Activity due to the forgrounding of the Activity with patience will be kicked out of the stack and will be set to NONE FocusState.

Returns
The patience duration in milliseconds of Activity.

◆ notifyObserver()

bool alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::notifyObserver ( avs::FocusState  focus,
avsCommon::avs::MixingBehavior  behavior 
)
inline

Notifies the channel Observer of focus of Channel and Channel owner interface.

Returns
true if observer was notified, else false.

◆ operator==()

bool alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::operator== ( const Activity rhs)
inline

◆ setContentType()

void alexaClientSDK::avsCommon::sdkInterfaces::FocusManagerInterface::Activity::setContentType ( avsCommon::avs::ContentType  contentType)
inline

Sets the ContentType associated with this Activity.

Parameters
contentTypeThe ContentType associated with this Activity.

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