ESPHome  2024.11.0
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::media_player::MediaPlayerCall Class Reference

#include <media_player.h>

Public Member Functions

 MediaPlayerCall (MediaPlayer *parent)
 
MediaPlayerCallset_command (MediaPlayerCommand command)
 
MediaPlayerCallset_command (optional< MediaPlayerCommand > command)
 
MediaPlayerCallset_command (const std::string &command)
 
MediaPlayerCallset_media_url (const std::string &url)
 
MediaPlayerCallset_volume (float volume)
 
MediaPlayerCallset_announcement (bool announce)
 
void perform ()
 
const optional< MediaPlayerCommand > & get_command () const
 
const optional< std::string > & get_media_url () const
 
const optional< float > & get_volume () const
 
const optional< bool > & get_announcement () const
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

MediaPlayer *const parent_
 
optional< MediaPlayerCommandcommand_
 
optional< std::string > media_url_
 
optional< float > volume_
 
optional< bool > announcement_
 

Detailed Description

Definition at line 60 of file media_player.h.

Constructor & Destructor Documentation

◆ MediaPlayerCall()

esphome::media_player::MediaPlayerCall::MediaPlayerCall ( MediaPlayer parent)
inline

Definition at line 62 of file media_player.h.

Member Function Documentation

◆ get_announcement()

const optional<bool>& esphome::media_player::MediaPlayerCall::get_announcement ( ) const
inline

Definition at line 78 of file media_player.h.

◆ get_command()

const optional<MediaPlayerCommand>& esphome::media_player::MediaPlayerCall::get_command ( ) const
inline

Definition at line 75 of file media_player.h.

◆ get_media_url()

const optional<std::string>& esphome::media_player::MediaPlayerCall::get_media_url ( ) const
inline

Definition at line 76 of file media_player.h.

◆ get_volume()

const optional<float>& esphome::media_player::MediaPlayerCall::get_volume ( ) const
inline

Definition at line 77 of file media_player.h.

◆ perform()

void esphome::media_player::MediaPlayerCall::perform ( )

Definition at line 64 of file media_player.cpp.

◆ set_announcement()

MediaPlayerCall & esphome::media_player::MediaPlayerCall::set_announcement ( bool  announce)

Definition at line 120 of file media_player.cpp.

◆ set_command() [1/3]

MediaPlayerCall & esphome::media_player::MediaPlayerCall::set_command ( MediaPlayerCommand  command)

Definition at line 83 of file media_player.cpp.

◆ set_command() [2/3]

MediaPlayerCall & esphome::media_player::MediaPlayerCall::set_command ( optional< MediaPlayerCommand command)

Definition at line 87 of file media_player.cpp.

◆ set_command() [3/3]

MediaPlayerCall & esphome::media_player::MediaPlayerCall::set_command ( const std::string &  command)

Definition at line 91 of file media_player.cpp.

◆ set_media_url()

MediaPlayerCall & esphome::media_player::MediaPlayerCall::set_media_url ( const std::string &  url)

Definition at line 110 of file media_player.cpp.

◆ set_volume()

MediaPlayerCall & esphome::media_player::MediaPlayerCall::set_volume ( float  volume)

Definition at line 115 of file media_player.cpp.

◆ validate_()

void esphome::media_player::MediaPlayerCall::validate_ ( )
protected

Definition at line 49 of file media_player.cpp.

Field Documentation

◆ announcement_

optional<bool> esphome::media_player::MediaPlayerCall::announcement_
protected

Definition at line 86 of file media_player.h.

◆ command_

optional<MediaPlayerCommand> esphome::media_player::MediaPlayerCall::command_
protected

Definition at line 83 of file media_player.h.

◆ media_url_

optional<std::string> esphome::media_player::MediaPlayerCall::media_url_
protected

Definition at line 84 of file media_player.h.

◆ parent_

MediaPlayer* const esphome::media_player::MediaPlayerCall::parent_
protected

Definition at line 82 of file media_player.h.

◆ volume_

optional<float> esphome::media_player::MediaPlayerCall::volume_
protected

Definition at line 85 of file media_player.h.


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