Top | ![]() |
![]() |
![]() |
![]() |
const |
camel_network_service_get_service_name () |
|
camel_network_service_get_default_port () |
|
camel_network_service_ref_connectable () |
|
camel_network_service_set_connectable () |
|
camel_network_service_get_host_reachable () |
|
camel_network_service_connect_sync () |
|
camel_network_service_starttls () |
|
camel_network_service_can_reach_sync () |
|
camel_network_service_can_reach () |
|
camel_network_service_can_reach_finish () |
constgchar * camel_network_service_get_service_name (CamelNetworkService *service
,CamelNetworkSecurityMethod method
);
Returns the standard network service name for service
and the security
method method
, as defined in /etc/services. For example, the service
name for unencrypted IMAP or encrypted IMAP using STARTTLS is "imap",
but the service name for IMAP over SSL is "imaps".
Since: 3.2
guint16 camel_network_service_get_default_port (CamelNetworkService *service
,CamelNetworkSecurityMethod method
);
Returns the default network port number for service
and the security
method method
, as defined in /etc/services. For example, the default
port for unencrypted IMAP or encrypted IMAP using STARTTLS is 143, but
the default port for IMAP over SSL is 993.
Since: 3.2
GSocketConnectable * camel_network_service_ref_connectable (CamelNetworkService *service
);
Returns the socket endpoint for the network service to which service
is a client.
The returned g_object_unref()
Since: 3.8
void camel_network_service_set_connectable (CamelNetworkService *service
,);
GSocketConnectable *connectable
Sets the socket endpoint for the network service to which service
is
a client. If connectable
is NULL
service
's CamelNetworkSettings.
Since: 3.8
gboolean camel_network_service_get_host_reachable (CamelNetworkService *service
);
Returns TRUE
service
believes that the host pointed to by
Since: 3.8
GIOStream * camel_network_service_connect_sync (CamelNetworkService *service
,,
GCancellable *cancellable);
GError **error
Attempts to establish a network connection to the server described by
service
, using the preferred error
and returns
NULL
service |
||
cancellable |
optional |
|
error |
return location for a |
Since: 3.2
GIOStream * camel_network_service_starttls (CamelNetworkService *service
,,
GIOStream *base_stream);
GError **error
Creates a base_stream
, which is
assumed to communicate with the server identified by service
's
This should typically be called after issuing a STARTTLS command to a server to initiate a Transport Layer Security handshake.
Since: 3.12
gboolean camel_network_service_can_reach_sync (CamelNetworkService *service
,,
GCancellable *cancellable);
GError **error
Attempts to determine whether or not the host described by service
's
If service
believes an attempt to connect will succeed, the function
returns TRUE
FALSE
error
to an appropriate error (such as G_IO_ERROR_HOST_UNREACHABLE
The function will also update the service
's
service |
||
cancellable |
optional |
|
error |
return location for a |
Since: 3.12
void camel_network_service_can_reach (CamelNetworkService *service
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously attempts to determine whether or not the host described by
service
's
For more details, see camel_network_service_can_reach_sync()
.
When the operation is finished, callback
will be called. You can then
call camel_network_service_can_reach_finish()
to get the result of the
operation.
service |
||
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.12
gboolean camel_network_service_can_reach_finish (CamelNetworkService *service
,,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_network_service_can_reach()
.
Since: 3.12