Module contact_param

This module handles contact-params for a single contact header entry (sip/sips uri).

Introduced in: 09 Sep 2004 by Håkan Stenholm <hsten@it.su.se>

Authors: Håkan Stenholm (hsten@it.su.se).

Description

This module handles contact-params for a single contact header entry (sip/sips uri).

Note: keys and values are currently stored as strings but pattern matching and list:keysearch will be faster if standard values are represented as atoms (but don't turn them all into atoms - as atoms aren't GCed)

Function Index

add/3 Add new entry or replace old entry in contact_param.
find/2 Retrieve the value of Key if it is present in ContactParam.
remove/2 Find the Key-Val pair to remove from ContactParam.
to_list/1 Returns a normalized form of the parameters.
to_norm/1 Convert a contact-parameter list to a normalized (a case insensitive form) form.
to_string/1 Return a raw contact-parameter string.

Function Details

add/3

add(ContactParam, Key, Value) -> #contact_param{}

Add new entry or replace old entry in contact_param. Key and Value are stored in a case insensitive manner.

find/2

find(ContactParam, Key) -> [string()] | []

Retrieve the value of Key if it is present in ContactParam.

remove/2

remove(ContactParam, Key) -> #contact_param{}

Find the Key-Val pair to remove from ContactParam.

to_list/1

to_list(Norm) -> [{Key, Val}]

Returns a normalized form of the parameters.

to_norm/1

to_norm(Params) -> #contact_param{}

throws {error, duplicate_key}

Convert a contact-parameter list to a normalized (a case insensitive form) form. Throws an error if Name component is already present in Params.

to_string/1

to_string(Norm) -> string()

returns: in the ";name=val;..." format

Return a raw contact-parameter string.


Generated by EDoc, Oct 17 2007, 16:48:23.