EDataBook.BookBackendSync¶
- Subclasses:
Methods¶
- Inherited:
EDataBook.BookBackend (70), EBackend.Backend (21), GObject.Object (37)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class EDataBook.BookBackendSync(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data that should be read and manipulated using the functions below.
- contains_email(email_address, cancellable)¶
- Parameters:
email_address (
str) – an email addresscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
- Return type:
Checks whether contains an email_address. When the email_address contains multiple addresses, then returns
Truewhen 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:
opflags (
int) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
Trueon success,Falseon failure- out_contacts:
a
GLib.SListin which to deposit results
- Return type:
(
bool, out_contacts: [EBookContacts.Contact])
Creates one or more new contacts from vcards, and deposits an
EBookContacts.Contactinstance for each newly-created contact in out_contacts.The returned
EBookContacts.Contactinstances are referenced for thread-safety and must be unreferenced withGObject.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:
uid (
str) – a contact IDcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
an
EBookContacts.Contact, orNoneon error- Return type:
Obtains an
EBookContacts.Contactfor uid.The returned
EBookContacts.Contactis referenced for thread-safety and must be unreferenced withGObject.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:
query (
str) – a search query in S-expression formatcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
Trueon success,Falseon failure- out_contacts:
a
GLib.SListin which to deposit results
- Return type:
(
bool, out_contacts: [EBookContacts.Contact])
Obtains a set of
EBookContacts.Contactinstances which satisfy the criteria specified in query, and deposits them in out_contacts.The returned
EBookContacts.Contactinstances are referenced for thread-safety and must be unreferenced withGObject.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:
query (
str) – a search query in S-expression formatcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
Trueon success,Falseon failure- out_uids:
a
GLib.SListin which to deposit results
- Return type:
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:
opflags (
int) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
Trueon success,Falseon failure- out_contacts:
a
GLib.SListto 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.CancellableorNone) – optionalGio.Cancellableobject, orNone- Raises:
- Returns:
- Return type:
“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.CancellableorNone) – optionalGio.Cancellableobject, orNone- Raises:
- Returns:
- Return type:
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 anEDataServer.ClientError.NOT_SUPPORTEDerror and returnFalse.New in version 3.34.
- remove_contacts(uids, opflags, cancellable)¶
- Parameters:
opflags (
int) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
Trueon success,Falseon failure- out_removed_uids:
a
GLib.SListof removed UIDs
- Return type:
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:
email_address (
str) –cancellable (
Gio.CancellableorNone) –
- Return type:
- do_open_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.CancellableorNone) –- Return type:
Open the backend
- do_refresh_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.CancellableorNone) –- Return type:
Refresh the backend