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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
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:
opflags (
int
) – bit-or ofEBookContacts.BookOperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- 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 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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
an
EBookContacts.Contact
, orNone
on error- Return type:
Obtains an
EBookContacts.Contact
for uid.The returned
EBookContacts.Contact
is 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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- 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 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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
on success,False
on failure- out_uids:
a
GLib.SList
in 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.BookOperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- 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
orNone
) – optionalGio.Cancellable
object, 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.Cancellable
orNone
) – optionalGio.Cancellable
object, 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_SUPPORTED
error and returnFalse
.New in version 3.34.
- remove_contacts(uids, opflags, cancellable)¶
- Parameters:
opflags (
int
) – bit-or ofEBookContacts.BookOperationFlags
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
on success,False
on failure- out_removed_uids:
a
GLib.SList
of 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.Cancellable
orNone
) –
- Return type:
- do_open_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) –- Return type:
Open the backend
- do_refresh_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) –- Return type:
Refresh the backend