Liblinphone  5.5.0
Linphone.Address Class Reference
Inheritance diagram for Linphone.Address:
Linphone.LinphoneObject

Public Member Functions

string AsString ()
 
string AsStringUriOnly ()
 
string AsStringUriOnlyOrdered ()
 
void Clean ()
 
Linphone.Address Clone ()
 
bool Equal (Linphone.Address address2)
 
string GetHeader (string headerName)
 
string GetParam (string paramName)
 
string GetUriParam (string uriParamName)
 
bool HasParam (string paramName)
 
bool HasUriParam (string uriParamName)
 
bool Lesser (Linphone.Address other)
 
void RemoveUriParam (string uriParamName)
 
void SetHeader (string headerName, string headerValue)
 
void SetParam (string paramName, string paramValue)
 
void SetUriParam (string uriParamName, string uriParamValue)
 
bool WeakEqual (Linphone.Address address2)
 

Properties

string DisplayName [get, set]
 
string Domain [get, set]
 
bool IsSip [get]
 
bool IsValid [get]
 
string MethodParam [get, set]
 
string Password [get, set]
 
int Port [get, set]
 
string Scheme [get]
 
bool Secure [get, set]
 
Linphone.TransportType Transport [get, set]
 
string UriParams [set]
 
string Username [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from Linphone.LinphoneObject
static String linphone_pointer_to_string (IntPtr ptr)
 
static IntPtr linphone_string_to_pointer ([MarshalAs(LinphoneWrapper.ByteStringMarshalling)] String str)
 
IntPtr StringArrayToBctbxList (IEnumerable< string > stringlist)
 
void CleanStringArrayPtrs (IntPtr l)
 

Detailed Description

Object that represents a parsed SIP address.

A SIP address is made of display name, username, domain name, port, and various uri headers (such as tags). It looks like 'Alice <sip:alice.nosp@m.@exa.nosp@m.mple..nosp@m.net>'. A SIP address is made of display name, username, domain name, port, and various uri headers (such as tags). It looks like 'Alice <sip:alice.nosp@m.@exa.nosp@m.mple..nosp@m.net>'. You can create an address using Linphone.Factory.CreateAddress() or Linphone.Core.InterpretUrl() and both will return a null object if it doesn't match the grammar defined by the standard. This object is used in almost every other major objects to identity people (including yourself) & servers. The Linphone.Address has methods to extract and manipulate all parts of the address.

Member Function Documentation

string Linphone.Address.AsString ( )
inline

Returns the address as a string.

The returned char * must be freed by the application. Use ms_free().

Returns
a string representation of the address.
string Linphone.Address.AsStringUriOnly ( )
inline

Returns the SIP uri only as a string, that is display name is removed.

The returned char * must be freed by the application. Use ms_free().

Returns
a string representation of the address.
string Linphone.Address.AsStringUriOnlyOrdered ( )
inline

Returns the SIP uri only as a string, that is display name is removed.

This function always returns a string whose URI parameters has a constant order allowing to easily compute hashes for example. The returned char * must be freed by the application. Use ms_free().

Returns
a string representation of the address.
void Linphone.Address.Clean ( )
inline

Removes address's tags and uri headers so that it is displayable to the user.

Linphone.Address Linphone.Address.Clone ( )
inline

Clones a Linphone.Address object.

Returns
a new Linphone.Address object.
bool Linphone.Address.Equal ( Linphone.Address  address2)
inline

Compare two Linphone.Address taking the tags and headers into account.

Parameters
address2Linphone.Address object.
Returns
Boolean value telling if the Linphone.Address objects are equal.

See : Linphone.Address.WeakEqual()

string Linphone.Address.GetHeader ( string  headerName)
inline

Get the header encoded in the address.

Parameters
headerNamethe header name.
Returns
the header value or null if it doesn't exists.
string Linphone.Address.GetParam ( string  paramName)
inline

Get the value of a parameter of the address.

Parameters
paramNameThe name of the parameter.
Returns
The value of the parameter or null if it doesn't exists.
string Linphone.Address.GetUriParam ( string  uriParamName)
inline

Get the value of a parameter of the URI of the address.

Parameters
uriParamNameThe name of the parameter.
Returns
The value of the parameter or null if it doesn't exists.
bool Linphone.Address.HasParam ( string  paramName)
inline

Tell whether a parameter is present in the address.

Parameters
paramNameThe name of the parameter.
Returns
A boolean value telling whether the parameter is present in the address
bool Linphone.Address.HasUriParam ( string  uriParamName)
inline

Tell whether a parameter is present in the URI of the address.

Parameters
uriParamNameThe name of the parameter.
Returns
A boolean value telling whether the parameter is present in the URI of the address
bool Linphone.Address.Lesser ( Linphone.Address  other)
inline

Compare two addresses.

Parameters
otheran other Linphone.Address object.
void Linphone.Address.RemoveUriParam ( string  uriParamName)
inline

Removes the value of a parameter of the URI of the address.

Parameters
uriParamNameThe name of the parameter.
void Linphone.Address.SetHeader ( string  headerName,
string  headerValue 
)
inline

Set a header into the address.

Headers appear in the URI with '?', such as <sip:test@.nosp@m.linp.nosp@m.hone..nosp@m.org?SomeHeader=SomeValue>. Headers appear in the URI with '?', such as <sip:test@.nosp@m.linp.nosp@m.hone..nosp@m.org?SomeHeader=SomeValue>.

Parameters
headerNamethe header name.
headerValuethe header value.
void Linphone.Address.SetParam ( string  paramName,
string  paramValue 
)
inline

Set the value of a parameter of the address.

Parameters
paramNameThe name of the parameter.
paramValueThe new value of the parameter.
void Linphone.Address.SetUriParam ( string  uriParamName,
string  uriParamValue 
)
inline

Set the value of a parameter of the URI of the address.

Parameters
uriParamNameThe name of the parameter.
uriParamValueThe new value of the parameter.
bool Linphone.Address.WeakEqual ( Linphone.Address  address2)
inline

Compare two Linphone.Address ignoring tags and headers, basically just domain, username, and port.

Parameters
address2Linphone.Address object.
Returns
Boolean value telling if the Linphone.Address objects are equal.

See : Linphone.Address.Equal()

Property Documentation

string Linphone.Address.DisplayName
getset

Returns the display name.

Returns
the display name if any, null otherwise.
string Linphone.Address.Domain
getset

Returns the domain name.

Returns
the domain name if any, null otherwise.
bool Linphone.Address.IsSip
get

returns whether the address is a routable SIP address or not

Returns
true if it is a routable SIP address, false otherwise
bool Linphone.Address.IsValid
get

Returns if address is valid.

Returns
true is the address is valid, false otherwise
string Linphone.Address.MethodParam
getset

Get the value of the method parameter.

Returns
the value of the parameter or null.
string Linphone.Address.Password
getset

Get the password encoded in the address.

It is used for basic authentication (not recommended).

Returns
the password if any, null otherwise.
int Linphone.Address.Port
getset

Get port number as an integer value, 0 if not present.

Returns
the port set in the address or 0 if not present.
string Linphone.Address.Scheme
get

Returns the address scheme, normally "sip".

Returns
the scheme if any, null otherwise.
bool Linphone.Address.Secure
getset

Returns whether the address refers to a secure location (sips) or not.

Returns
true if address refers to a secure location, false otherwise
Linphone.TransportType Linphone.Address.Transport
getset

Get the transport.

Returns
a Linphone.TransportType, default value if not set is UDP.
string Linphone.Address.UriParams
set

Set the value of the parameters of the URI of the address.

Parameters
parametersThe parameters string
string Linphone.Address.Username
getset

Returns the username.

Returns
the username name if any, null otherwise.

The documentation for this class was generated from the following file: