EDataBook.DataBook¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37), Gio.Initable (2) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(backend, connection, object_path) | 
| class | string_slist_to_comma_string(strings) | 
| get_connection() | |
| get_object_path() | |
| ref_backend() | |
| report_backend_property_changed(prop_name, prop_value) | |
| report_error(message) | |
| respond_create_contacts(opid, error, contacts) | |
| respond_get_contact(opid, error, contact) | |
| respond_get_contact_list(opid, error, contacts) | |
| respond_get_contact_list_uids(opid, error, uids) | |
| respond_modify_contacts(opid, error, contacts) | |
| respond_open(opid, error) | |
| respond_refresh(opid, error) | |
| respond_remove_contacts(opid, error, ids) | |
| set_locale(locale, cancellable) | 
Virtual Methods¶
| Inherited: | GObject.Object (7), Gio.Initable (1) | 
|---|
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| backend | EDataBook.BookBackend | r/w/co | The backend driving this connection | 
| connection | Gio.DBusConnection | r/w/co | The Gio.DBusConnectionon which to export the address book interface | 
| object-path | str | r/w/co | The object path at which to export the address book interface | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class EDataBook.DataBook(**kwargs)¶
- Bases: - GObject.Object,- Gio.Initable- Abstract: - No - Structure: - EDataBook.DataBookClass- 
classmethod new(backend, connection, object_path)¶
- Parameters: - backend (EDataBook.BookBackend) – anEDataBook.BookBackend
- connection (Gio.DBusConnection) – aGio.DBusConnection
- object_path (str) – object path for the D-Bus interface
 - Raises: - Returns: - an - EDataBook.DataBook, or- Noneon error- Return type: - Creates a new - EDataBook.DataBookand exports the AddressBook D-Bus interface on connection at object_path. The- EDataBook.DataBookhandles incoming remote method invocations and forwards them to the backend. If the AddressBook interface fails to export, the function sets error and returns- None.
- backend (
 - 
classmethod string_slist_to_comma_string(strings)¶
- Parameters: - strings ([ - str]) – a list of- str*- Returns: - comma-separated newly allocated text of strings - Return type: - str- Takes a list of strings and converts it to a comma-separated string of values; free returned pointer with - GLib.free()- New in version 3.2. 
 - 
get_connection()¶
- Returns: - the - Gio.DBusConnection- Return type: - Gio.DBusConnection- Returns the - Gio.DBusConnectionon which the AddressBook D-Bus interface is exported.- New in version 3.8. 
 - 
get_object_path()¶
- Returns: - the object path - Return type: - str- Returns the object path at which the AddressBook D-Bus interface is exported. - New in version 3.8. 
 - 
ref_backend()¶
- Returns: - an - EDataBook.BookBackend- Return type: - EDataBook.BookBackend- Returns the - EDataBook.BookBackendto which incoming remote method invocations are being forwarded.- The returned - EDataBook.BookBackendis referenced for thread-safety and should be unreferenced with- GObject.Object.unref() when finished with it.- New in version 3.10. 
 - 
report_backend_property_changed(prop_name, prop_value)¶
- Parameters: - Notifies the clients about a property change. - New in version 3.2. 
 - 
report_error(message)¶
- Parameters: - message ( - str) – An error message- Notifies the clients about an error, which happened out of any client-initiate operation. - New in version 3.2. 
 - 
respond_create_contacts(opid, error, contacts)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
- contacts ([EBookContacts.Contact] orNone) – A list of createdEBookContacts.Contact(s), orNoneon error
 - Finishes a call to create a list contacts. - New in version 3.4. 
- opid (
 - 
respond_get_contact(opid, error, contact)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.ErrororNone) – Operation error, if any, automatically freed if passed it
- contact (EBookContacts.ContactorNone) – the foundEBookContacts.Contact, orNone, if it could not be found
 - Notifies listeners of the completion of the get_contact method call. Only one of error and contact can be set. 
- opid (
 - 
respond_get_contact_list(opid, error, contacts)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
- contacts ([EBookContacts.Contact] orNone) – A list ofEBookContacts.Contact, orNoneon error
 - Finishes a call to get list of - EBookContacts.Contact, which satisfy certain criteria.- New in version 3.2. 
- opid (
 - 
respond_get_contact_list_uids(opid, error, uids)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
- uids ([str] orNone) – A list of picked UIDs, orNoneon error
 - Finishes a call to get list of UIDs which satisfy certain criteria. - New in version 3.2. 
- opid (
 - 
respond_modify_contacts(opid, error, contacts)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
- contacts ([EBookContacts.Contact] orNone) – A list of modifiedEBookContacts.Contact(s), orNoneon error
 - Finishes a call to modify a list of contacts. - New in version 3.4. 
- opid (
 - 
respond_open(opid, error)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
 - Notifies listeners of the completion of the open method call. 
- opid (
 - 
respond_refresh(opid, error)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
 - Notifies listeners of the completion of the refresh method call. - New in version 3.2. 
- opid (
 - 
respond_remove_contacts(opid, error, ids)¶
- Parameters: - opid (int) – An operation ID
- error (GLib.Error) – Operation error, if any, automatically freed if passed it
- ids ([str] orNone) – A list of removed contact UID-s, orNoneon error
 - Finishes a call to remove a list of contacts. - New in version 3.4. 
- opid (
 - 
set_locale(locale, cancellable)¶
- Parameters: - locale (str) – the new locale to set for this book
- cancellable (Gio.CancellableorNone) – aGio.Cancellable
 - Raises: - Returns: - Trueon success, otherwise- Falseis returned and error is set appropriately.- Return type: - Set’s the locale for this addressbook, this can result in renormalization of locale sensitive data. - New in version 3.12. 
- locale (
 
- 
classmethod 
Property Details¶
- 
EDataBook.DataBook.props.backend¶
- Name: - backend- Type: - EDataBook.BookBackend- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The backend driving this connection 
- 
EDataBook.DataBook.props.connection¶
- Name: - connection- Type: - Gio.DBusConnection- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The - Gio.DBusConnectionon which to export the address book interface