Compares two phone numbers.
the second EPhoneNumber to compare
Makes a copy of phone_number
.
Released the memory occupied by phone_number
.
Queries the phone_number'
s country calling code and optionally stores the country
calling code's origin in source
. For instance when parsing "+1-617-5423789" this
function would return one and assing E_PHONE_NUMBER_COUNTRY_FROM_FQTN to source
.
an optional location for storing the phone number's origin, or %NULL
Queries the national portion of phone_number
without any call-out
prefixes. For instance when parsing "+1-617-5423789" this function would
return the string "6175423789".
Describes the phone_number
according to the rules applying to format
.
the phone number format to apply
Compares two phone numbers.
the first EPhoneNumber to compare
the second EPhoneNumber to compare
Compares two phone numbers within the context of region_code
.
the first EPhoneNumber to compare
the second EPhoneNumber to compare
a two-letter country code, or %NULL
Parses the string passed in phone_number
. Note that no validation is
performed whether the recognized phone number is valid for a particular
region.
The two-letter country code passed in region_code
only is used if the
phone_number
is not written in international format. The application's
default region as returned by e_phone_number_get_default_region() is used
if region_code
is %NULL.
If the number is guaranteed to start with a '+' followed by the country
calling code, then "ZZ" can be passed for region_code
.
the phone number to parse
a two-letter country code, or %NULL
Retrieves the preferred country calling code for region_code,
e.g. 358 for "fi" or 1 for "en_USUTF-8
".
If %NULL is passed for region_code
the default region as returned by
e_phone_number_get_default_region() is used.
a two-letter country code, a locale name, or %NULL
Retrieves the current two-letter country code that's used by default for parsing phone numbers in e_phone_number_from_string(). It can be useful to store this number before parsing a bigger number of phone numbers.
The result of this functions depends on the current setup of the %LC_ADDRESS category: If that category provides a reasonable value for %_NL_ADDRESS_COUNTRY_AB2 this value is returned. Otherwise the locale name configured for %LC_ADDRESS is parsed.
Checks if phone number support is available. It is recommended to call this function before using any of the phone-utils functions to ensure that the required functionality is available, and to pick alternative mechanisms if needed.
This opaque type describes a parsed phone number. It can be copied using e_phone_number_copy(). To release it call e_phone_number_free().