|
LinphoneAddress * | linphone_address_new (const char *addr) |
|
LinphoneAddress * | linphone_address_clone (const LinphoneAddress *addr) |
|
LinphoneAddress * | linphone_address_ref (LinphoneAddress *addr) |
|
void | linphone_address_unref (LinphoneAddress *addr) |
|
const char * | linphone_address_get_scheme (const LinphoneAddress *u) |
|
const char * | linphone_address_get_display_name (const LinphoneAddress *u) |
|
const char * | linphone_address_get_username (const LinphoneAddress *u) |
|
const char * | linphone_address_get_domain (const LinphoneAddress *u) |
|
void | linphone_address_set_display_name (LinphoneAddress *u, const char *display_name) |
|
void | linphone_address_set_username (LinphoneAddress *uri, const char *username) |
|
void | linphone_address_set_domain (LinphoneAddress *uri, const char *host) |
|
void | linphone_address_set_port (LinphoneAddress *uri, int port) |
|
void | linphone_address_set_transport (LinphoneAddress *uri, LinphoneTransportType tp) |
|
LinphoneTransportType | linphone_address_get_transport (const LinphoneAddress *uri) |
|
void | linphone_address_clean (LinphoneAddress *uri) |
|
char * | linphone_address_as_string (const LinphoneAddress *u) |
|
char * | linphone_address_as_string_uri_only (const LinphoneAddress *u) |
|
bool_t | linphone_address_is_secure (const LinphoneAddress *uri) |
|
bool_t | linphone_address_get_secure (const LinphoneAddress *uri) |
|
void | linphone_address_set_secure (LinphoneAddress *addr, bool_t enabled) |
|
bool_t | linphone_address_is_sip (const LinphoneAddress *uri) |
|
bool_t | linphone_address_weak_equal (const LinphoneAddress *a1, const LinphoneAddress *a2) |
|
bool_t | linphone_address_equal (const LinphoneAddress *a1, const LinphoneAddress *a2) |
|
void | linphone_address_destroy (LinphoneAddress *u) |
|
int | linphone_address_get_port (const LinphoneAddress *u) |
|
void | linphone_address_set_password (LinphoneAddress *addr, const char *passwd) |
|
const char * | linphone_address_get_password (const LinphoneAddress *addr) |
|
void | linphone_address_set_header (LinphoneAddress *addr, const char *header_name, const char *header_value) |
|
LinphoneAddress * | linphone_core_create_address (LinphoneCore *lc, const char *address) |
|
This api is useful for manipulating SIP addresses ('from' or 'to' headers).
◆ LinphoneTransportType
Typedef for transport type enum.
◆ LinphoneAddress
Object that represents a SIP address.
The LinphoneAddress is an opaque object to represents SIP addresses, ie the content of SIP's 'from' and 'to' headers. 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>'. The LinphoneAddress has methods to extract and manipulate all parts of the address. When some part of the address (for example the username) is empty, the accessor methods return NULL.
◆ _LinphoneTransportType
Enum describing transport type for LinphoneAddress.
◆ linphone_address_new()
Constructs a LinphoneAddress object by parsing the user supplied address, given as a string.
◆ linphone_address_clone()
Clones a LinphoneAddress object.
◆ linphone_address_ref()
Increment reference count of LinphoneAddress object.
◆ linphone_address_unref()
Decrement reference count of LinphoneAddress object. When dropped to zero, memory is freed.
◆ linphone_address_get_scheme()
Returns the address scheme, normally "sip".
◆ linphone_address_get_display_name()
Returns the display name.
◆ linphone_address_get_username()
◆ linphone_address_get_domain()
◆ linphone_address_set_display_name()
void linphone_address_set_display_name |
( |
LinphoneAddress * |
u, |
|
|
const char * |
display_name |
|
) |
| |
◆ linphone_address_set_username()
void linphone_address_set_username |
( |
LinphoneAddress * |
uri, |
|
|
const char * |
username |
|
) |
| |
◆ linphone_address_set_domain()
void linphone_address_set_domain |
( |
LinphoneAddress * |
uri, |
|
|
const char * |
host |
|
) |
| |
◆ linphone_address_set_port()
◆ linphone_address_set_transport()
◆ linphone_address_get_transport()
◆ linphone_address_clean()
Removes address's tags and uri headers so that it is displayable to the user.
◆ linphone_address_as_string()
Returns the address as a string. The returned char * must be freed by the application. Use ms_free().
◆ linphone_address_as_string_uri_only()
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().
◆ linphone_address_is_secure()
◆ linphone_address_get_secure()
Returns true if address refers to a secure location (sips)
◆ linphone_address_set_secure()
void linphone_address_set_secure |
( |
LinphoneAddress * |
addr, |
|
|
bool_t |
enabled |
|
) |
| |
Make the address refer to a secure location (sips scheme)
- Parameters
-
enabled | TRUE if address is requested to be secure. |
◆ linphone_address_is_sip()
returns true if address is a routable sip address
◆ linphone_address_weak_equal()
Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port.
- Parameters
-
[in] | a1 | LinphoneAddress object |
[in] | a2 | LinphoneAddress object |
- Returns
- Boolean value telling if the LinphoneAddress objects are equal.
- See also
- linphone_address_equal()
◆ linphone_address_equal()
Compare two LinphoneAddress taking the tags and headers into account.
- Parameters
-
[in] | a1 | LinphoneAddress object |
[in] | a2 | LinphoneAddress object |
- Returns
- Boolean value telling if the LinphoneAddress objects are equal.
- See also
- linphone_address_weak_equal()
◆ linphone_address_destroy()
◆ linphone_address_get_port()
Get port number as an integer value. Get port number, 0 if not present.
◆ linphone_address_set_password()
void linphone_address_set_password |
( |
LinphoneAddress * |
addr, |
|
|
const char * |
passwd |
|
) |
| |
Set the password encoded in the address. It is used for basic authentication (not recommended).
- Parameters
-
addr | the LinphoneAddress |
passwd | the password to set. |
◆ linphone_address_get_password()
Get the password encoded in the address. It is used for basic authentication (not recommended).
- Parameters
-
- Returns
- the password, if any, NULL otherwise.
◆ linphone_address_set_header()
void linphone_address_set_header |
( |
LinphoneAddress * |
addr, |
|
|
const char * |
header_name, |
|
|
const char * |
header_value |
|
) |
| |
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>.
- Parameters
-
addr | the address |
header_name | the header name |
header_value | the header value |
◆ linphone_core_create_address()
Create a LinphoneAddress object by parsing the user supplied address, given as a string.
- Parameters
-
[in] | lc | LinphoneCore object |
[in] | address | String containing the user supplied address |
- Returns
- The create LinphoneAddress object