EDataBook.DataBook

g EDataBook.DataBook EDataBook.DataBook GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GObject.Object->EDataBook.DataBook Gio.Initable->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.DBusConnection on 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)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class EDataBook.DataBook(**kwargs)
Bases:GObject.Object, Gio.Initable
Abstract:No
Structure:EDataBook.DataBookClass
classmethod new(backend, connection, object_path)
Parameters:
Raises:

GLib.Error

Returns:

an EDataBook.DataBook, or None on error

Return type:

EDataBook.DataBook

Creates a new EDataBook.DataBook and exports the AddressBook D-Bus interface on connection at object_path. The EDataBook.DataBook handles incoming remote method invocations and forwards them to the backend. If the AddressBook interface fails to export, the function sets error and returns None.

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.DBusConnection on 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.BookBackend to which incoming remote method invocations are being forwarded.

The returned EDataBook.BookBackend is 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:
  • prop_name (str) – Property name which changed
  • prop_value (str) – The new property value

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:

Finishes a call to create a list contacts.

New in version 3.4.

respond_get_contact(opid, error, contact)
Parameters:

Notifies listeners of the completion of the get_contact method call. Only one of error and contact can be set.

respond_get_contact_list(opid, error, contacts)
Parameters:

Finishes a call to get list of EBookContacts.Contact, which satisfy certain criteria.

New in version 3.2.

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] or None) – A list of picked UIDs, or None on error

Finishes a call to get list of UIDs which satisfy certain criteria.

New in version 3.2.

respond_modify_contacts(opid, error, contacts)
Parameters:

Finishes a call to modify a list of contacts.

New in version 3.4.

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.

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.

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] or None) – A list of removed contact UID-s, or None on error

Finishes a call to remove a list of contacts.

New in version 3.4.

set_locale(locale, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, otherwise False is returned and error is set appropriately.

Return type:

bool

Set’s the locale for this addressbook, this can result in renormalization of locale sensitive data.

New in version 3.12.

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.DBusConnection on which to export the address book interface

EDataBook.DataBook.props.object_path
Name:object-path
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The object path at which to export the address book interface