EBook.BookClient¶
- Subclasses:
 None
Methods¶
- Inherited:
 EDataServer.Client (47), GObject.Object (37), Gio.AsyncInitable (4), Gio.Initable (2)
- Structs:
 
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r  | 
The currently active locale for this addressbook  | 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent  | 
r  | 
Class Details¶
- class EBook.BookClient(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
Contains only private data that should be read and manipulated using the functions below.
New in version 3.2.
- classmethod connect(source, wait_for_connected_seconds, cancellable, callback, *user_data)¶
 - Parameters:
 source (
EDataServer.Source) – anEDataServer.Sourcewait_for_connected_seconds (
int) – timeout, in seconds, to wait for the backend to be fully connectedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
Asynchronously creates a new
EBook.BookClientfor source.The wait_for_connected_seconds argument had been added since 3.16, to let the caller decide how long to wait for the backend to fully connect to its (possibly remote) data store. This is required due to a change in the authentication process, which is fully asynchronous and done on the client side, while not every client is supposed to response to authentication requests. In case the backend will not connect within the set interval, then it is opened in an offline mode. A special value -1 can be used to not wait for the connected state at all.
Unlike with
EBook.BookClient.new(), there is no need to callEDataServer.Client.open() after obtaining theEBook.BookClient.When the operation is finished, callback will be called. You can then call
EBook.BookClient.connect_finish() to get the result of the operation.New in version 3.8.
- classmethod connect_direct(source, wait_for_connected_seconds, cancellable, callback, *user_data)¶
 - Parameters:
 source (
EDataServer.Source) – anEDataServer.Sourcewait_for_connected_seconds (
int) – timeout, in seconds, to wait for the backend to be fully connectedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
Like
EBook.BookClient.connect(), except creates the book client for direct read access to the underlying addressbook.When the operation is finished, callback will be called. You can then call
EBook.BookClient.connect_direct_finish() to get the result of the operation.New in version 3.12.
- classmethod connect_direct_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 a new
EBook.BookClient, orNoneon error- Return type:
 
Finishes the operation started with
EBook.BookClient.connect_direct(). If an error occurs in connecting to the D-Bus service, the function sets error and returnsNone.For error handling convenience, any error message returned by this function will have a descriptive prefix that includes the display name of the
EDataServer.Sourcepassed toEBook.BookClient.connect_direct().New in version 3.12.
- classmethod connect_direct_sync(registry, source, wait_for_connected_seconds, cancellable)¶
 - Parameters:
 registry (
EDataServer.SourceRegistry) – anEDataServer.SourceRegistrysource (
EDataServer.Source) – anEDataServer.Sourcewait_for_connected_seconds (
int) – timeout, in seconds, to wait for the backend to be fully connectedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
 - Returns:
 a new but unopened
EBook.BookClientorNoneon error.- Return type:
 
Like
EBook.BookClient.connect_sync(), except creates the book client for direct read access to the underlying addressbook.New in version 3.8.
- classmethod connect_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 a new
EBook.BookClient, orNoneon error- Return type:
 
Finishes the operation started with
EBook.BookClient.connect(). If an error occurs in connecting to the D-Bus service, the function sets error and returnsNone.For error handling convenience, any error message returned by this function will have a descriptive prefix that includes the display name of the
EDataServer.Sourcepassed toEBook.BookClient.connect().New in version 3.8.
- classmethod connect_sync(source, wait_for_connected_seconds, cancellable)¶
 - Parameters:
 source (
EDataServer.Source) – anEDataServer.Sourcewait_for_connected_seconds (
int) – timeout, in seconds, to wait for the backend to be fully connectedcancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
 - Returns:
 a new
EBook.BookClient, orNoneon error- Return type:
 
Creates a new
EBook.BookClientfor source. If an error occurs, the function will set error and returnFalse.Unlike with
EBook.BookClient.new(), there is no need to callEDataServer.Client.open_sync() after obtaining theEBook.BookClient.The wait_for_connected_seconds argument had been added since 3.16, to let the caller decide how long to wait for the backend to fully connect to its (possibly remote) data store. This is required due to a change in the authentication process, which is fully asynchronous and done on the client side, while not every client is supposed to response to authentication requests. In case the backend will not connect within the set interval, then it is opened in an offline mode. A special value -1 can be used to not wait for the connected state at all.
For error handling convenience, any error message returned by this function will have a descriptive prefix that includes the display name of source.
New in version 3.8.
- classmethod get_self(registry)¶
 - Parameters:
 registry (
EDataServer.SourceRegistry) – anEDataServer.SourceRegistry- Raises:
 - Returns:
 Trueif successful, otherwiseFalse.- out_contact:
 an
EBookContacts.Contactpointer to set- out_client:
 an
EBook.BookClientpointer to set
- Return type:
 (
bool, out_contact:EBookContacts.Contact, out_client:EBook.BookClient)
Get the
EBookContacts.Contactreferring to the user of the address book and set it in out_contact and out_client.New in version 3.2.
- classmethod is_self(contact)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contact- Returns:
 - Return type:
 
Check if contact is the user of the address book.
New in version 3.2.
- classmethod new(source)¶
 - Parameters:
 source (
EDataServer.Source) – AnEDataServer.Sourcepointer- Raises:
 - Returns:
 a new but unopened
EBook.BookClient.- Return type:
 
Creates a new
EBook.BookClientcorresponding to the given source. There are only two operations that are valid on this book at this point:EDataServer.Client.open(), andEDataServer.Client.remove().New in version 3.2.
Deprecated since version 3.8: It covertly makes synchronous D-Bus calls, with no way to cancel. Use
EBook.BookClient.connect() instead, which combinesEBook.BookClient.new() andEDataServer.Client.open() into one step.
- add_contact(contact, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contactopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Adds contact to self. The call is finished by
EBook.BookClient.add_contact_finish() from the callback.New in version 3.2.
- add_contact_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_added_uid:
 UID of a newly added contact; can be
None
- Return type:
 
Finishes previous call of
EBook.BookClient.add_contact() and sets out_added_uid to a UID of a newly added contact. This string should be freed withGLib.free().Note: This is not modifying original
EBookContacts.Contact.New in version 3.2.
- add_contact_sync(contact, opflags, cancellable)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contactopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_added_uid:
 UID of a newly added contact; can be
None
- Return type:
 
Adds contact to self and sets out_added_uid to a UID of a newly added contact. This string should be freed with
GLib.free().Note: This is not modifying original contact, thus if it’s needed, then use
EBookContacts.Contact.set(contact,EBookContacts.ContactField.UID, new_uid).New in version 3.2.
- add_contacts(contacts, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 contacts ([
EBookContacts.Contact]) – aGLib.SListofEBookContacts.Contactobjects to addopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Adds contacts to self. The call is finished by
EBook.BookClient.add_contacts_finish() from the callback.New in version 3.4.
- add_contacts_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_added_uids:
 UIDs of newly added contacts; can be
None
- Return type:
 
Finishes previous call of
EBook.BookClient.add_contacts() and sets out_added_uids to the UIDs of newly added contacts if successful. ThisGLib.SListshould be freed withEDataServer.Client.util_free_string_slist().If any of the contacts cannot be inserted, all of the insertions will be reverted and this method will return
False.Note: This is not modifying original
EBookContacts.Contactobjects.New in version 3.4.
- add_contacts_sync(contacts, opflags, cancellable)¶
 - Parameters:
 contacts ([
EBookContacts.Contact]) – aGLib.SListofEBookContacts.Contactobjects to addopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_added_uids:
 UIDs of newly added contacts; can be
None
- Return type:
 
Adds contacts to self and sets out_added_uids to the UIDs of newly added contacts if successful. This
GLib.SListshould be freed withEDataServer.Client.util_free_string_slist().If any of the contacts cannot be inserted, all of the insertions will be reverted and this method will return
False.Note: This is not modifying original contacts, thus if it’s needed, then use
EBookContacts.Contact.set(contact,EBookContacts.ContactField.UID, new_uid).New in version 3.4.
- contains_email(email_address, cancellable, callback, *user_data)¶
 - Parameters:
 email_address (
str) – an email addresscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Asynchronously 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.When the operation is finished, callback will be called. You can then call
EBook.BookClient.contains_email_finish() to get the result of the operation.New in version 3.44.
- contains_email_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 - Return type:
 
Finishes previous call of
EBook.BookClient.contains_email().New in version 3.44.
- contains_email_sync(email_address, cancellable)¶
 - Parameters:
 email_address (
str) –cancellable (
Gio.CancellableorNone) –
- Raises:
 - Return type:
 
- get_contact(uid, cancellable, callback, *user_data)¶
 - Parameters:
 uid (
str) – a unique string ID specifying the contactcancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Receive
EBookContacts.Contactfrom the self for the given uid. The call is finished byEBook.BookClient.get_contact_finish() from the callback.New in version 3.2.
- get_contact_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_contact:
 an
EBookContacts.Contactfor previously given uid
- Return type:
 (
bool, out_contact:EBookContacts.Contact)
Finishes previous call of
EBook.BookClient.get_contact(). If successful, then the out_contact is set to newly allocatedEBookContacts.Contact, which should be freed withGObject.Object.unref().New in version 3.2.
- get_contact_sync(uid, cancellable)¶
 - Parameters:
 uid (
str) – a unique string ID specifying the contactcancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_contact:
 an
EBookContacts.Contactfor given uid
- Return type:
 (
bool, out_contact:EBookContacts.Contact)
Receive
EBookContacts.Contactfrom the self for the gived uid. If successful, then the out_contact is set to newly allocatedEBookContacts.Contact, which should be freed withGObject.Object.unref().New in version 3.2.
- get_contacts(sexp, cancellable, callback, *user_data)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querycancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Query self with sexp, receiving a list of contacts which matched. The call is finished by
EBook.BookClient.get_contacts_finish() from the callback.Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.2.
- get_contacts_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_contacts:
 a
GLib.SListof matchedEBookContacts.Contact(s)
- Return type:
 (
bool, out_contacts: [EBookContacts.Contact])
Finishes previous call of
EBook.BookClient.get_contacts(). If successful, then the out_contacts is set to newly allocated list ofEBookContacts.Contact(s), which should be freed withEDataServer.Client.util_free_object_slist().New in version 3.2.
- get_contacts_sync(sexp, cancellable)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querycancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_contacts:
 a
GLib.SListof matchedEBookContacts.Contact(s)
- Return type:
 (
bool, out_contacts: [EBookContacts.Contact])
Query self with sexp, receiving a list of contacts which matched. If successful, then the out_contacts is set to newly allocated
GLib.SListofEBookContacts.Contact(s), which should be freed withEDataServer.Client.util_free_object_slist().Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.2.
- get_contacts_uids(sexp, cancellable, callback, *user_data)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querycancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Query self with sexp, receiving a list of contacts UIDs which matched. The call is finished by
EBook.BookClient.get_contacts_uids_finish() from the callback.Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.2.
- get_contacts_uids_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_contact_uids:
 a
GLib.SListof matched contact UIDs stored as strings
- Return type:
 
Finishes previous call of
EBook.BookClient.get_contacts_uids(). If successful, then the out_contact_uids is set to newly allocated list of UID strings, which should be freed withEDataServer.Client.util_free_string_slist().New in version 3.2.
- get_contacts_uids_sync(sexp, cancellable)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querycancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_contact_uids:
 a
GLib.SListof matched contacts UIDs stored as strings
- Return type:
 
Query self with sexp, receiving a list of contacts UIDs which matched. If successful, then the out_contact_uids is set to newly allocated list of UID strings, which should be freed with
EDataServer.Client.util_free_string_slist().Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.2.
- get_cursor(sexp, sort_fields, sort_types, n_fields, cancellable, callback, *user_data)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querysort_fields (
EBookContacts.ContactField) – an array ofEBookContacts.ContactFieldsto sort the cursor withsort_types (
EBookContacts.BookCursorSortType) – an array ofEBookContacts.BookCursorSortTypesto complement sort_fieldsn_fields (
int) – the length of the input sort_fields and sort_types arrayscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Create an
EBook.BookClientCursor. The call is finished byEBook.BookClient.get_cursor_finish() from the callback.Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.12.
- get_cursor_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_cursor:
 return location for an
EBook.BookClientCursor
- Return type:
 (
bool, out_cursor:EBook.BookClientCursor)
Finishes previous call of
EBook.BookClient.get_cursor(). If successful, then the out_cursor is set to newly createEBook.BookClientCursor, the cursor should be freed withGObject.Object.unref() when no longer needed.New in version 3.12.
- get_cursor_sync(sexp, sort_fields, sort_types, n_fields, cancellable)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querysort_fields (
EBookContacts.ContactField) – an array ofEBookContacts.ContactFieldsto sort the cursor withsort_types (
EBookContacts.BookCursorSortType) – an array ofEBookContacts.BookCursorSortTypesto complement sort_fieldsn_fields (
int) – the length of the input sort_fields and sort_types arrayscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_cursor:
 return location for an
EBook.BookClientCursor
- Return type:
 (
bool, out_cursor:EBook.BookClientCursor)
Create an
EBook.BookClientCursor. If successful, then the out_cursor is set to newly allocatedEBook.BookClientCursor, the cursor should be freed withGObject.Object.unref() when no longer needed.Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.12.
- get_locale()¶
 - Returns:
 The currently set locale for self
- Return type:
 
Reports the locale in use for self. The addressbook might sort contacts in different orders, or store and compare phone numbers in different ways depending on the currently set locale.
Locales can change dynamically if systemd decides to change the locale, so it’s important to listen for notifications on the
EBook.BookClient:localeproperty if you depend on sorted result lists. Ordered results should be reloaded after a locale change is detected.New in version 3.12.
- get_view(sexp, cancellable, callback, *user_data)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querycancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Query self with sexp, creating an
EBook.BookClientView. The call is finished byEBook.BookClient.get_view_finish() from the callback.Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.2.
- get_view_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_view:
 
- Return type:
 (
bool, out_view:EBook.BookClientView)
Finishes previous call of
EBook.BookClient.get_view(). If successful, then the out_view is set to newly allocatedEBook.BookClientView, which should be freed withGObject.Object.unref().New in version 3.2.
- get_view_sync(sexp, cancellable)¶
 - Parameters:
 sexp (
str) – an S-expression representing the querycancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 Trueif successful,Falseotherwise.- out_view:
 
- Return type:
 (
bool, out_view:EBook.BookClientView)
Query self with sexp, creating an
EBook.BookClientView. If successful, then the out_view is set to newly allocatedEBook.BookClientView, which should be freed withGObject.Object.unref().Note: sexp can be obtained through
EBookContacts.BookQuery, by converting it to a string withEBookContacts.BookQuery.to_string().New in version 3.2.
- modify_contact(contact, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contactopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Applies the changes made to contact to the stored version in self. The call is finished by
EBook.BookClient.modify_contact_finish() from the callback.New in version 3.2.
- modify_contact_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 - Return type:
 
Finishes previous call of
EBook.BookClient.modify_contact().New in version 3.2.
- modify_contact_sync(contact, opflags, cancellable)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contactopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 - Return type:
 
Applies the changes made to contact to the stored version in self.
New in version 3.2.
- modify_contacts(contacts, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 contacts ([
EBookContacts.Contact]) – aGLib.SListofEBookContacts.Contactobjectsopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Applies the changes made to contacts to the stored versions in self. The call is finished by
EBook.BookClient.modify_contacts_finish() from the callback.New in version 3.4.
- modify_contacts_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 - Return type:
 
Finishes previous call of
EBook.BookClient.modify_contacts().New in version 3.4.
- modify_contacts_sync(contacts, opflags, cancellable)¶
 - Parameters:
 contacts ([
EBookContacts.Contact]) – aGLib.SListofEBookContacts.Contactobjectsopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 - Return type:
 
Applies the changes made to contacts to the stored versions in self.
New in version 3.4.
- remove_contact(contact, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contactopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Removes contact from the self. The call is finished by
EBook.BookClient.remove_contact_finish() from the callback.New in version 3.2.
- remove_contact_by_uid(uid, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 uid (
str) – a UID of a contact to removeopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Removes contact with uid from the self. The call is finished by
EBook.BookClient.remove_contact_by_uid_finish() from the callback.New in version 3.2.
- remove_contact_by_uid_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 - Return type:
 
Finishes previous call of
EBook.BookClient.remove_contact_by_uid().New in version 3.2.
- remove_contact_by_uid_sync(uid, opflags, cancellable)¶
 - Parameters:
 uid (
str) – a UID of a contact to removeopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 - Return type:
 
Removes contact with uid from the self.
New in version 3.2.
- remove_contact_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 - Return type:
 
Finishes previous call of
EBook.BookClient.remove_contact().New in version 3.2.
- remove_contact_sync(contact, opflags, cancellable)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contactopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 - Return type:
 
Removes contact from the self.
New in version 3.2.
- remove_contacts(uids, opflags, cancellable, callback, *user_data)¶
 - Parameters:
 uids ([
str]) – aGLib.SListof UIDs to removeopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNonecallback (
Gio.AsyncReadyCallbackorNone) – callback to call when a result is ready
Removes the contacts with uids from the list uids from self. This is always more efficient than calling
EBook.BookClient.remove_contact() if you have more than one uid to remove, as some backends can implement it as a batch request. The call is finished byEBook.BookClient.remove_contacts_finish() from the callback.New in version 3.2.
- remove_contacts_finish(result)¶
 - Parameters:
 result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
 - Returns:
 - Return type:
 
Finishes previous call of
EBook.BookClient.remove_contacts().New in version 3.2.
- remove_contacts_sync(uids, opflags, cancellable)¶
 - Parameters:
 uids ([
str]) – aGLib.SListof UIDs to removeopflags (
EBookContacts.BookOperationFlags) – bit-or ofEBookContacts.BookOperationFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable; can beNone
- Raises:
 - Returns:
 - Return type:
 
Removes the contacts with uids from the list uids from self. This is always more efficient than calling
EBook.BookClient.remove_contact() if you have more than one uid to remove, as some backends can implement it as a batch request.New in version 3.2.
- set_self(contact)¶
 - Parameters:
 contact (
EBookContacts.Contact) – anEBookContacts.Contact- Raises:
 - Returns:
 - Return type:
 
Specify that contact residing in self is the
EBookContacts.Contactthat refers to the user of the address book.New in version 3.2.