AlexaClientSDK  1.25.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 

Constructs a new Activity object.

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

Returns the channel observer of Activity.

The channel observer of Activity.

◆ getContentType()

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

Returns the ContentType associated with the Activity.

The ContentType associated with this Activity.

◆ getInterface()

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

Returns the name of Activity's AVS interface.

The name of the AVS interface.

◆ getMixingBehavior()

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

Gets the last MixingBehavior set for this Activity.

TheMixingBehavior to be set for this Activity

◆ getPatienceDuration()

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

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.

The patience duration in milliseconds of Activity.

◆ notifyObserver()

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

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

true if observer was notified, else false.

◆ operator==()

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

◆ setContentType()

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

Sets the ContentType associated with this Activity.

contentTypeThe ContentType associated with this Activity.

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

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