View Source ExSDP (ExSDP v0.14.1)

This module represents the SDP Session.

Its fields directly correspond to those defined in RFC4566



@type t() :: %ExSDP{
  attributes: [ExSDP.Attribute.t()],
  bandwidth: [ExSDP.Bandwidth.t()],
  connection_data: ExSDP.ConnectionData.t() | nil,
  email: binary() | nil,
  encryption: ExSDP.Encryption.t() | nil,
  media: [ExSDP.Media.t()],
  origin: ExSDP.Origin.t(),
  phone_number: binary() | nil,
  session_information: binary() | nil,
  session_name: binary(),
  time_repeats: [ExSDP.RepeatTimes.t()],
  time_zones_adjustments: ExSDP.Timezone.t() | nil,
  timing: ExSDP.Timing.t() | nil,
  uri: binary() | nil,
  version: non_neg_integer()


Link to this function

add_attribute(sdp_or_media, attribute)

View Source
@spec add_attribute(t() | ExSDP.Media.t(), ExSDP.Attribute.t()) ::
  t() | ExSDP.Media.t()
Link to this function

add_attributes(sdp_or_media, attributes)

View Source
@spec add_attributes(t() | ExSDP.Media.t(), [ExSDP.Attribute.t()]) ::
  t() | ExSDP.Media.t()
@spec add_media(t(), ExSDP.Media.t() | [ExSDP.Media.t()]) :: t() | ExSDP.Media.t()
Link to this function

delete_attribute(sdp_or_media, key)

View Source
@spec delete_attribute(t() | ExSDP.Media.t(), ExSDP.Attribute.key()) ::
  t() | ExSDP.Media.t()
Link to this function

delete_attributes(sdp_or_media, keys)

View Source
@spec delete_attributes(t() | ExSDP.Media.t(), [ExSDP.Attribute.key()]) ::
  t() | ExSDP.Media.t()
Link to this function

get_attribute(sdp_or_media, key)

View Source
@spec get_attribute(t() | ExSDP.Media.t(), ExSDP.Attribute.key()) ::
  ExSDP.Attribute.t() | nil
Link to this function

get_attributes(sdp_or_media, key)

View Source
@spec get_attributes(t() | ExSDP.Media.t(), ExSDP.Attribute.key()) :: [
@spec new(
  version: non_neg_integer(),
  username: binary(),
  session_id: integer(),
  session_version: integer(),
  address: ExSDP.Address.t(),
  session_name: binary()
) :: t()

Returns new sdp struct.

By default:

  • version is 0
  • username, session_id, session_version and address - refer to
  • session_name is -

See ExSDP.Parser.parse/1.

See ExSDP.Parser.parse!/1.