| Top |
| gchar * | cache-dir | Read / Write |
| GProxyResolver * | proxy-resolver | Read |
| ESourceRegistry * | registry | Read / Write / Construct Only |
| gboolean | writable | Read / Write |
| #define | CLIENT_BACKEND_PROPERTY_CAPABILITIES |
| #define | BOOK_BACKEND_PROPERTY_REQUIRED_FIELDS |
| #define | BOOK_BACKEND_PROPERTY_SUPPORTED_FIELDS |
| #define | BOOK_BACKEND_PROPERTY_REVISION |
| struct | EBookBackend |
| struct | EBookBackendClass |
This is the main server facing API for interfacing with addressbook backends, addressbook backends must implement methods on this class.
const gchar *
e_book_backend_get_cache_dir (EBookBackend *backend);
Returns the cache directory path used by backend
.
Since: 2.32
gchar *
e_book_backend_dup_cache_dir (EBookBackend *backend);
Thread-safe variation of e_book_backend_get_cache_dir().
Use this function when accessing backend
from multiple threads.
The returned string should be freed with g_free() when no longer needed.
Since: 3.10
void e_book_backend_set_cache_dir (EBookBackend *backend,const gchar *cache_dir);
Sets the cache directory path for use by backend
.
Note that EBookBackend is initialized with a default cache directory path which should suffice for most cases. Backends should not override the default path without good reason.
Since: 2.32
EDataBook *
e_book_backend_ref_data_book (EBookBackend *backend);
Returns the EDataBook for backend
. The EDataBook is essentially
the glue between incoming D-Bus requests and backend
's native API.
An EDataBook should be set only once after backend
is first created.
If an EDataBook has not yet been set, the function returns NULL.
The returned EDataBook is referenced for thread-safety and must be
unreferenced with g_object_unref() when finished with it.
Since: 3.10
void e_book_backend_set_data_book (EBookBackend *backend,EDataBook *data_book);
Sets the EDataBook for backend
. The EDataBook is essentially the
glue between incoming D-Bus requests and backend
's native API.
An EDataBook should be set only once after backend
is first created.
Since: 3.10
GProxyResolver *
e_book_backend_ref_proxy_resolver (EBookBackend *backend);
Returns the GProxyResolver for backend
(if applicable), as indicated
by the “proxy-uid” of backend
's “source”
or one of its ancestors.
The returned GProxyResolver is referenced for thread-safety and must
be unreferenced with g_object_unref() when finished with it.
Since: 3.12
ESourceRegistry *
e_book_backend_get_registry (EBookBackend *backend);
Returns the data source registry to which “source” belongs.
Since: 3.6
gboolean
e_book_backend_get_writable (EBookBackend *backend);
Returns whether backend
will accept changes to its data content.
Since: 3.8
void e_book_backend_set_writable (EBookBackend *backend,gboolean writable);
Sets whether backend
will accept changes to its data content.
Since: 3.8
gboolean
e_book_backend_is_opened (EBookBackend *backend);
Checks if backend
's storage has been opened (and
authenticated, if necessary) and the backend itself
is ready for accessing. This property is changed automatically
within call of e_book_backend_notify_opened().
Since: 3.2
gboolean
e_book_backend_is_readonly (EBookBackend *backend);
Checks if we can write to backend
.
Since: 3.2
gchar * e_book_backend_get_backend_property (EBookBackend *backend,const gchar *prop_name);
Obtains the value of the backend property named prop_name
.
Freed the returned string with g_free() when finished with it.
Since: 3.10
gboolean e_book_backend_open_sync (EBookBackend *backend,GCancellable *cancellable,GError **error);
"Opens" the backend
. Opening a backend is something of an outdated
concept, but the operation is hanging around for a little while longer.
This usually involves some custom initialization logic, and testing of
remote authentication if applicable.
If an error occurs, the function will set error
and return FALSE.
Since: 3.10
void e_book_backend_open (EBookBackend *backend,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously "opens" the backend
. Opening a backend is something of
an outdated concept, but the operation is hanging around for a little
while longer. This usually involves some custom initialization logic,
and testing of remote authentication if applicable.
When the operation is finished, callback
will be called. You can then
call e_book_backend_open_finish() to get the result of the operation.
backend |
an EBookBackend |
|
cancellable |
optional GCancellable object, or |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
data to pass to the callback function |
Since: 3.10
gboolean e_book_backend_open_finish (EBookBackend *backend,GAsyncResult *result,GError **error);
Finishes the operation started with e_book_backend_open().
If an error occurred, the function will set error
and return FALSE.
Since: 3.10
gboolean e_book_backend_refresh_sync (EBookBackend *backend,GCancellable *cancellable,GError **error);
Initiates a refresh for backend
, if the backend
supports refreshing.
The actual refresh operation completes on its own time. This function
merely initiates the operation.
If an error occurs while initiating the refresh, the function will set
error
and return FALSE. If the backend
does not support refreshing,
the function will set an E_CLIENT_ERROR_NOT_SUPPORTED error and return
FALSE.
Since: 3.10
void e_book_backend_refresh (EBookBackend *backend,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously initiates a refresh for backend
, if the backend
supports
refreshing. The actual refresh operation completes on its own time. This
function, along with e_book_backend_refresh_finish(), merely initiates the
operation.
Once the refresh is initiated, callback
will be called. You can then
call e_book_backend_refresh_finish() to get the result of the initiation.
backend |
an EBookBackend |
|
cancellable |
optional GCancellable object, or |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
data to pass to the callback function |
Since: 3.10
gboolean e_book_backend_refresh_finish (EBookBackend *backend,GAsyncResult *result,GError **error);
Finishes the refresh initiation started with e_book_backend_refresh().
If an error occurred while initiating the refresh, the function will set
error
and return FALSE. If the backend
does not support refreshing,
the function will set an E_CLIENT_ERROR_NOT_SUPPORTED error and return
FALSE.
Since: 3.10
gboolean e_book_backend_create_contacts_sync (EBookBackend *backend,const gchar * const *vcards,GQueue *out_contacts,GCancellable *cancellable,GError **error);
Creates one or more new contacts from vcards
, and deposits an EContact
instance for each newly-created contact in out_contacts
.
The returned EContact instances are referenced for thread-safety and
must be unreferenced with g_object_unref() when finished with them.
If an error occurs, the function will set error
and return FALSE.
backend |
an EBookBackend |
|
vcards |
a |
|
out_contacts |
a GQueue in which to deposit results |
|
cancellable |
optional GCancellable object, or |
|
error |
Since: 3.10
void e_book_backend_create_contacts (EBookBackend *backend,const gchar * const *vcards,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously creates one or more new contacts from vcards
.
When the operation is finished, callback
will be called. You can then
call e_book_backend_create_contacts_finish() to get the result of the
operation.
backend |
an EBookBackend |
|
vcards |
a |
|
cancellable |
optional GCancellable object, or |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
data to pass to the callback function |
Since: 3.10
gboolean e_book_backend_create_contacts_finish (EBookBackend *backend,GAsyncResult *result,GQueue *out_contacts,GError **error);
Finishes the operation started with e_book_backend_create_contacts().
An EContact instance for each newly-created contact is deposited in
out_contacts
. The returned EContact instances are referenced for
thread-safety and must be unreferenced with g_object_unref() when
finished with them.
If an error occurred, the function will set error
and return FALSE.
Since: 3.10
gboolean e_book_backend_modify_contacts_sync (EBookBackend *backend,const gchar * const *vcards,GCancellable *cancellable,GError **error);
Modifies one or more contacts according to vcards
.
If an error occurs, the function will set error
and return FALSE.
backend |
an EBookBackend |
|
vcards |
a |
|
cancellable |
optional GCancellable object, or |
|
error |
Since: 3.10
void e_book_backend_modify_contacts (EBookBackend *backend,const gchar * const *vcards,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously modifies one or more contacts according to vcards
.
When the operation is finished, callback
will be called. You can then
call e_book_backend_modify_contacts_finish() to get the result of the
operation.
backend |
an EBookBackend |
|
vcards |
a |
|
cancellable |
optional GCancellable object, or |
|
callback |
a GAsyncReadyCallback to call when the request is satisfied |
|
user_data |
data to pass to the callback function |
Since: 3.10
gboolean e_book_backend_modify_contacts_finish (EBookBackend *backend,GAsyncResult *result,GError **error);
Finishes the operation started with e_book_backend_modify_contacts().
If an error occurred, the function will set error
and return FALSE.
Since: 3.10
gboolean e_book_backend_remove_contacts_sync (EBookBackend *backend,const gchar * const *uids,GCancellable *cancellable,GError **error);
Removes one or more contacts according to uids
.
If an error occurs, the function will set error
and return FALSE.
backend |
an EBookBackend |
|
uids |
a |
|
cancellable |
optional GCancellable object, or |
|
error |
Since: 3.10