Top | ![]() |
![]() |
![]() |
![]() |
void camel_service_migrate_files ();
CamelService *service
Performs any necessary file migrations for service
. This should be
called after installing or configuring the service
's CamelSettings,
since it requires building a URL string for service
.
Since: 3.4
CamelURL * camel_service_new_camel_url ();
CamelService *service
Returns a new service
.
Free the returned camel_url_free()
.
Since: 3.2
CamelServiceConnectionStatus
camel_service_get_connection_status (CamelService *service
);
Returns the connection status for service
.
Since: 3.2
constgchar * camel_service_get_display_name ();
CamelService *service
Returns the display name for service
, or NULL
service
has not
been given a display name. The display name is intended for use in
a user interface and should generally be given a user-defined name.
Compare this with camel_service_get_name()
, which returns a built-in
description of the type of service (IMAP, SMTP, etc.).
Since: 3.2
gchar * camel_service_dup_display_name ();
CamelService *service
Thread-safe variation of camel_service_get_display_name()
.
Use this function when accessing service
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void camel_service_set_display_name (,
CamelService *serviceconst
);gchar *display_name
Assigns a UTF-8 display name to service
. The display name is intended
for use in a user interface and should generally be given a user-defined
name.
Compare this with camel_service_get_name()
, which returns a built-in
description of the type of service (IMAP, SMTP, etc.).
Since: 3.2
constgchar * camel_service_get_password ();
CamelService *service
Returns the password for service
. Some SASL mechanisms use this
when attempting to authenticate.
Since: 3.4
gchar * camel_service_dup_password ();
CamelService *service
Thread-safe variation of camel_service_get_password()
.
Use this function when accessing service
from multiple threads.
The returned string should be freed with g_free()
Since: 3.12
void camel_service_set_password (,
CamelService *serviceconst
);gchar *password
Sets the password for service
. Use this function to cache the password
in memory after obtaining it through camel_session_get_password()
. Some
SASL mechanisms use this when attempting to authenticate.
Since: 3.4
constgchar * camel_service_get_user_data_dir ();
CamelService *service
Returns the base directory under which to store user-specific data
for service
. The directory is formed by appending the directory
returned by camel_session_get_user_data_dir()
with the service's
Since: 3.2
constgchar * camel_service_get_user_cache_dir ();
CamelService *service
Returns the base directory under which to store cache data
for service
. The directory is formed by appending the directory
returned by camel_session_get_user_cache_dir()
with the service's
Since: 3.4
gchar * camel_service_get_name (,
CamelService *service);
gboolean brief
This gets the name of the service in a "friendly" (suitable for
humans) form. If brief
is TRUE
brief
is FALSE
CamelProvider * camel_service_get_provider ();
CamelService *service
Gets the
GProxyResolver * camel_service_ref_proxy_resolver ();
CamelService *service
Returns the service
. If an application needs to
override this, it should do so prior to calling functions on service
that may require a network connection.
The returned g_object_unref()
Since: 3.12
void camel_service_set_proxy_resolver (,
CamelService *service);
GProxyResolver *proxy_resolver
Sets the service
. If an application needs to
override this, it should do so prior to calling functions on service
that may require a network connection.
Since: 3.12
struct_CamelSession * camel_service_ref_session ();
CamelService *service
Returns the
The returned g_object_unref()
Since: 3.8
CamelSettings *
camel_service_ref_settings (CamelService *service
);
Returns the CamelSettings instance associated with the service.
The returned CamelSettings is referenced for thread-safety and must
be unreferenced with g_object_unref()
Since: 3.6
void camel_service_set_settings (,
CamelService *serviceCamelSettings *settings
);
Associates a new CamelSettings instance with the service.
The settings
instance must match the settings type defined in
settings
is NULL
Since: 3.2
constgchar * camel_service_get_uid ();
CamelService *service
Gets the unique identifier string associated with the service.
Since: 3.2
void camel_service_queue_task (,
CamelService *service,
GTask *task);
GTaskThreadFunc task_func
Adds task
to a queue of waiting tasks with the same source object.
Queued tasks execute one at a time in the order they were added. When
task
reaches the front of the queue, it will be dispatched by invoking
task_func
in a separate thread. If task
is cancelled while queued,
it will complete immediately with an appropriate error.
This is primarily intended for use by
service |
a |
|
task |
a |
|
task_func |
function to call when |
[scope async] |
Since: 3.12
gboolean camel_service_connect_sync (,
CamelService *service,
GCancellable *cancellable);
GError **error
Connects service
to a remote server using the information in its
If a connect operation is already in progress when this function is called, its results will be reflected in this connect operation.
service |
a |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.6
void camel_service_connect (,
CamelService *service,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously connects service
to a remote server using the information
in its
If a connect operation is already in progress when this function is called, its results will be reflected in this connect operation.
If any disconnect operations are in progress when this function is called, they will be cancelled.
When the operation is finished, callback
will be called. You can
then call camel_service_connect_finish()
to get the result of the
operation.
service |
a |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.6
gboolean camel_service_connect_finish (,
CamelService *service,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_service_connect()
.
Since: 3.6
gboolean camel_service_disconnect_sync (,
CamelService *service,
gboolean clean,
GCancellable *cancellable);
GError **error
Disconnect from the service. If clean
is FALSE
If a disconnect operation is already in progress when this function is called, its results will be reflected in this disconnect operation.
If any connect operations are in progress when this function is called, they will be cancelled.
service |
a |
|
clean |
whether or not to try to disconnect cleanly |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.6
void camel_service_disconnect (,
CamelService *service,
gboolean clean,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
If a disconnect operation is already in progress when this function is called, its results will be reflected in this disconnect operation.
If any connect operations are in progress when this function is called, they will be cancelled.
When the operation is finished, callback
will be called. You can
then call camel_service_disconnect_finish()
to get the result of the
operation.
service |
a |
|
clean |
whether or not to try to disconnect cleanly |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.6
gboolean camel_service_disconnect_finish (,
CamelService *service,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_service_disconnect()
.
Since: 3.6
CamelAuthenticationResult camel_service_authenticate_sync (,
CamelService *serviceconst
,gchar *mechanism,
GCancellable *cancellable);
GError **error
Attempts to authenticate service
using mechanism
and, if necessary,
service
's
If the authentication attempt completed and the server accepted the credentials, the function returns CAMEL_AUTHENTICATION_ACCEPTED.
If the authentication attempt completed but the server rejected the credentials, the function returns CAMEL_AUTHENTICATION_REJECTED.
If the authentication attempt failed to complete due to a network
communication issue or some other mishap, the function sets error
and returns CAMEL_AUTHENTICATION_ERROR.
Generally this function should only be called from a
service |
a |
|
mechanism |
a SASL mechanism name, or |
[nullable] |
cancellable |
optional |
|
error |
return location for a |
Since: 3.4
void camel_service_authenticate (,
CamelService *serviceconst
,gchar *mechanism,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously attempts to authenticate service
using mechanism
and,
if necessary, service
's
Generally this function should only be called from a
When the operation is finished, callback
will be called. You can
then call camel_service_authenticate_finish()
to get the result of
the operation.
service |
a |
|
mechanism |
a SASL mechanism name, or |
[nullable] |
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.4
CamelAuthenticationResult camel_service_authenticate_finish (,
CamelService *service,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_service_authenticate()
.
If the authentication attempt completed and the server accepted the credentials, the function returns CAMEL_AUTHENTICATION_ACCEPTED.
If the authentication attempt completed but the server rejected the credentials, the function returns CAMEL_AUTHENTICATION_REJECTED.
If the authentication attempt failed to complete due to a network
communication issue or some other mishap, the function sets error
and returns CAMEL_AUTHENTICATION_ERROR.
Since: 3.4
GList * camel_service_query_auth_types_sync (,
CamelService *service,
GCancellable *cancellable);
GError **error
Obtains a list of authentication types supported by service
.
Free the returned list with g_list_free()
void camel_service_query_auth_types (,
CamelService *service,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously obtains a list of authentication types supported by
service
.
When the operation is finished, callback
will be called. You can
then call camel_service_query_auth_types_finish()
to get the result
of the operation.
service |
a |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.2
GList * camel_service_query_auth_types_finish (,
CamelService *service,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_service_query_auth_types()
.
Free the returned list with g_list_free()
a list of
[element-type CamelServiceAuthType][transfer container]
Since: 3.2
CamelServiceAuthType * camel_service_auth_type_copy (const
);CamelServiceAuthType *service_auth_type
Copies the service_auth_type
struct.
Does nothing and returns the given object in reality, needed for the introspection.
Since: 3.24
void camel_service_auth_type_free ();
CamelServiceAuthType *service_auth_type
Frees the service_auth_type
struct.
Does nothing in reality, needed for the introspection.
Since: 3.24
a generic service error code |
||
the URL for the service is invalid |
||
the service is unavailable |
||
failed to authenitcate |
||
the service is not connected |
Since: 2.32