EBookBackendSync

EBookBackendSync

Synopsis

struct              EBookBackendSync;
gboolean            e_book_backend_sync_construct       (EBookBackendSync *backend);
void                e_book_backend_sync_open            (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         gboolean only_if_exists,
                                                         GError **error);
void                e_book_backend_sync_remove          (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                e_book_backend_sync_refresh         (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         GError **error);
gboolean            e_book_backend_sync_get_backend_property
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *prop_name,
                                                         gchar **prop_value,
                                                         GError **error);
gboolean            e_book_backend_sync_set_backend_property
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *prop_name,
                                                         const gchar *prop_value,
                                                         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_get_contact_list_uids
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *query,
                                                         GSList **contacts_uids,
                                                         GError **error);
void                e_book_backend_sync_authenticate_user
                                                        (EBookBackendSync *backend,
                                                         GCancellable *cancellable,
                                                         ECredentials *credentials,
                                                         GError **error);

Description

Details

struct EBookBackendSync

struct EBookBackendSync {
	EBookBackend parent_object;
	EBookBackendSyncPrivate *priv;
};


e_book_backend_sync_construct ()

gboolean            e_book_backend_sync_construct       (EBookBackendSync *backend);

Does nothing.

backend :

an EBookBackendSync

Returns :

TRUE.

e_book_backend_sync_open ()

void                e_book_backend_sync_open            (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         gboolean only_if_exists,
                                                         GError **error);

Opens backend, which can involve connecting it to a remote server.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

only_if_exists :

whether open only if exists

error :

GError to set, when something fails

Since 3.2


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_refresh ()

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

Calls the refresh_sync method on the given backend.

backend :

An EBookBackendSync object.

book :

An EDataBook object.

cancellable :

a GCancellable for the operation

error :

Out parameter for a GError.

Since 3.2


e_book_backend_sync_get_backend_property ()

gboolean            e_book_backend_sync_get_backend_property
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *prop_name,
                                                         gchar **prop_value,
                                                         GError **error);

Calls the get_backend_property_sync method on the given backend.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

prop_name :

Property name whose value to retrieve.

prop_value :

Return value of the prop_name.

error :

GError to set, when something fails

Returns :

whether processed this property. Returning FALSE means to pass the call to the EBookBackend parent class, thus neither error should be set in this case.

Since 3.2


e_book_backend_sync_set_backend_property ()

gboolean            e_book_backend_sync_set_backend_property
                                                        (EBookBackendSync *backend,
                                                         EDataBook *book,
                                                         GCancellable *cancellable,
                                                         const gchar *prop_name,
                                                         const gchar *prop_value,
                                                         GError **error);

Calls the set_backend_property_sync method on the given backend.

backend :

an EBookBackendSync

book :

an EDataBook

cancellable :

a GCancellable for the operation

prop_name :

Property name to set.

prop_value :

New value of the prop_name.

error :

GError to set, when something fails

Returns :

whether processed this property. Returning FALSE means to pass the call to the EBookBackend parent class, thus neither error should be set in this case.

Since 3.2


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

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_get_contact_list_uids ()

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

Gets a list of contact UIDS 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_uids :

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

error :

GError to set, when something fails

Since 3.2


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