| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
CamelService; #define CAMEL_SERVICE_ERROR enum CamelServiceError; enum CamelServiceConnectionStatus; CamelServiceAuthType; const gchar * camel_service_get_user_data_dir (CamelService *service); gchar * camel_service_get_name (CamelService *service,gboolean brief); CamelProvider * camel_service_get_provider (CamelService *service); struct _CamelSession * camel_service_get_session (CamelService *service); const gchar * camel_service_get_uid (CamelService *service); CamelURL * camel_service_get_camel_url (CamelService *service); gchar * camel_service_get_url (CamelService *service); void camel_service_cancel_connect (CamelService *service); gboolean camel_service_connect_sync (CamelService *service,GError **error); gboolean camel_service_disconnect_sync (CamelService *service,gboolean clean,GError **error); CamelServiceConnectionStatus camel_service_get_connection_status (CamelService *service); GList * camel_service_query_auth_types_sync (CamelService *service,GCancellable *cancellable,GError **error); enum CamelServiceLock; void camel_service_lock (CamelService *service,CamelServiceLock lock); void camel_service_unlock (CamelService *service,CamelServiceLock lock);
"provider" gpointer : Read / Write / Construct Only "session" CamelSession* : Read / Write / Construct Only "uid" gchar* : Read / Write / Construct Only "url" CamelURL* : Read / Write / Construct Only
typedef enum {
CAMEL_SERVICE_ERROR_INVALID,
CAMEL_SERVICE_ERROR_URL_INVALID,
CAMEL_SERVICE_ERROR_UNAVAILABLE,
CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
CAMEL_SERVICE_ERROR_NOT_CONNECTED
} CamelServiceError;
Since 2.32
typedef enum {
CAMEL_SERVICE_DISCONNECTED,
CAMEL_SERVICE_CONNECTING,
CAMEL_SERVICE_CONNECTED,
CAMEL_SERVICE_DISCONNECTING
} CamelServiceConnectionStatus;
typedef struct {
const gchar *name; /* user-friendly name */
const gchar *description;
const gchar *authproto;
gboolean need_password; /* needs a password to authenticate */
} CamelServiceAuthType;
const gchar * 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
"uid" value.
|
a CamelService |
Returns : |
the base directory for service
|
Since 3.2
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, this should be a brief description
such as for use in the folder tree. If brief is FALSE, it should
be a more complete and mostly unambiguous description.
|
a CamelService |
|
whether or not to use a briefer form |
Returns : |
a description of the service which the caller must free |
CamelProvider * camel_service_get_provider (CamelService *service);
Gets the CamelProvider associated with the service.
|
a CamelService |
Returns : |
the CamelProvider |
struct _CamelSession * camel_service_get_session (CamelService *service);
Gets the CamelSession associated with the service.
|
a CamelService |
Returns : |
the CamelSession |
const gchar * camel_service_get_uid (CamelService *service);
Gets the unique identifier string associated with the service.
|
a CamelService |
Returns : |
the UID string |
Since 3.2
CamelURL * camel_service_get_camel_url (CamelService *service);
Returns the CamelURL representing service.
|
a CamelService |
Returns : |
the CamelURL representing service
|
Since 3.2
gchar * camel_service_get_url (CamelService *service);
Gets the URL representing service. The returned URL must be
freed when it is no longer needed. For security reasons, this
routine does not return the password.
|
a CamelService |
Returns : |
the URL representing service
|
void camel_service_cancel_connect (CamelService *service);
If service is currently attempting to connect to or disconnect
from a server, this causes it to stop and fail. Otherwise it is a
no-op.
|
a CamelService |
gboolean camel_service_connect_sync (CamelService *service,GError **error);
Connect to the service using the parameters it was initialized with.
|
a CamelService |
|
return location for a GError, or NULL
|
Returns : |
TRUE if the connection is made or FALSE otherwise
|
gboolean camel_service_disconnect_sync (CamelService *service,gboolean clean,GError **error);
Disconnect from the service. If clean is FALSE, it should not
try to do any synchronizing or other cleanup of the connection.
|
a CamelService |
|
whether or not to try to disconnect cleanly |
|
return location for a GError, or NULL
|
Returns : |
TRUE if the disconnect was successful or FALSE otherwise
|
CamelServiceConnectionStatus camel_service_get_connection_status
(CamelService *service);
Returns the connection status for service.
|
a CamelService |
Returns : |
the connection status |
Since 3.2
GList * camel_service_query_auth_types_sync (CamelService *service,GCancellable *cancellable,GError **error);
This is used by the mail source wizard to get the list of authentication types supported by the protocol, and information about them.
|
a CamelService |
|
optional GCancellable object, or NULL
|
|
return location for a GError, or NULL
|
Returns : |
a list of CamelServiceAuthType records. The caller must free the list with g_list_free when it is done with it. |
typedef enum {
CAMEL_SERVICE_REC_CONNECT_LOCK,
CAMEL_SERVICE_CONNECT_OP_LOCK
} CamelServiceLock;
Since 2.32
void camel_service_lock (CamelService *service,CamelServiceLock lock);
Locks service's lock. Unlock it with camel_service_unlock().
|
a CamelService |
|
lock type to lock |
Since 2.32
void camel_service_unlock (CamelService *service,CamelServiceLock lock);
Unlocks service's lock, previously locked with camel_service_lock().
|
a CamelService |
|
lock type to unlock |
Since 2.32
"provider" property "provider" gpointer : Read / Write / Construct Only
The CamelProvider for the service.
"session" property"session" CamelSession* : Read / Write / Construct Only
A CamelSession instance.
"uid" property "uid" gchar* : Read / Write / Construct Only
The unique identity of the service.
Default value: NULL