|
Liblinphone 5.2.0
|
Typedefs | |
| typedef enum _LinphoneTransportType | LinphoneTransportType |
| Enum describing transport type for LinphoneAddress. | |
| typedef struct _LinphoneAddress | LinphoneAddress |
| Object that represents a parsed SIP address. | |
Enumerations | |
| enum | _LinphoneTransportType { LinphoneTransportUdp = 0 , LinphoneTransportTcp = 1 , LinphoneTransportTls = 2 , LinphoneTransportDtls = 3 } |
| Enum describing transport type for LinphoneAddress. | |
Functions | |
| LinphoneAddress * | linphone_core_create_address (LinphoneCore *core, const char *address) |
| Create a LinphoneAddress object by parsing the user supplied address, given as a string. | |
| LinphoneAddress * | linphone_address_new (const char *address) |
| Constructs a LinphoneAddress object by parsing the user supplied address, given as a string. | |
| LinphoneAddress * | linphone_address_clone (const LinphoneAddress *address) |
| Clones a LinphoneAddress object. | |
| LinphoneAddress * | linphone_address_ref (LinphoneAddress *address) |
| Increment reference count of LinphoneAddress object. | |
| void | linphone_address_unref (LinphoneAddress *address) |
| Decrement reference count of LinphoneAddress object. | |
| bool_t | linphone_address_is_valid (const LinphoneAddress *address) |
| Returns if address is valid. | |
| const char * | linphone_address_get_scheme (const LinphoneAddress *address) |
| Returns the address scheme, normally "sip". | |
| const char * | linphone_address_get_display_name (const LinphoneAddress *address) |
| Returns the display name. | |
| LinphoneStatus | linphone_address_set_display_name (LinphoneAddress *address, const char *display_name) |
| Sets the display name. | |
| const char * | linphone_address_get_username (const LinphoneAddress *address) |
| Returns the username. | |
| LinphoneStatus | linphone_address_set_username (LinphoneAddress *address, const char *username) |
| Sets the username. | |
| const char * | linphone_address_get_domain (const LinphoneAddress *address) |
| Returns the domain name. | |
| LinphoneStatus | linphone_address_set_domain (LinphoneAddress *address, const char *domain) |
| Sets the domain. | |
| int | linphone_address_get_port (const LinphoneAddress *address) |
| Get port number as an integer value, 0 if not present. | |
| LinphoneStatus | linphone_address_set_port (LinphoneAddress *address, int port) |
| Sets the port number. | |
| LinphoneTransportType | linphone_address_get_transport (const LinphoneAddress *address) |
| Get the transport. | |
| LinphoneStatus | linphone_address_set_transport (LinphoneAddress *address, LinphoneTransportType transport) |
| Set a transport. | |
| bool_t | linphone_address_get_secure (const LinphoneAddress *address) |
| Returns whether the address refers to a secure location (sips) or not. | |
| void | linphone_address_set_secure (LinphoneAddress *address, bool_t enabled) |
| Make the address refer to a secure location (sips scheme) | |
| bool_t | linphone_address_is_sip (const LinphoneAddress *address) |
| returns whether the address is a routable SIP address or not | |
| const char * | linphone_address_get_method_param (const LinphoneAddress *address) |
| Get the value of the method parameter. | |
| void | linphone_address_set_method_param (LinphoneAddress *address, const char *method_param) |
| Set the value of the method parameter. | |
| const char * | linphone_address_get_password (const LinphoneAddress *address) |
| Get the password encoded in the address. | |
| void | linphone_address_set_password (LinphoneAddress *address, const char *password) |
| Set the password encoded in the address. | |
| void | linphone_address_clean (LinphoneAddress *address) |
| Removes address's tags and uri headers so that it is displayable to the user. | |
| char * | linphone_address_as_string (const LinphoneAddress *address) |
| Returns the address as a string. | |
| char * | linphone_address_as_string_uri_only (const LinphoneAddress *address) |
| Returns the SIP uri only as a string, that is display name is removed. | |
| bool_t | linphone_address_weak_equal (const LinphoneAddress *address1, const LinphoneAddress *address2) |
| Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port. | |
| bool_t | linphone_address_equal (const LinphoneAddress *address1, const LinphoneAddress *address2) |
| Compare two LinphoneAddress taking the tags and headers into account. | |
| const char * | linphone_address_get_header (const LinphoneAddress *address, const char *header_name) |
| Get the header encoded in the address. | |
| void | linphone_address_set_header (LinphoneAddress *address, const char *header_name, const char *header_value) |
| Set a header into the address. | |
| bool_t | linphone_address_has_param (const LinphoneAddress *address, const char *param_name) |
| Tell whether a parameter is present in the address. | |
| const char * | linphone_address_get_param (const LinphoneAddress *address, const char *param_name) |
| Get the value of a parameter of the address. | |
| void | linphone_address_set_param (LinphoneAddress *address, const char *param_name, const char *param_value) |
| Set the value of a parameter of the address. | |
| void | linphone_address_set_params (LinphoneAddress *address, const char *params) |
| bool_t | linphone_address_has_uri_param (const LinphoneAddress *address, const char *uri_param_name) |
| Tell whether a parameter is present in the URI of the address. | |
| const char * | linphone_address_get_uri_param (const LinphoneAddress *address, const char *uri_param_name) |
| Get the value of a parameter of the URI of the address. | |
| void | linphone_address_set_uri_param (LinphoneAddress *address, const char *uri_param_name, const char *uri_param_value) |
| Set the value of a parameter of the URI of the address. | |
| void | linphone_address_set_uri_params (LinphoneAddress *address, const char *params) |
| Set the value of the parameters of the URI of the address. | |
| void | linphone_address_remove_uri_param (LinphoneAddress *address, const char *uri_param_name) |
| Removes the value of a parameter of the URI of the address. | |
| MS2_DEPRECATED void | linphone_address_destroy (LinphoneAddress *address) |
| Destroys a LinphoneAddress object (actually calls linphone_address_unref()). | |
| MS2_DEPRECATED bool_t | linphone_address_is_secure (const LinphoneAddress *address) |
| Returns true if address refers to a secure location (sips) | |
SIP address parser API.
This api is useful for manipulating SIP addresses ('from' or 'to' headers).
| typedef struct _LinphoneAddress LinphoneAddress |
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>'.
You can create an address using linphone_factory_create_address() or linphone_core_interpret_url_2() 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 LinphoneAddress has methods to extract and manipulate all parts of the address.
| char * linphone_address_as_string | ( | const LinphoneAddress * | address | ) |
Returns the address as a string.
The returned char * must be freed by the application. Use ms_free().
| address | a LinphoneAddress object. |
| char * linphone_address_as_string_uri_only | ( | const LinphoneAddress * | address | ) |
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().
| address | a LinphoneAddress object. |
| void linphone_address_clean | ( | LinphoneAddress * | address | ) |
Removes address's tags and uri headers so that it is displayable to the user.
| address | a LinphoneAddress object. |
| LinphoneAddress * linphone_address_clone | ( | const LinphoneAddress * | address | ) |
Clones a LinphoneAddress object.
| address | a LinphoneAddress object to clone. |
| MS2_DEPRECATED void linphone_address_destroy | ( | LinphoneAddress * | address | ) |
Destroys a LinphoneAddress object (actually calls linphone_address_unref()).
| bool_t linphone_address_equal | ( | const LinphoneAddress * | address1, |
| const LinphoneAddress * | address2 ) |
Compare two LinphoneAddress taking the tags and headers into account.
| address1 | LinphoneAddress object. |
| address2 | LinphoneAddress object. |
| const char * linphone_address_get_display_name | ( | const LinphoneAddress * | address | ) |
Returns the display name.
| address | a LinphoneAddress object. |
| const char * linphone_address_get_domain | ( | const LinphoneAddress * | address | ) |
Returns the domain name.
| address | a LinphoneAddress object. |
| const char * linphone_address_get_header | ( | const LinphoneAddress * | address, |
| const char * | header_name ) |
Get the header encoded in the address.
| address | a LinphoneAddress object. |
| header_name | the header name. |
| const char * linphone_address_get_method_param | ( | const LinphoneAddress * | address | ) |
Get the value of the method parameter.
| address | a LinphoneAddress object. |
| const char * linphone_address_get_param | ( | const LinphoneAddress * | address, |
| const char * | param_name ) |
Get the value of a parameter of the address.
| address | a LinphoneAddress object. |
| param_name | The name of the parameter. |
| const char * linphone_address_get_password | ( | const LinphoneAddress * | address | ) |
Get the password encoded in the address.
It is used for basic authentication (not recommended).
| address | a LinphoneAddress object. |
| int linphone_address_get_port | ( | const LinphoneAddress * | address | ) |
Get port number as an integer value, 0 if not present.
| address | a LinphoneAddress object. |
| const char * linphone_address_get_scheme | ( | const LinphoneAddress * | address | ) |
Returns the address scheme, normally "sip".
| address | a LinphoneAddress object. |
| bool_t linphone_address_get_secure | ( | const LinphoneAddress * | address | ) |
Returns whether the address refers to a secure location (sips) or not.
| address | a LinphoneAddress object. |
| LinphoneTransportType linphone_address_get_transport | ( | const LinphoneAddress * | address | ) |
Get the transport.
| address | a LinphoneAddress object. |
| const char * linphone_address_get_uri_param | ( | const LinphoneAddress * | address, |
| const char * | uri_param_name ) |
Get the value of a parameter of the URI of the address.
| address | a LinphoneAddress object. |
| uri_param_name | The name of the parameter. |
| const char * linphone_address_get_username | ( | const LinphoneAddress * | address | ) |
Returns the username.
| address | a LinphoneAddress object. |
| bool_t linphone_address_has_param | ( | const LinphoneAddress * | address, |
| const char * | param_name ) |
Tell whether a parameter is present in the address.
| address | a LinphoneAddress object. |
| param_name | The name of the parameter. |
| bool_t linphone_address_has_uri_param | ( | const LinphoneAddress * | address, |
| const char * | uri_param_name ) |
Tell whether a parameter is present in the URI of the address.
| address | a LinphoneAddress object. |
| uri_param_name | The name of the parameter. |
| MS2_DEPRECATED bool_t linphone_address_is_secure | ( | const LinphoneAddress * | address | ) |
Returns true if address refers to a secure location (sips)
| bool_t linphone_address_is_sip | ( | const LinphoneAddress * | address | ) |
returns whether the address is a routable SIP address or not
| address | a LinphoneAddress object. |
| bool_t linphone_address_is_valid | ( | const LinphoneAddress * | address | ) |
Returns if address is valid.
| address | a LinphoneAddress object. |
| LinphoneAddress * linphone_address_new | ( | const char * | address | ) |
Constructs a LinphoneAddress object by parsing the user supplied address, given as a string.
| address | an address to parse. |
| LinphoneAddress * linphone_address_ref | ( | LinphoneAddress * | address | ) |
Increment reference count of LinphoneAddress object.
| address | a LinphoneAddress object. |
| void linphone_address_remove_uri_param | ( | LinphoneAddress * | address, |
| const char * | uri_param_name ) |
Removes the value of a parameter of the URI of the address.
| address | a LinphoneAddress object. |
| uri_param_name | The name of the parameter. |
| LinphoneStatus linphone_address_set_display_name | ( | LinphoneAddress * | address, |
| const char * | display_name ) |
Sets the display name.
| address | a LinphoneAddress object. |
| display_name | the display name to set. |
| LinphoneStatus linphone_address_set_domain | ( | LinphoneAddress * | address, |
| const char * | domain ) |
Sets the domain.
| address | a LinphoneAddress object. |
| domain | the domain to set. |
| void linphone_address_set_header | ( | LinphoneAddress * | address, |
| 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>.
| address | a LinphoneAddress object. |
| header_name | the header name. |
| header_value | the header value. |
| void linphone_address_set_method_param | ( | LinphoneAddress * | address, |
| const char * | method_param ) |
Set the value of the method parameter.
| address | a LinphoneAddress object. |
| method_param | the value to set to the method parameter. |
| void linphone_address_set_param | ( | LinphoneAddress * | address, |
| const char * | param_name, | ||
| const char * | param_value ) |
Set the value of a parameter of the address.
| address | a LinphoneAddress object. |
| param_name | The name of the parameter. |
| param_value | The new value of the parameter. |
| void linphone_address_set_password | ( | LinphoneAddress * | address, |
| const char * | password ) |
Set the password encoded in the address.
It is used for basic authentication (not recommended).
| address | a LinphoneAddress object. |
| password | the password to set. |
| LinphoneStatus linphone_address_set_port | ( | LinphoneAddress * | address, |
| int | port ) |
Sets the port number.
| address | a LinphoneAddress object. |
| port | the port to set in the address |
| void linphone_address_set_secure | ( | LinphoneAddress * | address, |
| bool_t | enabled ) |
Make the address refer to a secure location (sips scheme)
| address | A LinphoneAddress object. |
| enabled | TRUE if address is requested to be secure. |
| LinphoneStatus linphone_address_set_transport | ( | LinphoneAddress * | address, |
| LinphoneTransportType | transport ) |
Set a transport.
| address | a LinphoneAddress object. |
| transport | a LinphoneTransportType |
| void linphone_address_set_uri_param | ( | LinphoneAddress * | address, |
| const char * | uri_param_name, | ||
| const char * | uri_param_value ) |
Set the value of a parameter of the URI of the address.
| address | a LinphoneAddress object. |
| uri_param_name | The name of the parameter. |
| uri_param_value | The new value of the parameter. |
| void linphone_address_set_uri_params | ( | LinphoneAddress * | address, |
| const char * | params ) |
Set the value of the parameters of the URI of the address.
| [in] | address | LinphoneAddress object |
| [in] | params | The parameters string |
| LinphoneStatus linphone_address_set_username | ( | LinphoneAddress * | address, |
| const char * | username ) |
Sets the username.
| address | a LinphoneAddress object. |
| username | the username to set. |
| void linphone_address_unref | ( | LinphoneAddress * | address | ) |
Decrement reference count of LinphoneAddress object.
When dropped to zero, memory is freed.
| address | a LinphoneAddress object. |
| bool_t linphone_address_weak_equal | ( | const LinphoneAddress * | address1, |
| const LinphoneAddress * | address2 ) |
Compare two LinphoneAddress ignoring tags and headers, basically just domain, username, and port.
| address1 | LinphoneAddress object. |
| address2 | LinphoneAddress object. |
| LinphoneAddress * linphone_core_create_address | ( | LinphoneCore * | core, |
| const char * | address ) |
Create a LinphoneAddress object by parsing the user supplied address, given as a string.
| core | LinphoneCore object |
| address | String containing the user supplied address |