Top | ![]() |
![]() |
![]() |
![]() |
struct addrinfo * | camel_getaddrinfo () |
void | camel_freeaddrinfo () |
gchar * | camel_host_idna_to_ascii () |
gchar * | camel_utils_sanitize_ascii_domain_in_address () |
gchar * | camel_utils_sanitize_ascii_domain_in_url_str () |
gboolean | camel_utils_sanitize_ascii_domain_in_url () |
#define | socklen_t |
struct | addrinfo |
#define | AI_CANONNAME |
#define | AI_NUMERICHOST |
#define | EAI_BADFLAGS |
#define | EAI_NONAME |
#define | EAI_AGAIN |
#define | EAI_FAIL |
#define | EAI_NODATA |
#define | EAI_FAMILY |
#define | EAI_SOCKTYPE |
#define | EAI_SERVICE |
#define | EAI_ADDRFAMILY |
#define | EAI_MEMORY |
#define | EAI_SYSTEM |
#define | EAI_OVERFLOW |
#define | NI_NUMERICHOST |
#define | NI_NUMERICSERV |
#define | NI_NOFQDN |
#define | NI_NAMEREQD |
#define | NI_DGRAM |
struct | sockaddr |
struct addrinfo * camel_getaddrinfo (const gchar *name
,const gchar *service
,const struct addrinfo *hints
,GCancellable *cancellable
,GError **error
);
Resolves a host name
and returns an information about its address.
name |
an address name to resolve |
|
service |
a service name to use |
|
hints |
an addrinfo hints, or |
[nullable] |
cancellable |
optional GCancellable object, or |
|
error |
return location for a GError, or |
a newly allocated addrinfo. Free it
with camel_freeaddrinfo()
when done with it.
[transfer full][nullable]
Since: 2.22
void
camel_freeaddrinfo (struct addrinfo *host
);
Frees a structure returned with camel_getaddrinfo()
. It does
nothing when the host
is NULL
.
Since: 2.22
gchar *
camel_host_idna_to_ascii (const gchar *host
);
Converts IDN (Internationalized Domain Name) into ASCII representation.
If there's a failure or the host
has only ASCII letters, then a copy
of host
is returned.
Newly allocated string with only ASCII letters
describing the host
or NULL
, when the host
is NULL
. Free the returned
string with g_free()
when no longer needed.
[nullable]
Since: 3.16
gchar * camel_utils_sanitize_ascii_domain_in_address (const gchar *email_address
,gboolean do_format
);
Checks whether the domain in the email_address
requires
conversion to ASCII and if it does it also converts it.
When the do_format
is TRUE
, the output string is formatted
for display, otherwise it's encoded for use in the message
headers. A NULL
is returned when no conversion was needed.
email_address |
an email address as string. |
[nullable] |
do_format |
what format will be returned |
the email_address
with only ASCII letters,
if such conversion is needed or NULL
, when no conversion was
required.
See: camel_hostname_utils_requires_ascii()
, camel_internet_address_sanitize_ascii_domain()
,
camel_utils_sanitize_ascii_domain_in_url_str()
.
[nullable]
Since: 3.44
gchar *
camel_utils_sanitize_ascii_domain_in_url_str
(const gchar *url_str
);
Checks whether the host name of the url_str
requires conversion
to ASCII and converts it if needed. Returns NULL
, when no conversion
was required.
converted url_str
to ASCII host name, or NULL
, when
no conversion was needed.
See: camel_hostname_utils_requires_ascii()
, camel_utils_sanitize_ascii_domain_in_url()
.
[nullable]
Since: 3.44
gboolean
camel_utils_sanitize_ascii_domain_in_url
(CamelURL *url
);
Checks whether the host name of the url
requires conversion
to ASCII and converts it, if needed.
TRUE
, when the conversion was required.
See: camel_hostname_utils_requires_ascii()
, camel_utils_sanitize_ascii_domain_in_url_str()
Since: 3.44