EBookBackendSync

EBookBackendSync

Synopsis

struct              EBookBackendSync;
gboolean            e_book_backend_sync_construct       (EBookBackendSync *backend);
void                e_book_backend_sync_remove          (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                e_book_backend_sync_create_contact  (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *vcard,
                                                         EContact **contact,
                                                         GError **error);
void                e_book_backend_sync_remove_contacts (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const GSList *id_list,
                                                         GSList **removed_ids,
                                                         GError **error);
void                e_book_backend_sync_modify_contact  (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *vcard,
                                                         EContact **contact,
                                                         GError **error);
void                e_book_backend_sync_get_contact     (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *id,
                                                         gchar **vcard,
                                                         GError **error);
void                e_book_backend_sync_get_contact_list
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *query,
                                                         GSList **contacts,
                                                         GError **error);
void                e_book_backend_sync_authenticate_user
                                                        (EBookBackendSync *backend,
                                                         GCancellable *cancellable,
                                                         ECredentials *credentials,
                                                         GError **error);

Object Hierarchy

  GObject
   +----EBookBackend
         +----EBookBackendSync

Description

Details

struct EBookBackendSync

struct EBookBackendSync;


e_book_backend_sync_construct ()

gboolean            e_book_backend_sync_construct       (EBookBackendSync *backend);

Does nothing.

backend :

an EBookBackendSync

Returns :

TRUE.

e_book_backend_sync_remove ()

void                e_book_backend_sync_remove          (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         GError **error);

Remove book's database and storage overhead from the storage medium. This will delete all contacts in book.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

error :

GError to set, when something fails

e_book_backend_sync_create_contact ()

void                e_book_backend_sync_create_contact  (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *vcard,
                                                         EContact **contact,
                                                         GError **error);

Creates a new contact with the contents of vcard in backend.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

vcard :

a VCard representation of a contact

contact :

a pointer to a location to store the resulting EContact

error :

GError to set, when something fails

e_book_backend_sync_remove_contacts ()

void                e_book_backend_sync_remove_contacts (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const GSList *id_list,
                                                         GSList **removed_ids,
                                                         GError **error);

Removes the contacts specified by id_list from backend. The returned list of removed contacts is in the same format as the passed-in list, and must be freed by the caller.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

id_list :

a GSList of pointers to unique contact ID strings

removed_ids :

a pointer to a location to store a list of the contacts actually removed

error :

GError to set, when something fails

e_book_backend_sync_modify_contact ()

void                e_book_backend_sync_modify_contact  (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *vcard,
                                                         EContact **contact,
                                                         GError **error);

Modifies the contact specified by the ID embedded in vcard, to reflect the full contents of vcard.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

vcard :

the string representation of a contact

contact :

a pointer to a location to store the resulting EContact

error :

GError to set, when something fails

e_book_backend_sync_get_contact ()

void                e_book_backend_sync_get_contact     (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *id,
                                                         gchar **vcard,
                                                         GError **error);

Gets a contact from book.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

id :

a unique contact ID

vcard :

a pointer to a location to store the resulting VCard string

error :


e_book_backend_sync_get_contact_list ()

void                e_book_backend_sync_get_contact_list
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *query,
                                                         GSList **contacts,
                                                         GError **error);

Gets a list of contacts from book. The list and its elements must be freed by the caller.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

query :

an s-expression of the query to perform

contacts :

a pointer to a location to store the resulting list of VCard strings

error :

GError to set, when something fails

e_book_backend_sync_authenticate_user ()

void                e_book_backend_sync_authenticate_user
                                                        (EBookBackendSync *backend,
                                                         GCancellable *cancellable,
                                                         ECredentials *credentials,
                                                         GError **error);

Authenticates backend with given credentials.

backend :

an EBookBackendSync

cancellable :

a GCancellable for the operation

credentials :

an ECredentials to authenticate with

error :

GError to set, when something fails