|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
Provides an interface to read and modify SDP bodies. More...
#include <SdpContents.hxx>
Classes | |
| class | Bandwidth |
| Process optional b= (bandwidth) lines in SDP. More... | |
| class | Codec |
| parameters for a specific codec are stored in this class. More... | |
| class | Connection |
| Process c= (connection) lines in SDP. More... | |
| class | Direction |
| class | |
| process e= (email) lines in the SDP More... | |
| class | Encryption |
| process k= (encryption key) line More... | |
| class | Medium |
| process m= (media announcement) blocks More... | |
| class | Origin |
| processes o= lines in SDP More... | |
| class | Phone |
| process p= (phone number) lines in the SDP More... | |
| class | Time |
| Process t= (start/stop time) lines in SDP. More... | |
| class | Timezones |
| process z= (timezone) lines More... | |
Public Types | |
| typedef std::vector< std::reference_wrapper< const SdpContents::Session::Direction > > | DirectionList |
| typedef std::list< Medium > | MediumContainer |
Public Member Functions | |
| Session (int version, const Origin &origin, const Data &name) | |
| session constructor | |
| Session () | |
| Session (const Session &rhs) | |
| Session & | operator= (const Session &rhs) |
| void | parse (ParseBuffer &pb) |
| EncodeStream & | encode (EncodeStream &) const |
| int | version () const |
| return session version | |
| int & | version () |
| return session version | |
| const Origin & | origin () const |
| return session Origin line | |
| Origin & | origin () |
| return session Origin line | |
| const Data & | name () const |
| return session name | |
| Data & | name () |
| return session name | |
| const Data & | information () const |
| return session Information | |
| Data & | information () |
| return session Information | |
| const Uri & | uri () const |
| return session Uri | |
| Uri & | uri () |
| return session Uri | |
| const std::list< Email > & | getEmails () const |
| return session Email list | |
| const std::list< Phone > & | getPhones () const |
| return session Phone number list | |
| const Connection & | connection () const |
| return session Connection | |
| Connection & | connection () |
| return session Connection | |
| bool | isConnection () const |
| check if a c= line is present for the session | |
| const std::list< Bandwidth > & | bandwidths () const |
| return session Bandwidth lines | |
| std::list< Bandwidth > & | bandwidths () |
| return session Bandwidth lines | |
| const std::list< Time > & | getTimes () const |
| return session Time lines | |
| std::list< Time > & | getTimes () |
| return session Time lines | |
| const Timezones & | getTimezones () const |
| const Encryption & | getEncryption () const |
| const Encryption & | encryption () const |
| Encryption & | encryption () |
| const MediumContainer & | media () const |
| return session Media lines | |
| MediumContainer & | media () |
| return session Media lines | |
| std::list< std::reference_wrapper< Medium > > | getMediaByType (const Data &type) |
| return session Media lines filtered by type | |
| void | addEmail (const Email &email) |
| add an e= (email) line to session | |
| void | addPhone (const Phone &phone) |
| add a p= (phone number) line to session | |
| void | addBandwidth (const Bandwidth &bandwidth) |
| add a b= (Bandwidth) line to session | |
| void | addTime (const Time &t) |
| add a t= (Time) line to session | |
| void | addMedium (const Medium &medium) |
| add an m= (Medium) section to session | |
| void | clearMedium () |
| remove all Medium sections from session | |
| void | clearAttribute (const Data &key) |
| erase all attributes for a given key | |
| void | addAttribute (const Data &key, const Data &value=Data::Empty) |
| add a session attribute line | |
| bool | exists (const Data &key) const |
| tests if an a= key is present in the session | |
| const std::list< Data > & | getValues (const Data &key) const |
| get the attribute values corresponding to the key | |
| const Direction & | getDirection () const |
| const Direction & | getDirection (const std::set< Data > types, const std::set< Data > protocolTypes) const |
| examine direction for streams of given types | |
| DirectionList | getDirections () const |
| DirectionList | getNetDirections (const SdpContents &remote) const |
| std::set< Data > | getMediaStreamLabels () const |
| retrieve label (RFC 4574) attributes in a set | |
| bool | isWebRTC () const |
| determine if the SDP appears to conform to WebRTC | |
| bool | isTrickleIceSupported () const |
| determine if ice-options:trickle is present | |
| void | transformCOMedia (const Data &setupDirection="active", const Data &cOMediaAttribute="setup") |
| apply RFC 4145 COMEDIA transform | |
| void | transformLocalHold (bool holding) |
| change the direction attributes as if the peer who created the SDP is on hold or not | |
| const Medium * | getMediumByMid (const Data &mid) const |
| find the Medium with given mid value | |
| std::shared_ptr< TrickleIceContents > | makeIceFragment (const Data &fragment, unsigned int lineIndex, const Data &mid) |
| based on the original SDP in this instances of SdpContents, find the relevant ICE and m= line(s), copy them into a new SDP fragment and add the candidate line provided | |
Friends | |
| class | SdpContents |
Provides an interface to read and modify SDP bodies.
Definition at line 71 of file SdpContents.hxx.
| typedef std::vector<std::reference_wrapper<const SdpContents::Session::Direction> > resip::SdpContents::Session::DirectionList |
Definition at line 587 of file SdpContents.hxx.
| typedef std::list<Medium> resip::SdpContents::Session::MediumContainer |
Definition at line 1005 of file SdpContents.hxx.
session constructor
Create a new session from origin line, version, and session anme
| version | session version |
| origin | Origin line |
| name | session name |
Definition at line 968 of file SdpContents.cxx.
|
inline |
Definition at line 899 of file SdpContents.hxx.
| SdpContents::Session::Session | ( | const Session & | rhs | ) |
Definition at line 976 of file SdpContents.cxx.
| void SdpContents::Session::addAttribute | ( | const Data & | key, |
| const Data & | value = Data::Empty |
||
| ) |
add a session attribute line
| key | attribute key |
| value | attribute value |
Definition at line 1208 of file SdpContents.cxx.
| void SdpContents::Session::addBandwidth | ( | const Bandwidth & | bandwidth | ) |
add a b= (Bandwidth) line to session
| bandwidth | Bandwidth line to add |
Definition at line 1195 of file SdpContents.cxx.
| void SdpContents::Session::addEmail | ( | const Email & | ) |
add an e= (email) line to session
| Email line to add |
Definition at line 1177 of file SdpContents.cxx.
| void SdpContents::Session::addMedium | ( | const Medium & | medium | ) |
add an m= (Medium) section to session
| medium | Medium section to add |
Definition at line 1201 of file SdpContents.cxx.
| void SdpContents::Session::addPhone | ( | const Phone & | phone | ) |
add a p= (phone number) line to session
| phone | Phone line to add |
Definition at line 1189 of file SdpContents.cxx.
| void SdpContents::Session::addTime | ( | const Time & | t | ) |
add a t= (Time) line to session
| t | Time line to add |
Definition at line 1183 of file SdpContents.cxx.
|
inline |
return session Bandwidth lines
Definition at line 990 of file SdpContents.hxx.
|
inline |
return session Bandwidth lines
Definition at line 985 of file SdpContents.hxx.
| void SdpContents::Session::clearAttribute | ( | const Data & | key | ) |
erase all attributes for a given key
| key | key to clear |
Definition at line 1223 of file SdpContents.cxx.
|
inline |
remove all Medium sections from session
Definition at line 1055 of file SdpContents.hxx.
|
inline |
|
inline |
| EncodeStream & SdpContents::Session::encode | ( | EncodeStream & | s | ) | const |
Definition at line 1091 of file SdpContents.cxx.
|
inline |
Definition at line 1004 of file SdpContents.hxx.
|
inline |
Definition at line 1003 of file SdpContents.hxx.
| bool SdpContents::Session::exists | ( | const Data & | key | ) | const |
tests if an a= key is present in the session
| key | key to check |
Definition at line 1238 of file SdpContents.cxx.
| const SdpContents::Session::Direction & SdpContents::Session::getDirection | ( | ) | const |
Definition at line 1250 of file SdpContents.cxx.
| const SdpContents::Session::Direction & SdpContents::Session::getDirection | ( | const std::set< Data > | types, |
| const std::set< Data > | protocolTypes | ||
| ) | const |
examine direction for streams of given types
| types | @params protocolTypes |
Definition at line 1361 of file SdpContents.cxx.
| SdpContents::Session::DirectionList SdpContents::Session::getDirections | ( | ) | const |
Definition at line 1300 of file SdpContents.cxx.
|
inline |
|
inline |
Definition at line 1002 of file SdpContents.hxx.
| std::list< std::reference_wrapper< SdpContents::Session::Medium > > SdpContents::Session::getMediaByType | ( | const Data & | type | ) |
return session Media lines filtered by type
| type | the type |
Definition at line 1164 of file SdpContents.cxx.
| std::set< Data > SdpContents::Session::getMediaStreamLabels | ( | ) | const |
retrieve label (RFC 4574) attributes in a set
Definition at line 1390 of file SdpContents.cxx.
| const SdpContents::Session::Medium * SdpContents::Session::getMediumByMid | ( | const Data & | mid | ) | const |
find the Medium with given mid value
| mid | the mid value to search for |
Definition at line 1489 of file SdpContents.cxx.
| SdpContents::Session::DirectionList SdpContents::Session::getNetDirections | ( | const SdpContents & | remote | ) | const |
Definition at line 1314 of file SdpContents.cxx.
|
inline |
return session Phone number list
Definition at line 965 of file SdpContents.hxx.
|
inline |
|
inline |
|
inline |
Definition at line 1001 of file SdpContents.hxx.
get the attribute values corresponding to the key
| key | key to check |
Definition at line 1244 of file SdpContents.cxx.
|
inline |
|
inline |
|
inline |
check if a c= line is present for the session
Definition at line 980 of file SdpContents.hxx.
| bool SdpContents::Session::isTrickleIceSupported | ( | ) | const |
determine if ice-options:trickle is present
Definition at line 1422 of file SdpContents.cxx.
| bool SdpContents::Session::isWebRTC | ( | ) | const |
determine if the SDP appears to conform to WebRTC
Definition at line 1406 of file SdpContents.cxx.
| std::shared_ptr< TrickleIceContents > SdpContents::Session::makeIceFragment | ( | const Data & | fragment, |
| unsigned int | lineIndex, | ||
| const Data & | mid | ||
| ) |
based on the original SDP in this instances of SdpContents, find the relevant ICE and m= line(s), copy them into a new SDP fragment and add the candidate line provided
| fragment | the candidate line to include |
Definition at line 1502 of file SdpContents.cxx.
|
inline |
|
inline |
|
inline |
|
inline |
| SdpContents::Session & SdpContents::Session::operator= | ( | const Session & | rhs | ) |
Definition at line 982 of file SdpContents.cxx.
|
inline |
|
inline |
| void SdpContents::Session::parse | ( | ParseBuffer & | pb | ) |
Definition at line 1010 of file SdpContents.cxx.
| void SdpContents::Session::transformCOMedia | ( | const Data & | setupDirection = "active", |
| const Data & | cOMediaAttribute = "setup" |
||
| ) |
apply RFC 4145 COMEDIA transform
sets the IP port number of each media to 9 and adds the setup attribute. Early versions of the draft up to draft-ietf-mmusic-sdp-comedia-05.txt used the attribute name "direction", later versions and the RFC 4145 use the attribute name "setup"
Definition at line 1440 of file SdpContents.cxx.
| void SdpContents::Session::transformLocalHold | ( | bool | holding | ) |
change the direction attributes as if the peer who created the SDP is on hold or not
| holding | whether to represent hold or normal |
Definition at line 1453 of file SdpContents.cxx.
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
Definition at line 1157 of file SdpContents.hxx.