EDataBook.BookBackendSync

g EBackend.Backend EBackend.Backend EDataBook.BookBackend EDataBook.BookBackend EBackend.Backend->EDataBook.BookBackend EDataBook.BookBackendSync EDataBook.BookBackendSync EDataBook.BookBackend->EDataBook.BookBackendSync GObject.Object GObject.Object GObject.Object->EBackend.Backend

Subclasses:

EDataBook.BookMetaBackend

Methods

Inherited:

EDataBook.BookBackend (70), EBackend.Backend (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

contains_email (email_address, cancellable)

create_contacts (vcards, opflags, cancellable)

get_contact (uid, cancellable)

get_contact_list (query, cancellable)

get_contact_list_uids (query, cancellable)

modify_contacts (vcards, opflags, cancellable)

open (cancellable)

refresh (cancellable)

remove_contacts (uids, opflags, cancellable)

Virtual Methods

Inherited:

EDataBook.BookBackend (22), EBackend.Backend (3), GObject.Object (7)

do_contains_email_sync (email_address, cancellable)

do_open_sync (cancellable)

do_refresh_sync (cancellable)

Properties

Inherited:

EDataBook.BookBackend (4), EBackend.Backend (5)

Signals

Inherited:

EDataBook.BookBackend (2), GObject.Object (1)

Fields

Inherited:

EDataBook.BookBackend (2), GObject.Object (1)

Name

Type

Access

Description

parent

EDataBook.BookBackend

r

Class Details

class EDataBook.BookBackendSync(**kwargs)
Bases:

EDataBook.BookBackend

Abstract:

No

Structure:

EDataBook.BookBackendSyncClass

Contains only private data that should be read and manipulated using the functions below.

contains_email(email_address, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True when found the email_address, False on failure

Return type:

bool

Checks whether contains an email_address. When the email_address contains multiple addresses, then returns True when at least one address exists in the address book.

If an error occurs, the function will set error and return False.

New in version 3.44.

create_contacts(vcards, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

out_contacts:

a GLib.SList in which to deposit results

Return type:

(bool, out_contacts: [EBookContacts.Contact])

Creates one or more new contacts from vcards, and deposits an EBookContacts.Contact instance for each newly-created contact in out_contacts.

The returned EBookContacts.Contact instances are referenced for thread-safety and must be unreferenced with GObject.Object.unref() when finished with them.

If an error occurs, the function will set error and return False.

New in version 3.34.

get_contact(uid, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

an EBookContacts.Contact, or None on error

Return type:

EBookContacts.Contact

Obtains an EBookContacts.Contact for uid.

The returned EBookContacts.Contact is referenced for thread-safety and must be unreferenced with GObject.Object.unref() when finished with it.

If an error occurs, the function will set error and return None.

New in version 3.34.

get_contact_list(query, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

out_contacts:

a GLib.SList in which to deposit results

Return type:

(bool, out_contacts: [EBookContacts.Contact])

Obtains a set of EBookContacts.Contact instances which satisfy the criteria specified in query, and deposits them in out_contacts.

The returned EBookContacts.Contact instances are referenced for thread-safety and must be unreferenced with GObject.Object.unref() when finished with them.

If an error occurs, the function will set error and return False. Note that an empty result set does not necessarily imply an error.

New in version 3.34.

get_contact_list_uids(query, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

out_uids:

a GLib.SList in which to deposit results

Return type:

(bool, out_uids: [str])

Obtains a set of ID strings for contacts which satisfy the criteria specified in query, and deposits them in out_uids.

The returned ID strings must be freed with GLib.free() with finished with them.

If an error occurs, the function will set error and return False. Note that an empty result set does not necessarily imply an error.

New in version 3.34.

modify_contacts(vcards, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

out_contacts:

a GLib.SList to deposit the modified contacts to

Return type:

(bool, out_contacts: [EBookContacts.Contact])

Modifies one or more contacts according to vcards.

If an error occurs, the function will set error and return False.

New in version 3.34.

open(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – optional Gio.Cancellable object, or None

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

“Opens” the self. 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.

New in version 3.34.

refresh(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – optional Gio.Cancellable object, or None

Raises:

GLib.Error

Returns:

True on success, False on failure

Return type:

bool

Initiates a refresh for self, if the self 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 self does not support refreshing, the function will set an EDataServer.ClientError.NOT_SUPPORTED error and return False.

New in version 3.34.

remove_contacts(uids, opflags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

out_removed_uids:

a GLib.SList of removed UIDs

Return type:

(bool, out_removed_uids: [str])

Removes one or more contacts according to uids.

If an error occurs, the function will set error and return False.

New in version 3.34.

do_contains_email_sync(email_address, cancellable) virtual
Parameters:
Return type:

bool

do_open_sync(cancellable) virtual
Parameters:

cancellable (Gio.Cancellable or None) –

Return type:

bool

do_refresh_sync(cancellable) virtual
Parameters:

cancellable (Gio.Cancellable or None) –

Return type:

bool