EDataBook.BookBackendSync¶
| Subclasses: | EDataBook.BookMetaBackend | 
|---|
Methods¶
| Inherited: | EDataBook.BookBackend (57), EBackend.Backend (20), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| 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 (18), EBackend.Backend (3), GObject.Object (7) | 
|---|
| 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. - 
create_contacts(vcards, opflags, cancellable)¶
- Parameters: - vcards (str) – aNone-terminated array of vCard strings
- opflags (int) – bit-or ofEBookContacts.BookOperationFlags
- cancellable (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 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. 
- vcards (
 - 
get_contact(uid, cancellable)¶
- Parameters: - uid (str) – a contact ID
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - an - EBookContacts.Contact, or- None- Return type: - Obtains an - EBookContacts.Contactfor uid.- The returned - EBookContacts.Contactis 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. 
- uid (
 - 
get_contact_list(query, cancellable)¶
- Parameters: - query (str) – a search query in S-expression format
- cancellable (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 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. 
- query (
 - 
get_contact_list_uids(query, cancellable)¶
- Parameters: - query (str) – a search query in S-expression format
- cancellable (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. 
- query (
 - 
modify_contacts(vcards, opflags, cancellable)¶
- Parameters: - vcards (str) – aNone-terminated array of vCard strings
- opflags (int) – bit-or ofEBookContacts.BookOperationFlags
- cancellable (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. 
- vcards (
 - 
open(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - Trueon success,- Falseon 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.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - Trueon success,- Falseon 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_SUPPORTEDerror and return- False.- New in version 3.34. 
 - 
remove_contacts(uids, opflags, cancellable)¶
- Parameters: - uids (str) – aNone-terminated array of contact ID strings
- opflags (int) – bit-or ofEBookContacts.BookOperationFlags
- cancellable (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. 
- uids (
 - 
do_open_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) –- Return type: - bool
 - 
do_refresh_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) –- Return type: - bool
 
-