sdp_message.h File Reference

SDP accessor and parser related API in oSIP library. More...

#include "osip_list.h"

Include dependency graph for sdp_message.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

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

Defines

#define BODY_MESSAGE_MAX_SIZE   4000
#define sdp_e_email_get   sdp_message_e_email_get

Typedefs

typedef sdp_bandwidth sdp_bandwidth_t
typedef sdp_time_descr sdp_time_descr_t
typedef sdp_key sdp_key_t
typedef sdp_attribute sdp_attribute_t
typedef sdp_connection sdp_connection_t
typedef sdp_media sdp_media_t
typedef 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)
sdp_connection_tsdp_message_connection_get (sdp_message_t *sdp, int pos_media, int pos)
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

SDP accessor and parser related API in oSIP library.

Author
peltotal
Date
2006/12/27 14:58:20
Revision
1.3

The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-) Copyright (C) 2001,2002,2003,2004 Aymeric MOIZARD jack@atosc.org

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition in file sdp_message.h.


Define Documentation

#define BODY_MESSAGE_MAX_SIZE   4000

You can define the maximum length for a body inside a SIP message.

Definition at line 36 of file sdp_message.h.

Referenced by sdp_message_to_str().

#define sdp_e_email_get   sdp_message_e_email_get

OBSOLETE: see sdp_message_e_email_get

Definition at line 383 of file sdp_message.h.


Typedef Documentation

sdp_attribute_t

Structure for referencing an attribute header.

Definition at line 130 of file sdp_message.h.

sdp_bandwidth_t

Structure for referencing bandwidth header.

Definition at line 48 of file sdp_message.h.

sdp_connection_t

Structure for referencing a connection header.

Definition at line 158 of file sdp_message.h.

sdp_key_t

Structure for referencing key header.

Definition at line 103 of file sdp_message.h.

sdp_media_t

Structure for referencing a media header.

Definition at line 188 of file sdp_message.h.

sdp_message_t

Structure for referencing a SDP packet.

Definition at line 224 of file sdp_message.h.

sdp_time_descr_t

Structure for referencing time description header.

Definition at line 75 of file sdp_message.h.


Function Documentation

void sdp_attribute_free ( sdp_attribute_t elem  ) 

Free a attribute element.

Parameters:
elem The element to work on.

Definition at line 141 of file sdp_message.c.

References sdp_attribute::a_att_field, sdp_attribute::a_att_value, and osip_free.

Referenced by sdp_media_free(), sdp_message_a_attribute_del(), sdp_message_a_attribute_del_at_index(), sdp_message_free(), and sdp_message_parse_a().

Here is the caller graph for this function:

int sdp_attribute_init ( sdp_attribute_t **  elem  ) 

Allocate an attribute element.

Parameters:
elem The element to work on.

Definition at line 130 of file sdp_message.c.

References osip_malloc.

Referenced by sdp_message_a_attribute_add(), and sdp_message_parse_a().

Here is the caller graph for this function:

void sdp_bandwidth_free ( sdp_bandwidth_t elem  ) 

Free a bandwidth element.

Parameters:
elem The element to work on.

Definition at line 75 of file sdp_message.c.

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

Referenced by sdp_media_free(), sdp_message_free(), and sdp_message_parse_b().

Here is the caller graph for this function:

int sdp_bandwidth_init ( sdp_bandwidth_t **  elem  ) 

Allocate a bandwidth element.

Parameters:
elem The element to work on.

Definition at line 64 of file sdp_message.c.

References osip_malloc.

Referenced by sdp_message_b_bandwidth_add(), and sdp_message_parse_b().

Here is the caller graph for this function:

void sdp_connection_free ( sdp_connection_t elem  ) 

Free a connection element.

Parameters:
elem The element to work on.

Definition at line 165 of file sdp_message.c.

References sdp_connection::c_addr, sdp_connection::c_addr_multicast_int, sdp_connection::c_addr_multicast_ttl, sdp_connection::c_addrtype, sdp_connection::c_nettype, and osip_free.

Referenced by sdp_media_free(), sdp_message_free(), and sdp_message_parse_c().

Here is the caller graph for this function:

int sdp_connection_init ( sdp_connection_t **  elem  ) 

Allocate a connection element.

Parameters:
elem The element to work on.

Definition at line 151 of file sdp_message.c.

References osip_malloc.

Referenced by sdp_message_c_connection_add(), and sdp_message_parse_c().

Here is the caller graph for this function:

void sdp_key_free ( sdp_key_t elem  ) 

Free a key element.

Parameters:
elem The element to work on.

Definition at line 120 of file sdp_message.c.

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

Referenced by sdp_media_free(), sdp_message_free(), and sdp_message_parse_k().

Here is the caller graph for this function:

int sdp_key_init ( sdp_key_t **  elem  ) 

Allocate a key element.

Parameters:
elem The element to work on.

Definition at line 109 of file sdp_message.c.

References osip_malloc.

Referenced by sdp_message_k_key_set(), and sdp_message_parse_k().

Here is the caller graph for this function:

void sdp_media_free ( sdp_media_t elem  ) 

Free a media element.

Parameters:
elem The element to work on.

Definition at line 201 of file sdp_message.c.

References sdp_media::a_attributes, sdp_media::b_bandwidths, sdp_media::c_connections, sdp_media::i_info, sdp_media::k_key, sdp_media::m_media, sdp_media::m_number_of_port, sdp_media::m_payloads, sdp_media::m_port, sdp_media::m_proto, osip_free, osip_list_ofchar_free(), osip_list_special_free(), sdp_attribute_free(), sdp_bandwidth_free(), sdp_connection_free(), and sdp_key_free().

Referenced by sdp_message_free(), and sdp_message_parse_m().

Here is the call graph for this function:

Here is the caller graph for this function:

int sdp_media_init ( sdp_media_t **  elem  ) 

Allocate a media element.

Parameters:
elem The element to work on.

Definition at line 178 of file sdp_message.c.

References osip_list_init(), and osip_malloc.

Referenced by sdp_message_m_media_add(), and sdp_message_parse_m().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The attribute line number.

Definition at line 673 of file sdp_accessor.c.

References sdp_attribute::a_att_field, and sdp_message_attribute_get().

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The attribute line number.

Definition at line 683 of file sdp_accessor.c.

References sdp_attribute::a_att_value, and sdp_message_attribute_get().

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The line number.
att_field The token value.
att_value The token value.

Definition at line 533 of file sdp_accessor.c.

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().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The line number.
att_field The value to remove.

Definition at line 560 of file sdp_accessor.c.

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().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The line number.
att_field The value to remove.
pos_attr The index of attribute to remove.

Definition at line 601 of file sdp_accessor.c.

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().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The attribute line number.

Definition at line 658 of file sdp_accessor.c.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
bwtype The token value.
bandwidth The token value.

Definition at line 318 of file sdp_accessor.c.

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().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the bandwidth element list..

Definition at line 370 of file sdp_accessor.c.

References sdp_bandwidth::b_bandwidth, and sdp_message_bandwidth_get().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the bandwidth element list..

Definition at line 360 of file sdp_accessor.c.

References sdp_bandwidth::b_bwtype, and sdp_message_bandwidth_get().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the bandwidth element list..

Definition at line 345 of file sdp_accessor.c.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the connection element list..

Definition at line 288 of file sdp_accessor.c.

References sdp_connection::c_addr, and sdp_message_connection_get().

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the connection element list..

Definition at line 308 of file sdp_accessor.c.

References sdp_connection::c_addr_multicast_int, and sdp_message_connection_get().

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the connection element list..

Definition at line 298 of file sdp_accessor.c.

References sdp_connection::c_addr_multicast_ttl, and sdp_message_connection_get().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the connection element list..

Definition at line 278 of file sdp_accessor.c.

References sdp_connection::c_addrtype, and sdp_message_connection_get().

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
nettype The token value.
addrtype The token value.
addr The token value.
addr_multicast_ttl The token value.
addr_multicast_int The token value.

Definition at line 220 of file sdp_accessor.c.

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().

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The media line number.
pos The index in the connection element list..

Definition at line 268 of file sdp_accessor.c.

References sdp_connection::c_nettype, and sdp_message_connection_get().

Here is the call graph for this function:

int sdp_message_clone ( sdp_message_t sdp,
sdp_message_t **  dest 
)

Clone a SDP packet.

Parameters:
sdp The element to work on.
dest The cloned element.

Definition at line 2086 of file sdp_message.c.

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

Here is the call graph for this function:

sdp_connection_t* sdp_message_connection_get ( sdp_message_t sdp,
int  pos_media,
int  pos 
)

Definition at line 253 of file sdp_accessor.c.

References sdp_message::c_connection, sdp_media::c_connections, sdp_message::m_medias, and osip_list_get().

Referenced by sdp_message_c_addr_get(), sdp_message_c_addr_multicast_int_get(), sdp_message_c_addr_multicast_ttl_get(), sdp_message_c_addrtype_get(), and sdp_message_c_nettype_get().

Here is the call graph for this function:

Here is the caller graph for this function:

int sdp_message_e_email_add ( sdp_message_t sdp,
char *  value 
)

Set the version in a SDP packet.

Parameters:
sdp The element to work on.
value The token value.

Definition at line 182 of file sdp_accessor.c.

References sdp_message::e_emails, and osip_list_add().

Here is the call graph for this function:

char* sdp_message_e_email_get ( sdp_message_t sdp,
int  pos 
)

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

Parameters:
sdp The element to work on.
pos the index of the email line.

Definition at line 191 of file sdp_accessor.c.

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

Here is the call graph for this function:

int sdp_message_endof_media ( sdp_message_t sdp,
int  pos 
)

Check if there is more media lines a SDP packet.

Parameters:
sdp The element to work on.
pos The attribute line number.

Definition at line 693 of file sdp_accessor.c.

References sdp_message::m_medias, and osip_list_eol().

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

void sdp_message_free ( sdp_message_t sdp  ) 

Free a SDP packet.

Parameters:
sdp The element to work on.

Definition at line 2048 of file sdp_message.c.

References sdp_message::a_attributes, sdp_message::b_bandwidths, sdp_message::c_connection, sdp_message::e_emails, sdp_message::i_info, sdp_message::k_key, sdp_message::m_medias, sdp_message::o_addr, sdp_message::o_addrtype, sdp_message::o_nettype, sdp_message::o_sess_id, sdp_message::o_sess_version, sdp_message::o_username, osip_free, osip_list_ofchar_free(), osip_list_special_free(), sdp_message::p_phones, sdp_message::s_name, sdp_attribute_free(), sdp_bandwidth_free(), sdp_connection_free(), sdp_key_free(), sdp_media_free(), sdp_time_descr_free(), sdp_message::t_descrs, sdp_message::u_uri, sdp_message::v_version, and sdp_message::z_adjustments.

Referenced by flute_file_repair(), free_args(), sdp_message_clone(), and shut_down_flute().

Here is the call graph for this function:

Here is the caller graph for this function:

char* sdp_message_i_info_get ( sdp_message_t sdp,
int  pos_media 
)

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

Parameters:
sdp The element to work on.
pos_media The media line number.

Definition at line 148 of file sdp_accessor.c.

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

Here is the call graph for this function:

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

Set the version in a SDP packet.

Parameters:
sdp The element to work on.
pos_media The media line number.
value The token value.

Definition at line 129 of file sdp_accessor.c.

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

Here is the call graph for this function:

int sdp_message_init ( sdp_message_t **  sdp  ) 

Allocate a SDP packet.

Parameters:
sdp The element to work on.

Definition at line 223 of file sdp_message.c.

References osip_list_init(), and osip_malloc.

Referenced by parse_sdp_file(), and sdp_message_clone().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media index of m field.
keytype The token value.
keydata The token value.

Definition at line 467 of file sdp_accessor.c.

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().

Here is the call graph for this function:

char* sdp_message_k_keydata_get ( sdp_message_t sdp,
int  pos_media 
)

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

Parameters:
sdp The element to work on.
pos_media The media line number.

Definition at line 512 of file sdp_accessor.c.

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

Here is the call graph for this function:

char* sdp_message_k_keytype_get ( sdp_message_t sdp,
int  pos_media 
)

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

Parameters:
sdp The element to work on.
pos_media The media line number.

Definition at line 491 of file sdp_accessor.c.

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

Here is the call graph for this function:

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:
sdp The element to work on.
media The token value.
port The token value.
number_of_port The token value.
proto The token value.

Definition at line 705 of file sdp_accessor.c.

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().

Here is the call graph for this function:

char* sdp_message_m_media_get ( sdp_message_t sdp,
int  pos_media 
)

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

Parameters:
sdp The element to work on.
pos_media The line number.

Definition at line 723 of file sdp_accessor.c.

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

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The line number.

Definition at line 743 of file sdp_accessor.c.

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

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Set the payload in a SDP packet.

Parameters:
sdp The element to work on.
pos_media The line number.
payload The token value.

Definition at line 776 of file sdp_accessor.c.

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

Here is the call graph for this function:

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

Remove a payload in a SDP packet.

Parameters:
sdp The element to work on.
pos_media The line number.
pos The position of the payload in the media line.

Definition at line 797 of file sdp_accessor.c.

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

Here is the call graph for this function:

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:
sdp The element to work on.
pos_media The line number.
pos The i th payload element.

Definition at line 787 of file sdp_accessor.c.

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

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

char* sdp_message_m_port_get ( sdp_message_t sdp,
int  pos_media 
)

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

Parameters:
sdp The element to work on.
pos_media The line number.

Definition at line 733 of file sdp_accessor.c.

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

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_media The line number.
port The new port to set (must be allocated with osip_malloc)

Definition at line 753 of file sdp_accessor.c.

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

Here is the call graph for this function:

char* sdp_message_m_proto_get ( sdp_message_t sdp,
int  pos_media 
)

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

Parameters:
sdp The element to work on.
pos_media The line number.

Definition at line 766 of file sdp_accessor.c.

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

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

char* sdp_message_o_addr_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 104 of file sdp_accessor.c.

References sdp_message::o_addr.

char* sdp_message_o_addrtype_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 96 of file sdp_accessor.c.

References sdp_message::o_addrtype.

char* sdp_message_o_nettype_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 88 of file sdp_accessor.c.

References sdp_message::o_nettype.

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:
sdp The element to work on.
username The token value.
sess_id The token value.
sess_version The token value.
nettype The token value.
addrtype The token value.
addr The token value.

Definition at line 48 of file sdp_accessor.c.

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.

char* sdp_message_o_sess_id_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 72 of file sdp_accessor.c.

References sdp_message::o_sess_id.

char* sdp_message_o_sess_version_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 80 of file sdp_accessor.c.

References sdp_message::o_sess_version.

char* sdp_message_o_username_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 64 of file sdp_accessor.c.

References sdp_message::o_username.

int sdp_message_p_phone_add ( sdp_message_t sdp,
char *  value 
)

Set the version in a SDP packet.

Parameters:
sdp The element to work on.
value The token value.

Definition at line 201 of file sdp_accessor.c.

References osip_list_add(), and sdp_message::p_phones.

Here is the call graph for this function:

char* sdp_message_p_phone_get ( sdp_message_t sdp,
int  pos 
)

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

Parameters:
sdp The element to work on.
pos the index of the phone line.

Definition at line 210 of file sdp_accessor.c.

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

Here is the call graph for this function:

int sdp_message_parse ( sdp_message_t sdp,
const char *  buf 
)

Parse a SDP packet.

Parameters:
sdp The element to work on.
buf The buffer to parse.

Definition at line 1364 of file sdp_message.c.

References sdp_message::e_emails, ERR_DISCARD, OSIP_INFO4, osip_list_size(), osip_trace(), OSIP_TRACE, sdp_message::p_phones, sdp_message_parse_a(), sdp_message_parse_b(), sdp_message_parse_c(), sdp_message_parse_e(), sdp_message_parse_i(), sdp_message_parse_k(), sdp_message_parse_m(), sdp_message_parse_o(), sdp_message_parse_p(), sdp_message_parse_r(), sdp_message_parse_s(), sdp_message_parse_t(), sdp_message_parse_u(), sdp_message_parse_v(), and sdp_message_parse_z().

Referenced by parse_sdp_file(), and sdp_message_clone().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_time_descr index of t field.
value The token value.

Definition at line 423 of file sdp_accessor.c.

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

Here is the call graph for this function:

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:
sdp The element to work on.
pos_time_descr index of t field.
pos_repeat index of element in the 'r' field.

Definition at line 437 of file sdp_accessor.c.

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

Here is the call graph for this function:

char* sdp_message_s_name_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 121 of file sdp_accessor.c.

References sdp_message::s_name.

int sdp_message_s_name_set ( sdp_message_t sdp,
char *  value 
)

Set the session name in a SDP packet.

Parameters:
sdp The element to work on.
value The token value.

Definition at line 112 of file sdp_accessor.c.

References sdp_message::s_name.

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:
sdp The element to work on.
pos_td The time description line number.

Definition at line 397 of file sdp_accessor.c.

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

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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:
sdp The element to work on.
pos_td The time description line number.

Definition at line 410 of file sdp_accessor.c.

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

Referenced by parse_sdp_file().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Set the version in a SDP packet.

Parameters:
sdp The element to work on.
start The token value.
stop The token value.

Definition at line 380 of file sdp_accessor.c.

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.

Here is the call graph for this function:

int sdp_message_to_str ( sdp_message_t sdp,
char **  dest 
)

Get a string representation of a SDP packet.

Parameters:
sdp The element to work on.
dest The resulting new allocated buffer.

Definition at line 1858 of file sdp_message.c.

References __osip_sdp_append_string(), sdp_message::a_attributes, sdp_message::b_bandwidths, BODY_MESSAGE_MAX_SIZE, sdp_message::c_connection, CRLF, sdp_message::e_emails, sdp_message::i_info, sdp_message::k_key, sdp_message::m_medias, sdp_message::o_addr, sdp_message::o_addrtype, sdp_message::o_nettype, sdp_message::o_sess_id, sdp_message::o_sess_version, sdp_message::o_username, osip_free, osip_list_eol(), osip_list_get(), osip_malloc, sdp_message::p_phones, sdp_message::s_name, sdp_append_attribute(), sdp_append_bandwidth(), sdp_append_connection(), sdp_append_key(), sdp_append_media(), sdp_append_time_descr(), sdp_message::t_descrs, sdp_message::u_uri, sdp_message::v_version, and sdp_message::z_adjustments.

Referenced by sdp_message_clone().

Here is the call graph for this function:

Here is the caller graph for this function:

char* sdp_message_u_uri_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 174 of file sdp_accessor.c.

References sdp_message::u_uri.

int sdp_message_u_uri_set ( sdp_message_t sdp,
char *  value 
)

Set the session info in a SDP packet.

Parameters:
sdp The element to work on.
value The token value.

Definition at line 165 of file sdp_accessor.c.

References sdp_message::u_uri.

char* sdp_message_v_version_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 40 of file sdp_accessor.c.

References sdp_message::v_version.

int sdp_message_v_version_set ( sdp_message_t sdp,
char *  value 
)

Set the version in a SDP packet.

Parameters:
sdp The element to work on.
value The token value.

Definition at line 31 of file sdp_accessor.c.

References sdp_message::v_version.

char* sdp_message_z_adjustments_get ( sdp_message_t sdp  ) 

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

Parameters:
sdp The element to work on.

Definition at line 459 of file sdp_accessor.c.

References sdp_message::z_adjustments.

int sdp_message_z_adjustments_set ( sdp_message_t sdp,
char *  value 
)

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

Parameters:
sdp The element to work on.
value The token value.

Definition at line 450 of file sdp_accessor.c.

References sdp_message::z_adjustments.

void sdp_time_descr_free ( sdp_time_descr_t elem  ) 

Free a time description element.

Parameters:
elem The element to work on.

Definition at line 98 of file sdp_message.c.

References osip_free, 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_parse_t().

Here is the call graph for this function:

Here is the caller graph for this function:

int sdp_time_descr_init ( sdp_time_descr_t **  elem  ) 

Allocate a time description element.

Parameters:
elem The element to work on.

Definition at line 85 of file sdp_message.c.

References osip_list_init(), and osip_malloc.

Referenced by sdp_message_parse_t(), and sdp_message_t_time_descr_add().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri Mar 9 20:08:59 2007 for MAD-FCL by  doxygen 1.5.0