ESPHome  2022.11.3
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)
 
void perform ()
 
const optional< MediaPlayerCommand > & get_command () const
 
const optional< std::string > & get_media_url () const
 
const optional< float > & get_volume () const
 

Protected Member Functions

void validate_ ()
 

Protected Attributes

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

Detailed Description

Definition at line 43 of file media_player.h.

Constructor & Destructor Documentation

◆ MediaPlayerCall()

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

Definition at line 45 of file media_player.h.

Member Function Documentation

◆ get_command()

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

Definition at line 57 of file media_player.h.

◆ get_media_url()

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

Definition at line 58 of file media_player.h.

◆ get_volume()

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

Definition at line 59 of file media_player.h.

◆ perform()

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

Definition at line 58 of file media_player.cpp.

◆ set_command() [1/3]

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

Definition at line 74 of file media_player.cpp.

◆ set_command() [2/3]

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

Definition at line 78 of file media_player.cpp.

◆ set_command() [3/3]

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

Definition at line 82 of file media_player.cpp.

◆ set_media_url()

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

Definition at line 101 of file media_player.cpp.

◆ set_volume()

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

Definition at line 106 of file media_player.cpp.

◆ validate_()

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

Definition at line 43 of file media_player.cpp.

Field Documentation

◆ command_

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

Definition at line 64 of file media_player.h.

◆ media_url_

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

Definition at line 65 of file media_player.h.

◆ parent_

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

Definition at line 63 of file media_player.h.

◆ volume_

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

Definition at line 66 of file media_player.h.


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