libosip  5.3.0
Classes | Macros | Typedefs | Functions
oSIP SDP parser Handling

Classes

struct  sdp_bandwidth
 
struct  sdp_time_descr
 
struct  sdp_key
 
struct  sdp_attribute
 
struct  sdp_connection
 
struct  sdp_media
 
struct  sdp_message
 

Macros

#define sdp_e_email_get   sdp_message_e_email_get
 

Typedefs

typedef struct sdp_bandwidth sdp_bandwidth_t
 
typedef struct sdp_time_descr sdp_time_descr_t
 
typedef struct sdp_key sdp_key_t
 
typedef struct sdp_attribute sdp_attribute_t
 
typedef struct sdp_connection sdp_connection_t
 
typedef struct sdp_media sdp_media_t
 
typedef struct sdp_message sdp_message_t
 

Functions

int sdp_bandwidth_init (sdp_bandwidth_t **elem)
 
void sdp_bandwidth_free (sdp_bandwidth_t *elem)
 
int sdp_time_descr_init (sdp_time_descr_t **elem)
 
void sdp_time_descr_free (sdp_time_descr_t *elem)
 
int sdp_key_init (sdp_key_t **elem)
 
void sdp_key_free (sdp_key_t *elem)
 
int sdp_attribute_init (sdp_attribute_t **elem)
 
void sdp_attribute_free (sdp_attribute_t *elem)
 
int sdp_connection_init (sdp_connection_t **elem)
 
void sdp_connection_free (sdp_connection_t *elem)
 
int sdp_media_init (sdp_media_t **elem)
 
void sdp_media_free (sdp_media_t *elem)
 
int sdp_message_init (sdp_message_t **sdp)
 
int sdp_message_parse (sdp_message_t *sdp, const char *buf)
 
int sdp_message_to_str (sdp_message_t *sdp, char **dest)
 
void sdp_message_free (sdp_message_t *sdp)
 
int sdp_message_clone (sdp_message_t *sdp, sdp_message_t **dest)
 
int sdp_message_v_version_set (sdp_message_t *sdp, char *value)
 
char * sdp_message_v_version_get (sdp_message_t *sdp)
 
int sdp_message_o_origin_set (sdp_message_t *sdp, char *username, char *sess_id, char *sess_version, char *nettype, char *addrtype, char *addr)
 
char * sdp_message_o_username_get (sdp_message_t *sdp)
 
char * sdp_message_o_sess_id_get (sdp_message_t *sdp)
 
char * sdp_message_o_sess_version_get (sdp_message_t *sdp)
 
char * sdp_message_o_nettype_get (sdp_message_t *sdp)
 
char * sdp_message_o_addrtype_get (sdp_message_t *sdp)
 
char * sdp_message_o_addr_get (sdp_message_t *sdp)
 
int sdp_message_s_name_set (sdp_message_t *sdp, char *value)
 
char * sdp_message_s_name_get (sdp_message_t *sdp)
 
int sdp_message_i_info_set (sdp_message_t *sdp, int pos_media, char *value)
 
char * sdp_message_i_info_get (sdp_message_t *sdp, int pos_media)
 
int sdp_message_u_uri_set (sdp_message_t *sdp, char *value)
 
char * sdp_message_u_uri_get (sdp_message_t *sdp)
 
int sdp_message_e_email_add (sdp_message_t *sdp, char *value)
 
char * sdp_message_e_email_get (sdp_message_t *sdp, int pos)
 
int sdp_message_p_phone_add (sdp_message_t *sdp, char *value)
 
char * sdp_message_p_phone_get (sdp_message_t *sdp, int pos)
 
int sdp_message_c_connection_add (sdp_message_t *sdp, int pos_media, char *nettype, char *addrtype, char *addr, char *addr_multicast_ttl, char *addr_multicast_int)
 
char * sdp_message_c_nettype_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_c_addrtype_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_c_addr_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_c_addr_multicast_ttl_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_c_addr_multicast_int_get (sdp_message_t *sdp, int pos_media, int pos)
 
int sdp_message_b_bandwidth_add (sdp_message_t *sdp, int pos_media, char *bwtype, char *bandwidth)
 
sdp_bandwidth_tsdp_message_bandwidth_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_b_bwtype_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_b_bandwidth_get (sdp_message_t *sdp, int pos_media, int pos)
 
int sdp_message_t_time_descr_add (sdp_message_t *sdp, char *start, char *stop)
 
char * sdp_message_t_start_time_get (sdp_message_t *sdp, int pos_td)
 
char * sdp_message_t_stop_time_get (sdp_message_t *sdp, int pos_td)
 
int sdp_message_r_repeat_add (sdp_message_t *sdp, int pos_time_descr, char *value)
 
char * sdp_message_r_repeat_get (sdp_message_t *sdp, int pos_time_descr, int pos_repeat)
 
int sdp_message_z_adjustments_set (sdp_message_t *sdp, char *value)
 
char * sdp_message_z_adjustments_get (sdp_message_t *sdp)
 
int sdp_message_k_key_set (sdp_message_t *sdp, int pos_media, char *keytype, char *keydata)
 
char * sdp_message_k_keytype_get (sdp_message_t *sdp, int pos_media)
 
char * sdp_message_k_keydata_get (sdp_message_t *sdp, int pos_media)
 
int sdp_message_a_attribute_add (sdp_message_t *sdp, int pos_media, char *att_field, char *att_value)
 
int sdp_message_a_attribute_del (sdp_message_t *sdp, int pos_media, char *att_field)
 
int sdp_message_a_attribute_del_at_index (sdp_message_t *sdp, int pos_media, char *att_field, int pos_attr)
 
sdp_attribute_tsdp_message_attribute_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_a_att_field_get (sdp_message_t *sdp, int pos_media, int pos)
 
char * sdp_message_a_att_value_get (sdp_message_t *sdp, int pos_media, int pos)
 
int sdp_message_endof_media (sdp_message_t *sdp, int pos)
 
int sdp_message_m_media_add (sdp_message_t *sdp, char *media, char *port, char *number_of_port, char *proto)
 
char * sdp_message_m_media_get (sdp_message_t *sdp, int pos_media)
 
char * sdp_message_m_port_get (sdp_message_t *sdp, int pos_media)
 
int sdp_message_m_port_set (sdp_message_t *sdp, int pos_media, char *port)
 
char * sdp_message_m_number_of_port_get (sdp_message_t *sdp, int pos_media)
 
char * sdp_message_m_proto_get (sdp_message_t *sdp, int pos_media)
 
int sdp_message_m_payload_add (sdp_message_t *sdp, int pos_media, char *payload)
 
char * sdp_message_m_payload_get (sdp_message_t *sdp, int pos_media, int pos)
 
int sdp_message_m_payload_del (sdp_message_t *sdp, int pos_media, int pos)
 

Detailed Description

Macro Definition Documentation

◆ sdp_e_email_get

#define sdp_e_email_get   sdp_message_e_email_get

OBSOLETE: see sdp_message_e_email_get

Typedef Documentation

◆ sdp_attribute_t

Structure for referencing an attribute header.

◆ sdp_bandwidth_t

Structure for referencing bandwidth header.

◆ sdp_connection_t

Structure for referencing a connection header.

◆ sdp_key_t

Structure for referencing key header.

◆ sdp_media_t

Structure for referencing a media header.

◆ sdp_message_t

Structure for referencing a SDP packet.

◆ sdp_time_descr_t

Structure for referencing time description header.

Function Documentation

◆ sdp_attribute_free()

void sdp_attribute_free ( sdp_attribute_t elem)

◆ sdp_attribute_init()

int sdp_attribute_init ( sdp_attribute_t **  elem)

Allocate an attribute element.

Parameters
elemThe element to work on.

Referenced by sdp_message_a_attribute_add().

◆ sdp_bandwidth_free()

void sdp_bandwidth_free ( sdp_bandwidth_t elem)

Free a bandwidth element.

Parameters
elemThe element to work on.

References sdp_bandwidth::b_bandwidth, and sdp_bandwidth::b_bwtype.

Referenced by sdp_media_free(), sdp_media_init(), sdp_message_free(), and sdp_message_init().

◆ sdp_bandwidth_init()

int sdp_bandwidth_init ( sdp_bandwidth_t **  elem)

Allocate a bandwidth element.

Parameters
elemThe element to work on.

Referenced by sdp_message_b_bandwidth_add().

◆ sdp_connection_free()

void sdp_connection_free ( sdp_connection_t elem)

◆ sdp_connection_init()

int sdp_connection_init ( sdp_connection_t **  elem)

Allocate a connection element.

Parameters
elemThe element to work on.

Referenced by sdp_message_c_connection_add().

◆ sdp_key_free()

void sdp_key_free ( sdp_key_t elem)

Free a key element.

Parameters
elemThe element to work on.

References sdp_key::k_keydata, and sdp_key::k_keytype.

Referenced by sdp_media_free(), and sdp_message_free().

◆ sdp_key_init()

int sdp_key_init ( sdp_key_t **  elem)

Allocate a key element.

Parameters
elemThe element to work on.

Referenced by sdp_message_k_key_set().

◆ sdp_media_free()

void sdp_media_free ( sdp_media_t elem)

◆ sdp_media_init()

int sdp_media_init ( sdp_media_t **  elem)

Allocate a media element.

Parameters
elemThe element to work on.

References osip_list_init(), osip_list_ofchar_free(), osip_list_special_free(), sdp_bandwidth_free(), and sdp_connection_free().

Referenced by sdp_message_m_media_add().

◆ sdp_message_a_att_field_get()

char* sdp_message_a_att_field_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the attribute name ('a' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe attribute line number.

References sdp_attribute::a_att_field, and sdp_message_attribute_get().

◆ sdp_message_a_att_value_get()

char* sdp_message_a_att_value_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the attribute value ('a' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe attribute line number.

References sdp_attribute::a_att_value, and sdp_message_attribute_get().

◆ sdp_message_a_attribute_add()

int sdp_message_a_attribute_add ( sdp_message_t sdp,
int  pos_media,
char *  att_field,
char *  att_value 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
att_fieldThe token value.
att_valueThe token value.

References sdp_attribute::a_att_field, sdp_attribute::a_att_value, sdp_media::a_attributes, sdp_message::a_attributes, sdp_message::m_medias, osip_list_add(), osip_list_get(), osip_list_size(), and sdp_attribute_init().

◆ sdp_message_a_attribute_del()

int sdp_message_a_attribute_del ( sdp_message_t sdp,
int  pos_media,
char *  att_field 
)

delete all attribute fields specified by att_field.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
att_fieldThe value to remove.

References sdp_attribute::a_att_field, sdp_media::a_attributes, sdp_message::a_attributes, sdp_message::m_medias, osip_list_get(), osip_list_remove(), osip_list_size(), and sdp_attribute_free().

Referenced by sdp_message_a_attribute_del_at_index().

◆ sdp_message_a_attribute_del_at_index()

int sdp_message_a_attribute_del_at_index ( sdp_message_t sdp,
int  pos_media,
char *  att_field,
int  pos_attr 
)

delete one specific attribute fields specified by att_field.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
att_fieldThe value to remove.
pos_attrThe index of attribute to remove.

References sdp_attribute::a_att_field, sdp_media::a_attributes, sdp_message::a_attributes, sdp_message::m_medias, osip_list_get(), osip_list_remove(), osip_list_size(), sdp_attribute_free(), and sdp_message_a_attribute_del().

◆ sdp_message_attribute_get()

sdp_attribute_t* sdp_message_attribute_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get one of the attribute ('a' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe attribute line number.

References sdp_media::a_attributes, sdp_message::a_attributes, sdp_message::m_medias, and osip_list_get().

Referenced by sdp_message_a_att_field_get(), and sdp_message_a_att_value_get().

◆ sdp_message_b_bandwidth_add()

int sdp_message_b_bandwidth_add ( sdp_message_t sdp,
int  pos_media,
char *  bwtype,
char *  bandwidth 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
bwtypeThe token value.
bandwidthThe token value.

References sdp_bandwidth::b_bandwidth, sdp_media::b_bandwidths, sdp_message::b_bandwidths, sdp_bandwidth::b_bwtype, sdp_message::m_medias, osip_list_add(), osip_list_get(), osip_list_size(), and sdp_bandwidth_init().

◆ sdp_message_b_bandwidth_get()

char* sdp_message_b_bandwidth_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the bandwidth value ('b' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the bandwidth element list..

References sdp_bandwidth::b_bandwidth, and sdp_message_bandwidth_get().

◆ sdp_message_b_bwtype_get()

char* sdp_message_b_bwtype_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the bandwidth type ('b' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the bandwidth element list..

References sdp_bandwidth::b_bwtype, and sdp_message_bandwidth_get().

◆ sdp_message_bandwidth_get()

sdp_bandwidth_t* sdp_message_bandwidth_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the bandwidth ('b' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the bandwidth element list..

References sdp_media::b_bandwidths, sdp_message::b_bandwidths, sdp_message::m_medias, and osip_list_get().

Referenced by sdp_message_b_bandwidth_get(), and sdp_message_b_bwtype_get().

◆ sdp_message_c_addr_get()

char* sdp_message_c_addr_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the address ('c' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the connection element list..

References sdp_connection::c_addr.

◆ sdp_message_c_addr_multicast_int_get()

char* sdp_message_c_addr_multicast_int_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the multicast int info ('c' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the connection element list..

References sdp_connection::c_addr_multicast_int.

◆ sdp_message_c_addr_multicast_ttl_get()

char* sdp_message_c_addr_multicast_ttl_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the multicast ttl ('c' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the connection element list..

References sdp_connection::c_addr_multicast_ttl.

◆ sdp_message_c_addrtype_get()

char* sdp_message_c_addrtype_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the address type ('c' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the connection element list..

References sdp_connection::c_addrtype.

◆ sdp_message_c_connection_add()

int sdp_message_c_connection_add ( sdp_message_t sdp,
int  pos_media,
char *  nettype,
char *  addrtype,
char *  addr,
char *  addr_multicast_ttl,
char *  addr_multicast_int 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
nettypeThe token value.
addrtypeThe token value.
addrThe token value.
addr_multicast_ttlThe token value.
addr_multicast_intThe token value.

References sdp_connection::c_addr, sdp_connection::c_addr_multicast_int, sdp_connection::c_addr_multicast_ttl, sdp_connection::c_addrtype, sdp_message::c_connection, sdp_media::c_connections, sdp_connection::c_nettype, sdp_message::m_medias, osip_list_add(), osip_list_get(), osip_list_size(), and sdp_connection_init().

◆ sdp_message_c_nettype_get()

char* sdp_message_c_nettype_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get the network type ('c' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
posThe index in the connection element list..

References sdp_connection::c_nettype.

◆ sdp_message_clone()

int sdp_message_clone ( sdp_message_t sdp,
sdp_message_t **  dest 
)

Clone a SDP packet.

Parameters
sdpThe element to work on.
destThe cloned element.

References sdp_message_free(), sdp_message_init(), sdp_message_parse(), and sdp_message_to_str().

◆ sdp_message_e_email_add()

int sdp_message_e_email_add ( sdp_message_t sdp,
char *  value 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
valueThe token value.

References sdp_message::e_emails, and osip_list_add().

◆ sdp_message_e_email_get()

char* sdp_message_e_email_get ( sdp_message_t sdp,
int  pos 
)

Get one of the email ('e' field) of a SDP packet.

Parameters
sdpThe element to work on.
posthe index of the email line.

References sdp_message::e_emails, osip_list_get(), and osip_list_size().

◆ sdp_message_endof_media()

int sdp_message_endof_media ( sdp_message_t sdp,
int  pos 
)

Check if there is more media lines a SDP packet.

Parameters
sdpThe element to work on.
posThe attribute line number.

References sdp_message::m_medias, and osip_list_eol().

◆ sdp_message_free()

void sdp_message_free ( sdp_message_t sdp)

◆ sdp_message_i_info_get()

char* sdp_message_i_info_get ( sdp_message_t sdp,
int  pos_media 
)

Get the session info ('i' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.

References sdp_media::i_info, sdp_message::i_info, sdp_message::m_medias, and osip_list_get().

◆ sdp_message_i_info_set()

int sdp_message_i_info_set ( sdp_message_t sdp,
int  pos_media,
char *  value 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.
valueThe token value.

References sdp_media::i_info, sdp_message::i_info, sdp_message::m_medias, and osip_list_get().

◆ sdp_message_init()

int sdp_message_init ( sdp_message_t **  sdp)

Allocate a SDP packet.

Parameters
sdpThe element to work on.

References osip_list_init(), osip_list_ofchar_free(), osip_list_special_free(), sdp_attribute_free(), sdp_bandwidth_free(), and sdp_time_descr_free().

Referenced by sdp_message_clone().

◆ sdp_message_k_key_set()

int sdp_message_k_key_set ( sdp_message_t sdp,
int  pos_media,
char *  keytype,
char *  keydata 
)

Add a key in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaindex of m field.
keytypeThe token value.
keydataThe token value.

References sdp_media::k_key, sdp_message::k_key, sdp_key::k_keydata, sdp_key::k_keytype, sdp_message::m_medias, osip_list_get(), osip_list_size(), and sdp_key_init().

◆ sdp_message_k_keydata_get()

char* sdp_message_k_keydata_get ( sdp_message_t sdp,
int  pos_media 
)

Get the key value ('k' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.

References sdp_media::k_key, sdp_message::k_key, sdp_key::k_keydata, sdp_message::m_medias, osip_list_get(), and osip_list_size().

◆ sdp_message_k_keytype_get()

char* sdp_message_k_keytype_get ( sdp_message_t sdp,
int  pos_media 
)

Get the key type ('k' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe media line number.

References sdp_media::k_key, sdp_message::k_key, sdp_key::k_keytype, sdp_message::m_medias, osip_list_get(), and osip_list_size().

◆ sdp_message_m_media_add()

int sdp_message_m_media_add ( sdp_message_t sdp,
char *  media,
char *  port,
char *  number_of_port,
char *  proto 
)

Add a media line in a SDP packet.

Parameters
sdpThe element to work on.
mediaThe token value.
portThe token value.
number_of_portThe token value.
protoThe token value.

References sdp_media::m_media, sdp_message::m_medias, sdp_media::m_number_of_port, sdp_media::m_port, sdp_media::m_proto, osip_list_add(), and sdp_media_init().

◆ sdp_message_m_media_get()

char* sdp_message_m_media_get ( sdp_message_t sdp,
int  pos_media 
)

Get the media type ('m' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.

References sdp_media::m_media, sdp_message::m_medias, and osip_list_get().

◆ sdp_message_m_number_of_port_get()

char* sdp_message_m_number_of_port_get ( sdp_message_t sdp,
int  pos_media 
)

Get the number of port ('m' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.

References sdp_message::m_medias, sdp_media::m_number_of_port, and osip_list_get().

◆ sdp_message_m_payload_add()

int sdp_message_m_payload_add ( sdp_message_t sdp,
int  pos_media,
char *  payload 
)

Set the payload in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
payloadThe token value.

References sdp_message::m_medias, sdp_media::m_payloads, osip_list_add(), and osip_list_get().

◆ sdp_message_m_payload_del()

int sdp_message_m_payload_del ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Remove a payload in a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
posThe position of the payload in the media line.

References sdp_message::m_medias, sdp_media::m_payloads, osip_list_get(), and osip_list_remove().

◆ sdp_message_m_payload_get()

char* sdp_message_m_payload_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Get one of the payload number ('m' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
posThe i th payload element.

References sdp_message::m_medias, sdp_media::m_payloads, and osip_list_get().

◆ sdp_message_m_port_get()

char* sdp_message_m_port_get ( sdp_message_t sdp,
int  pos_media 
)

Get the port number ('m' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.

References sdp_message::m_medias, sdp_media::m_port, and osip_list_get().

◆ sdp_message_m_port_set()

int sdp_message_m_port_set ( sdp_message_t sdp,
int  pos_media,
char *  port 
)

Set the port number ('m' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.
portThe new port to set (must be allocated with osip_malloc)

References sdp_message::m_medias, sdp_media::m_port, and osip_list_get().

◆ sdp_message_m_proto_get()

char* sdp_message_m_proto_get ( sdp_message_t sdp,
int  pos_media 
)

Get the protocol ('m' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_mediaThe line number.

References sdp_message::m_medias, sdp_media::m_proto, and osip_list_get().

◆ sdp_message_o_addr_get()

char* sdp_message_o_addr_get ( sdp_message_t sdp)

Get the addr ('o' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::o_addr.

◆ sdp_message_o_addrtype_get()

char* sdp_message_o_addrtype_get ( sdp_message_t sdp)

Get the addrtype ('o' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::o_addrtype.

◆ sdp_message_o_nettype_get()

char* sdp_message_o_nettype_get ( sdp_message_t sdp)

Get the nettype ('o' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::o_nettype.

◆ sdp_message_o_origin_set()

int sdp_message_o_origin_set ( sdp_message_t sdp,
char *  username,
char *  sess_id,
char *  sess_version,
char *  nettype,
char *  addrtype,
char *  addr 
)

Set the origin field in a SDP packet.

Parameters
sdpThe element to work on.
usernameThe token value.
sess_idThe token value.
sess_versionThe token value.
nettypeThe token value.
addrtypeThe token value.
addrThe token value.

References sdp_message::o_addr, sdp_message::o_addrtype, sdp_message::o_nettype, sdp_message::o_sess_id, sdp_message::o_sess_version, and sdp_message::o_username.

◆ sdp_message_o_sess_id_get()

char* sdp_message_o_sess_id_get ( sdp_message_t sdp)

Get the session id ('o' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::o_sess_id.

◆ sdp_message_o_sess_version_get()

char* sdp_message_o_sess_version_get ( sdp_message_t sdp)

Get the session version ('o' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::o_sess_version.

◆ sdp_message_o_username_get()

char* sdp_message_o_username_get ( sdp_message_t sdp)

Get the username ('o' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::o_username.

◆ sdp_message_p_phone_add()

int sdp_message_p_phone_add ( sdp_message_t sdp,
char *  value 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
valueThe token value.

References osip_list_add(), and sdp_message::p_phones.

◆ sdp_message_p_phone_get()

char* sdp_message_p_phone_get ( sdp_message_t sdp,
int  pos 
)

Get one of the phone ('p' field) of a SDP packet.

Parameters
sdpThe element to work on.
posthe index of the phone line.

References osip_list_get(), osip_list_size(), and sdp_message::p_phones.

◆ sdp_message_parse()

int sdp_message_parse ( sdp_message_t sdp,
const char *  buf 
)

Parse a SDP packet.

Parameters
sdpThe element to work on.
bufThe buffer to parse.

References sdp_message::e_emails, osip_list_size(), sdp_message::p_phones, and sdp_message::s_name.

Referenced by sdp_message_clone().

◆ sdp_message_r_repeat_add()

int sdp_message_r_repeat_add ( sdp_message_t sdp,
int  pos_time_descr,
char *  value 
)

Set the repeat information ('r' field) in a SDP packet.

Parameters
sdpThe element to work on.
pos_time_descrindex of t field.
valueThe token value.

References osip_list_add(), osip_list_get(), sdp_time_descr::r_repeats, and sdp_message::t_descrs.

◆ sdp_message_r_repeat_get()

char* sdp_message_r_repeat_get ( sdp_message_t sdp,
int  pos_time_descr,
int  pos_repeat 
)

Get the repeat information ('r' field) in a SDP packet.

Parameters
sdpThe element to work on.
pos_time_descrindex of t field.
pos_repeatindex of element in the 'r' field.

References osip_list_get(), sdp_time_descr::r_repeats, and sdp_message::t_descrs.

◆ sdp_message_s_name_get()

char* sdp_message_s_name_get ( sdp_message_t sdp)

Get the session name ('s' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::s_name.

◆ sdp_message_s_name_set()

int sdp_message_s_name_set ( sdp_message_t sdp,
char *  value 
)

Set the session name in a SDP packet.

Parameters
sdpThe element to work on.
valueThe token value.

References sdp_message::s_name.

◆ sdp_message_t_start_time_get()

char* sdp_message_t_start_time_get ( sdp_message_t sdp,
int  pos_td 
)

Get the start time value ('t' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_tdThe time description line number.

References osip_list_get(), sdp_message::t_descrs, and sdp_time_descr::t_start_time.

◆ sdp_message_t_stop_time_get()

char* sdp_message_t_stop_time_get ( sdp_message_t sdp,
int  pos_td 
)

Get the stop time value ('t' field) of a SDP packet.

Parameters
sdpThe element to work on.
pos_tdThe time description line number.

References osip_list_get(), sdp_message::t_descrs, and sdp_time_descr::t_stop_time.

◆ sdp_message_t_time_descr_add()

int sdp_message_t_time_descr_add ( sdp_message_t sdp,
char *  start,
char *  stop 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
startThe token value.
stopThe token value.

References osip_list_add(), sdp_time_descr_init(), sdp_message::t_descrs, sdp_time_descr::t_start_time, and sdp_time_descr::t_stop_time.

◆ sdp_message_to_str()

int sdp_message_to_str ( sdp_message_t sdp,
char **  dest 
)

◆ sdp_message_u_uri_get()

char* sdp_message_u_uri_get ( sdp_message_t sdp)

Get the uri ('u' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::u_uri.

◆ sdp_message_u_uri_set()

int sdp_message_u_uri_set ( sdp_message_t sdp,
char *  value 
)

Set the session info in a SDP packet.

Parameters
sdpThe element to work on.
valueThe token value.

References sdp_message::u_uri.

◆ sdp_message_v_version_get()

char* sdp_message_v_version_get ( sdp_message_t sdp)

Get the version ('v' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::v_version.

◆ sdp_message_v_version_set()

int sdp_message_v_version_set ( sdp_message_t sdp,
char *  value 
)

Set the version in a SDP packet.

Parameters
sdpThe element to work on.
valueThe token value.

References sdp_message::v_version.

◆ sdp_message_z_adjustments_get()

char* sdp_message_z_adjustments_get ( sdp_message_t sdp)

Get the adjustments ('z' field) of a SDP packet.

Parameters
sdpThe element to work on.

References sdp_message::z_adjustments.

◆ sdp_message_z_adjustments_set()

int sdp_message_z_adjustments_set ( sdp_message_t sdp,
char *  value 
)

Set the adjustments ('z' field) of a SDP packet.

Parameters
sdpThe element to work on.
valueThe token value.

References sdp_message::z_adjustments.

◆ sdp_time_descr_free()

void sdp_time_descr_free ( sdp_time_descr_t elem)

Free a time description element.

Parameters
elemThe element to work on.

References osip_list_ofchar_free(), sdp_time_descr::r_repeats, sdp_time_descr::t_start_time, and sdp_time_descr::t_stop_time.

Referenced by sdp_message_free(), and sdp_message_init().

◆ sdp_time_descr_init()

int sdp_time_descr_init ( sdp_time_descr_t **  elem)

Allocate a time description element.

Parameters
elemThe element to work on.

References osip_list_init().

Referenced by sdp_message_t_time_descr_add().