| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
CamelNetworkService; guint16 camel_network_service_get_default_port (CamelNetworkService *service); const gchar * camel_network_service_get_service_name (CamelNetworkService *service); enum CamelNetworkSecurityMethod; CamelNetworkSecurityMethod camel_network_service_get_security_method (CamelNetworkService *service); void camel_network_service_set_security_method (CamelNetworkService *service,CamelNetworkSecurityMethod method); CamelStream * camel_network_service_connect_sync (CamelNetworkService *service,GCancellable *cancellable,GError **error);
guint16 camel_network_service_get_default_port
(CamelNetworkService *service);
Returns the default network port number of service as defined
in /etc/services. The default port may depend on the value of the
"security-method" property. 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 |
Returns : |
the default port number for service
|
Since 3.2
const gchar * camel_network_service_get_service_name
(CamelNetworkService *service);
Returns the standard network service name for service as defined
in /etc/services. The service name may depend on the value of the
"security-method" property. 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 |
Returns : |
the network service name for service, or NULL
|
Since 3.2
typedef enum {
CAMEL_NETWORK_SECURITY_METHOD_NONE,
CAMEL_NETWORK_SECURITY_METHOD_SSL_ON_ALTERNATE_PORT,
CAMEL_NETWORK_SECURITY_METHOD_STARTTLS_ON_STANDARD_PORT
} CamelNetworkSecurityMethod;
Methods for establishing an encrypted (or unencrypted) network connection.
| Use an unencrypted network connection. | |
| Use SSL by connecting to an alternate port number. | |
| Use SSL or TLS by connecting to the standard port and invoking STARTTLS before authenticating. This is the recommended method. |
Since 3.2
CamelNetworkSecurityMethod camel_network_service_get_security_method
(CamelNetworkService *service);
Return the method used to establish a secure (or unsecure) network connection.
|
a CamelNetworkService |
Returns : |
the security method |
Since 3.2
void camel_network_service_set_security_method (CamelNetworkService *service,CamelNetworkSecurityMethod method);
Sets the method used to establish a secure (or unsecure) network connection. Note that changing this setting has no effect on an already-established network connection.
|
a CamelNetworkService |
|
the security method |
Since 3.2
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