| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties | ||||
CamelNetworkService; const gchar * camel_network_service_get_service_name (CamelNetworkService *service,CamelNetworkSecurityMethod method); guint16 camel_network_service_get_default_port (CamelNetworkService *service,CamelNetworkSecurityMethod method); GSocketConnectable * camel_network_service_ref_connectable (CamelNetworkService *service); void camel_network_service_set_connectable (CamelNetworkService *service,GSocketConnectable *connectable); gboolean camel_network_service_get_host_reachable (CamelNetworkService *service); CamelStream * camel_network_service_connect_sync (CamelNetworkService *service,GCancellable *cancellable,GError **error);
const gchar * 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".
|
a CamelNetworkService |
|
a CamelNetworkSecurityMethod |
Returns : |
the network service name for service and method, or NULL
|
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.
|
a CamelNetworkService |
|
a CamelNetworkSecurityMethod |
Returns : |
the default port number for service and method
|
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 GSocketConnectable is referenced for thread-safety and
must be unreferenced with g_object_unref() when finished with it.
|
a CamelNetworkService |
Returns : |
a GSocketConnectable |
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, a GSocketConnectable is derived
from the service's CamelNetworkSettings.
|
a CamelNetworkService |
|
a GSocketConnectable, or NULL
|
Since 3.8
gboolean camel_network_service_get_host_reachable
(CamelNetworkService *service);
Returns TRUE if service believes that the host pointed to by
"connectable" can be reached. This property
is updated automatically as network conditions change.
|
a CamelNetworkService |
Returns : |
whether the host is reachable |
Since 3.8
CamelStream * 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 "security-method" to
secure the connection. If a connection cannot be established, or the
connection attempt is cancelled, the function sets error and returns
NULL.
|
a CamelNetworkService |
|
optional GCancellable object, or NULL
|
|
return location for a GError, or NULL
|
Returns : |
a CamelStream, or NULL
|
Since 3.2