Class: SDPMessage
Syntax:
set p [new SDPMessage]
Description:
The SDPMessage class contains state associated with a single SDP message. This class is generally used in conjunction with the SDPParser class which breaks up a single SDP announcement into SDP message components. Each SDPMessage object contains a list of SDPMedia and SDPTime objects which contain the media and time descriptions for the message respectively.
Methods
have_field $field
returns 0 or 1 depending on whether field $field was present in the announcement, e.g., 'c', 'v', 'k', etc.
field_value $field
returns the value of the field $field, empty if it doesn't exist.
have_attr $a
return 0 of 1 depending on whether attr $a exists in the message.
attr_value $a
returns the value of attr a. If attribute $a does not exist it returns an empty list.
attributes
returns a list of all attributes defined in the message.
media $type
returns a list of all media objects for media type $type.
Exported Instance Variables
Each SDPMessage object contains instance variables for the various values in the SDP fields which can then be queried. The following is the breakdown as would appear in the announcement.
Each SDPMessage contains the following instance variables (if defined):
v=version_
o=creator_ createtime_ modtime_ nettype_ addrtype_ createaddr_
s=session_name_
i=session_info_
p=phonelist_
e=emaillist_
u=uri_
c=nettype_ addrtype_ caddr_
b=bwmod_:bwval_
z=zoneinfo_
k=crypt_method_:crypt_key_
The zoneinfo_ variable contains a list of (adjustment time,offset) pairs. The alltimedes_ instvar contains the list of SDPTime objects for the message.
The allmedia_ instvar contains a list of SDPMedia objects which contain information about the media records in the SDP announcement.
Related Objects
SDPParser, SDPMedia, SDPTime,