AlexaClientSDK  1.20.1
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Protected Member Functions | List of all members
alexaClientSDK::avsCommon::utils::RequiresShutdown Class Referenceabstract

#include <RequiresShutdown.h>

Inherited by alexaClientSDK::acl::AVSConnectionManager, alexaClientSDK::acl::MessageRouterInterface, alexaClientSDK::acl::TransportInterface, alexaClientSDK::acsdkAlerts::AlertsCapabilityAgent, alexaClientSDK::acsdkAudioPlayer::AudioPlayer, alexaClientSDK::acsdkBluetooth::Bluetooth, alexaClientSDK::acsdkNotifications::NotificationRenderer, alexaClientSDK::acsdkNotifications::NotificationsCapabilityAgent, alexaClientSDK::adsl::DirectiveRouter, alexaClientSDK::afml::AudioActivityTracker, alexaClientSDK::afml::VisualActivityTracker, alexaClientSDK::avsCommon::sdkInterfaces::CallManagerInterface, alexaClientSDK::avsCommon::sdkInterfaces::DirectiveSequencerInterface, alexaClientSDK::avsCommon::sdkInterfaces::externalMediaPlayer::ExternalMediaAdapterInterface [virtual], alexaClientSDK::avsCommon::utils::mediaPlayer::test::MockMediaPlayer, alexaClientSDK::avsCommon::utils::test::Object, alexaClientSDK::bluetoothImplementations::blueZ::BlueZDeviceManager, alexaClientSDK::capabilitiesDelegate::CapabilitiesDelegate, alexaClientSDK::capabilityAgents::aip::AudioInputProcessor, alexaClientSDK::capabilityAgents::alexa::AlexaInterfaceMessageSender, alexaClientSDK::capabilityAgents::apiGateway::ApiGatewayCapabilityAgent, alexaClientSDK::capabilityAgents::doNotDisturb::DoNotDisturbCapabilityAgent, alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent, alexaClientSDK::capabilityAgents::externalMediaPlayer::ExternalMediaPlayer, alexaClientSDK::capabilityAgents::modeController::ModeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::mrm::MRMCapabilityAgent, alexaClientSDK::capabilityAgents::mrm::MRMHandlerInterface, alexaClientSDK::capabilityAgents::playbackController::PlaybackController, alexaClientSDK::capabilityAgents::playbackController::PlaybackRouter, alexaClientSDK::capabilityAgents::powerController::PowerControllerCapabilityAgent, alexaClientSDK::capabilityAgents::rangeController::RangeControllerCapabilityAgent, alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager, alexaClientSDK::capabilityAgents::speechSynthesizer::SpeechSynthesizer, alexaClientSDK::capabilityAgents::system::SoftwareInfoSender, alexaClientSDK::capabilityAgents::system::SoftwareInfoSendRequest, alexaClientSDK::capabilityAgents::system::UserInactivityMonitor, alexaClientSDK::capabilityAgents::templateRuntime::TemplateRuntime, alexaClientSDK::capabilityAgents::toggleController::ToggleControllerCapabilityAgent, alexaClientSDK::captions::CaptionManager, alexaClientSDK::certifiedSender::CertifiedSender, alexaClientSDK::integration::test::AVSCommunication, alexaClientSDK::integration::test::TestMessageSender, alexaClientSDK::integration::test::testStateProvider, alexaClientSDK::mediaPlayer::android::AndroidSLESMediaPlayer, alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::SourceInterface, alexaClientSDK::playlistParser::ContentDecrypter, alexaClientSDK::playlistParser::PlaylistParser, alexaClientSDK::playlistParser::UrlContentToAttachmentConverter, and alexaClientSDK::sampleApp::InteractionManager.

Public Member Functions

 RequiresShutdown (const std::string &name)
 
virtual ~RequiresShutdown ()
 Destructor. More...
 
const std::string & name () const
 
void shutdown ()
 
bool isShutdown () const
 

Protected Member Functions

virtual void doShutdown ()=0
 

Detailed Description

Abstract base class which requires the derived class to implement a shutdown function and tries to verify that client code calls shutdown() correctly.

Constructor & Destructor Documentation

◆ RequiresShutdown()

alexaClientSDK::avsCommon::utils::RequiresShutdown::RequiresShutdown ( const std::string &  name)

Constructor.

Parameters
nameThe name of the class or object which requires shutdown calls. Used in log messages when problems are detected in shutdown or destruction sequences.

◆ ~RequiresShutdown()

alexaClientSDK::avsCommon::utils::RequiresShutdown::~RequiresShutdown ( )
virtual

Destructor.

Member Function Documentation

◆ doShutdown()

virtual void alexaClientSDK::avsCommon::utils::RequiresShutdown::doShutdown ( )
protectedpure virtual

Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.

Warning
  • Attempting to call functions on this object after calling shutdown() can result in undefined behavior.
  • Neglecting to call shutdown() on this object can result in resource leaks or other undefined behavior.

Implemented in alexaClientSDK::integration::test::testStateProvider, alexaClientSDK::acsdkBluetooth::Bluetooth, alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::acl::HTTP2Transport, alexaClientSDK::avsCommon::utils::mediaPlayer::test::MockMediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESMediaPlayer, alexaClientSDK::capabilityAgents::mrm::MRMCapabilityAgent, alexaClientSDK::integration::test::AVSCommunication, alexaClientSDK::playlistParser::UrlContentToAttachmentConverter, alexaClientSDK::integration::test::TestMessageSender, alexaClientSDK::capabilitiesDelegate::CapabilitiesDelegate, alexaClientSDK::capabilityAgents::equalizer::EqualizerCapabilityAgent, alexaClientSDK::capabilityAgents::speakerManager::SpeakerManager, alexaClientSDK::capabilityAgents::doNotDisturb::DoNotDisturbCapabilityAgent, alexaClientSDK::capabilityAgents::system::SoftwareInfoSender, alexaClientSDK::acl::MessageRouter, alexaClientSDK::acsdkNotifications::NotificationRenderer, alexaClientSDK::playlistParser::ContentDecrypter, alexaClientSDK::bluetoothImplementations::blueZ::BlueZDeviceManager, alexaClientSDK::captions::CaptionManager, alexaClientSDK::capabilityAgents::system::SoftwareInfoSendRequest, alexaClientSDK::capabilityAgents::apiGateway::ApiGatewayCapabilityAgent, alexaClientSDK::playlistParser::PlaylistParser, and alexaClientSDK::avsCommon::utils::test::Object.

◆ isShutdown()

bool alexaClientSDK::avsCommon::utils::RequiresShutdown::isShutdown ( ) const

Checks whether this object has had shutdown() called on it.

Returns
true if this object has been shut down, else false.

◆ name()

const std::string & alexaClientSDK::avsCommon::utils::RequiresShutdown::name ( ) const

Returns the name of this object.

Returns
The name of the object.

◆ shutdown()

void alexaClientSDK::avsCommon::utils::RequiresShutdown::shutdown ( )

Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.

Warning
  • Attempting to call functions on this object after calling shutdown() can result in undefined behavior.
  • Neglecting to call shutdown() on this object can result in resource leaks or other undefined behavior.

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

AlexaClientSDK 1.20.1 - Copyright 2016-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0