Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::MediaAttribute Class Reference

#include <media_attribute.h>

Collaboration diagram for jami::MediaAttribute:
Collaboration graph

Public Member Functions

bool hasValidVideo ()
 
 MediaAttribute (const libjami::MediaMap &mediaMap, bool secure)
 
 MediaAttribute (MediaType type=MediaType::MEDIA_NONE, bool muted=false, bool secure=true, bool enabled=false, std::string_view source={}, std::string_view label={}, bool onHold=false)
 
std::string toString (bool full=false) const
 

Static Public Member Functions

static char constboolToString (bool val)
 
static std::vector< MediaAttributebuildMediaAttributesList (const std::vector< libjami::MediaMap > &mediaList, bool secure)
 
static std::pair< bool, boolgetBoolValue (const libjami::MediaMap &mediaMap, const std::string &key)
 
static std::pair< bool, MediaTypegetMediaType (const libjami::MediaMap &map)
 
static std::pair< bool, std::string > getStringValue (const libjami::MediaMap &mediaMap, const std::string &key)
 
static bool hasMediaType (const std::vector< MediaAttribute > &mediaList, MediaType type)
 
static std::vector< libjami::MediaMapmediaAttributesToMediaMaps (std::vector< MediaAttribute > mediaAttrList)
 
static char constmediaTypeToString (MediaType type)
 
static MediaType stringToMediaType (const std::string &mediaType)
 
static libjami::MediaMap toMediaMap (const MediaAttribute &mediaAttr)
 

Public Attributes

bool enabled_ {false}
 
std::string label_ {}
 
bool muted_ {false}
 
bool onHold_ {false}
 
bool secure_ {true}
 
std::string sourceUri_ {}
 
MediaType type_ {MediaType::MEDIA_NONE}
 

Detailed Description

Definition at line 28 of file media_attribute.h.

Constructor & Destructor Documentation

◆ MediaAttribute() [1/2]

jami::MediaAttribute::MediaAttribute ( MediaType  type = MediaType::MEDIA_NONE,
bool  muted = false,
bool  secure = true,
bool  enabled = false,
std::string_view  source = {},
std::string_view  label = {},
bool  onHold = false 
)
inline

Definition at line 31 of file media_attribute.h.

◆ MediaAttribute() [2/2]

Member Function Documentation

◆ boolToString()

char const * jami::MediaAttribute::boolToString ( bool  val)
static

Definition at line 127 of file media_attribute.cpp.

References jami::emitSignal(), jami::FALSE_STR, and jami::TRUE_STR.

Referenced by toMediaMap().

Here is the call graph for this function:

◆ buildMediaAttributesList()

std::vector< MediaAttribute > jami::MediaAttribute::buildMediaAttributesList ( const std::vector< libjami::MediaMap > &  mediaList,
bool  secure 
)
static

◆ getBoolValue()

std::pair< bool, bool > jami::MediaAttribute::getBoolValue ( const libjami::MediaMap mediaMap,
const std::string &  key 
)
static

Definition at line 98 of file media_attribute.cpp.

References jami::emitSignal(), jami::FALSE_STR, JAMI_ERR, and jami::TRUE_STR.

Referenced by MediaAttribute().

Here is the call graph for this function:

◆ getMediaType()

std::pair< bool, MediaType > jami::MediaAttribute::getMediaType ( const libjami::MediaMap map)
static

Definition at line 81 of file media_attribute.cpp.

References jami::emitSignal(), JAMI_ERR, jami::MEDIA_NONE, libjami::Media::MediaAttributeKey::MEDIA_TYPE, and stringToMediaType().

Referenced by MediaAttribute().

Here is the call graph for this function:

◆ getStringValue()

std::pair< bool, std::string > jami::MediaAttribute::getStringValue ( const libjami::MediaMap mediaMap,
const std::string &  key 
)
static

Definition at line 116 of file media_attribute.cpp.

References jami::emitSignal().

Referenced by MediaAttribute().

Here is the call graph for this function:

◆ hasMediaType()

bool jami::MediaAttribute::hasMediaType ( const std::vector< MediaAttribute > &  mediaList,
MediaType  type 
)
static

Definition at line 145 of file media_attribute.cpp.

References jami::emitSignal().

Referenced by jami::Conference::addSubCall(), and jami::Conference::handleMediaChangeRequest().

Here is the call graph for this function:

◆ hasValidVideo()

bool jami::MediaAttribute::hasValidVideo ( )

Definition at line 204 of file media_attribute.cpp.

References enabled_, jami::MEDIA_VIDEO, muted_, onHold_, and type_.

◆ mediaAttributesToMediaMaps()

std::vector< libjami::MediaMap > jami::MediaAttribute::mediaAttributesToMediaMaps ( std::vector< MediaAttribute mediaAttrList)
static

◆ mediaTypeToString()

◆ stringToMediaType()

MediaType jami::MediaAttribute::stringToMediaType ( const std::string &  mediaType)
static

◆ toMediaMap()

◆ toString()

std::string jami::MediaAttribute::toString ( bool  full = false) const

Definition at line 182 of file media_attribute.cpp.

References jami::emitSignal(), enabled_, label_, jami::MEDIA_AUDIO, muted_, secure_, sourceUri_, and type_.

Referenced by jami::SIPCall::requestMediaChange().

Here is the call graph for this function:

Member Data Documentation

◆ enabled_

bool jami::MediaAttribute::enabled_ {false}

◆ label_

std::string jami::MediaAttribute::label_ {}

Definition at line 85 of file media_attribute.h.

Referenced by MediaAttribute(), jami::SIPCall::requestMediaChange(), and toString().

◆ muted_

bool jami::MediaAttribute::muted_ {false}

◆ onHold_

bool jami::MediaAttribute::onHold_ {false}

Definition at line 86 of file media_attribute.h.

Referenced by hasValidVideo(), and MediaAttribute().

◆ secure_

bool jami::MediaAttribute::secure_ {true}

Definition at line 82 of file media_attribute.h.

Referenced by MediaAttribute(), and toString().

◆ sourceUri_

std::string jami::MediaAttribute::sourceUri_ {}

Definition at line 84 of file media_attribute.h.

Referenced by MediaAttribute(), and toString().

◆ type_


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