summaryrefslogtreecommitdiff
path: root/addressbook/libedata-book/e-book-backend.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-04-03 08:26:27 -0400
committerMatthew Barnes <mbarnes@redhat.com>2013-04-03 15:25:42 -0400
commitff89f59251f5af8dc5685418e766f12f4c814fe2 (patch)
tree45d510412c0168d05fbd3e92b958b27d54728fc4 /addressbook/libedata-book/e-book-backend.h
parent80fbdba9285e636bd7473f5368fc3246be8999d1 (diff)
downloadevolution-data-server-ff89f59251f5af8dc5685418e766f12f4c814fe2.tar.gz
EBookBackend: Add the new backend API alongside the old one.
The new and old EBookBackend class methods will co-exist temporarily, so I can start converting the simpler EBookBackendSync-based backends and make final adjustments to the new API.
Diffstat (limited to 'addressbook/libedata-book/e-book-backend.h')
-rw-r--r--addressbook/libedata-book/e-book-backend.h41
1 files changed, 39 insertions, 2 deletions
diff --git a/addressbook/libedata-book/e-book-backend.h b/addressbook/libedata-book/e-book-backend.h
index 8a6796a4b..d7a3857b7 100644
--- a/addressbook/libedata-book/e-book-backend.h
+++ b/addressbook/libedata-book/e-book-backend.h
@@ -108,16 +108,53 @@ struct _EBookBackendClass {
* dispatch queue, but helps avoid thread-safety issues. */
gboolean use_serial_dispatch_queue;
- /* Virtual methods */
gchar * (*get_backend_property) (EBookBackend *backend,
const gchar *prop_name);
+ gboolean (*open_sync) (EBookBackend *backend,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (*refresh_sync) (EBookBackend *backend,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (*create_contacts_sync) (EBookBackend *backend,
+ const gchar * const *vcards,
+ GQueue *out_contacts,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (*modify_contacts_sync) (EBookBackend *backend,
+ const gchar * const *vcards,
+ GQueue *out_contacts,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (*remove_contacts_sync) (EBookBackend *backend,
+ const gchar * const *uids,
+ GCancellable *cancellable,
+ GError **error);
+ EContact * (*get_contact_sync) (EBookBackend *backend,
+ const gchar *uid,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (*get_contact_list_sync)
+ (EBookBackend *backend,
+ const gchar *query,
+ GQueue *out_contacts,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (*get_contact_list_uids_sync)
+ (EBookBackend *backend,
+ const gchar *query,
+ GQueue *out_uids,
+ GCancellable *cancellable,
+ GError **error);
+
+ /* These methods are deprecated and will be removed once all
+ * known subclasses are converted to the new methods above. */
void (*open) (EBookBackend *backend,
EDataBook *book,
guint32 opid,
GCancellable *cancellable,
gboolean only_if_exists);
-
void (*refresh) (EBookBackend *backend,
EDataBook *book,
guint32 opid,