Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::sdp::SessionDescription Class Reference

SDP session description. More...

#include <session_description.h>

Inheritance diagram for roc::sdp::SessionDescription:
Collaboration diagram for roc::sdp::SessionDescription:

Public Member Functions

 SessionDescription (core::IArena &arena)
 Initialize empty session description. More...
 
void clear ()
 Clear all fields. More...
 
const char * guid () const
 Globally Unique Identifier for the session. Built from a tuple of username, sess-id, nettype, addrtype, and unicast-address. More...
 
ROC_ATTR_NODISCARD bool set_guid (const char *start_p_origin_username, const char *end_p_origin_username, const char *start_p_origin_sess_id, const char *end_p_origin_sess_id, const char *start_p_origin_nettype, const char *end_p_origin_nettype, const char *start_p_origin_addr, const char *end_p_origin_addr)
 Set GUID. More...
 
const address::SocketAddrorigin_unicast_address () const
 Origin unicast address. More...
 
ROC_ATTR_NODISCARD bool set_origin_unicast_address (address::AddrFamily addrtype, const char *str, size_t str_len)
 Check and set origin unicast address from a string. More...
 
ROC_ATTR_NODISCARD bool set_session_connection_data (address::AddrFamily addrtype, const char *str, size_t str_len)
 Check and set session connection address from a string. More...
 
const ConnectionDatasession_connection_data ()
 Get reference to the connection data of the session. More...
 
ROC_ATTR_NODISCARD bool add_media_description ()
 Create and add a new empty media description. More...
 
const core::SharedPtr< MediaDescriptionlast_media_description () const
 Get a shared pointer to the last added media description. More...
 
const core::SharedPtr< MediaDescriptionfirst_media_description () const
 Get a shared pointer to the first added media description. More...
 
const core::List< MediaDescriptionget_media_descriptions () const
 Get a const reference to the list of media descriptions. More...
 
const core::SharedPtr< MediaDescriptionnextof_media_description (core::SharedPtr< MediaDescription > element) const
 Get list media description next to given one. More...
 

Detailed Description

SDP session description.

Definition at line 31 of file session_description.h.

Constructor & Destructor Documentation

◆ SessionDescription()

roc::sdp::SessionDescription::SessionDescription ( core::IArena arena)

Initialize empty session description.

Member Function Documentation

◆ add_media_description()

ROC_ATTR_NODISCARD bool roc::sdp::SessionDescription::add_media_description ( )

Create and add a new empty media description.

◆ clear()

void roc::sdp::SessionDescription::clear ( )

Clear all fields.

◆ first_media_description()

const core::SharedPtr<MediaDescription> roc::sdp::SessionDescription::first_media_description ( ) const

Get a shared pointer to the first added media description.

◆ get_media_descriptions()

const core::List<MediaDescription> roc::sdp::SessionDescription::get_media_descriptions ( ) const

Get a const reference to the list of media descriptions.

◆ guid()

const char* roc::sdp::SessionDescription::guid ( ) const

Globally Unique Identifier for the session. Built from a tuple of username, sess-id, nettype, addrtype, and unicast-address.

◆ last_media_description()

const core::SharedPtr<MediaDescription> roc::sdp::SessionDescription::last_media_description ( ) const

Get a shared pointer to the last added media description.

◆ nextof_media_description()

const core::SharedPtr<MediaDescription> roc::sdp::SessionDescription::nextof_media_description ( core::SharedPtr< MediaDescription element) const

Get list media description next to given one.

Returns
list media description following element if element is not last, or NULL otherwise.
Precondition
element should be member of the list of media descriptions.

◆ origin_unicast_address()

const address::SocketAddr& roc::sdp::SessionDescription::origin_unicast_address ( ) const

Origin unicast address.

◆ session_connection_data()

const ConnectionData& roc::sdp::SessionDescription::session_connection_data ( )

Get reference to the connection data of the session.

◆ set_guid()

ROC_ATTR_NODISCARD bool roc::sdp::SessionDescription::set_guid ( const char *  start_p_origin_username,
const char *  end_p_origin_username,
const char *  start_p_origin_sess_id,
const char *  end_p_origin_sess_id,
const char *  start_p_origin_nettype,
const char *  end_p_origin_nettype,
const char *  start_p_origin_addr,
const char *  end_p_origin_addr 
)

Set GUID.

◆ set_origin_unicast_address()

ROC_ATTR_NODISCARD bool roc::sdp::SessionDescription::set_origin_unicast_address ( address::AddrFamily  addrtype,
const char *  str,
size_t  str_len 
)

Check and set origin unicast address from a string.

◆ set_session_connection_data()

ROC_ATTR_NODISCARD bool roc::sdp::SessionDescription::set_session_connection_data ( address::AddrFamily  addrtype,
const char *  str,
size_t  str_len 
)

Check and set session connection address from a string.


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