EDataBook.DataBookView

g EDataBook.DataBookView EDataBook.DataBookView GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GObject.Object->EDataBook.DataBookView Gio.Initable->EDataBook.DataBookView

Subclasses:None

Methods

Inherited:GObject.Object (37), Gio.Initable (2)
Structs:GObject.ObjectClass (5)
class new (backend, sexp, connection, object_path)
  get_connection ()
  get_fields_of_interest ()
  get_flags ()
  get_object_path ()
  get_sexp ()
  is_completed ()
  notify_complete (error)
  notify_progress (percent, message)
  notify_remove (id)
  notify_update (contact)
  notify_update_prefiltered_vcard (id, vcard)
  notify_update_vcard (id, vcard)
  ref_backend ()

Virtual Methods

Inherited:GObject.Object (7), Gio.Initable (1)

Properties

Name Type Flags Short Description
backend EDataBook.BookBackend r/w/co The backend being monitored
connection Gio.DBusConnection r/w/co The Gio.DBusConnection on which to export the view interface
object-path str r/w/co The object path at which to export the view interface
sexp EDataBook.BookBackendSExp r/w/co The query expression for this view

Signals

Inherited:GObject.Object (1)

Fields

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

Class Details

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

GLib.Error

Returns:

an EDataBook.DataBookView

Return type:

EDataBook.DataBookView

Creates a new EDataBook.DataBookView and exports its D-Bus interface on connection at object_path. If an error occurs while exporting, the function sets error and returns None.

get_connection()
Returns:the Gio.DBusConnection
Return type:Gio.DBusConnection

Returns the Gio.DBusConnection on which the AddressBookView D-Bus interface is exported.

New in version 3.8.

get_fields_of_interest()
Returns:Hash table of field names which the listener is interested in. Backends can return fully populated objects, but the listener advertised that it will use only these. Returns None for all available fields.

Note: The data pointer in the hash table has no special meaning, it’s only GINT_TO_POINTER(1) for easier checking. Also, field names are compared case insensitively.

Return type:{str: int} or None
get_flags()
Returns:the flags for self.
Return type:EBookContacts.BookClientViewFlags

Gets the EBookContacts.BookClientViewFlags that control the behaviour of self.

New in version 3.4.

get_object_path()
Returns:the object path
Return type:str

Returns the object path at which the AddressBookView D-Bus interface is exported.

New in version 3.8.

get_sexp()
Returns:The EDataBook.BookBackendSExp used.
Return type:EDataBook.BookBackendSExp

Gets the s-expression used for matching contacts to self.

New in version 3.8.

is_completed()
Returns:whether the self had been completed; that is, whether EDataBook.DataBookView.notify_complete() had been called since the self had been started.
Return type:bool

New in version 3.34.

notify_complete(error)
Parameters:error (GLib.Error) – the error of the query, if any

Notifies listeners that all pending updates on self have been sent. The listener’s information should now be in sync with the backend’s.

notify_progress(percent, message)
Parameters:
  • percent (int) – percent done; use -1 when not available
  • message (str) – a text message

Provides listeners with a human-readable text describing the current backend operation. This can be used for progress reporting.

New in version 3.2.

notify_remove(id)
Parameters:id (str) – a unique contact ID

Notify listeners that a contact specified by id was removed from self.

notify_update(contact)
Parameters:contact (EBookContacts.Contact) – an EBookContacts.Contact

Notify listeners that contact has changed. This can trigger an add, change or removal event depending on whether the change causes the contact to start matching, no longer match, or stay matching the query specified by self.

notify_update_prefiltered_vcard(id, vcard)
Parameters:
  • id (str) – the UID of this contact
  • vcard (str) – a plain vCard

Notify listeners that vcard has changed. This can trigger an add, change or removal event depending on whether the change causes the contact to start matching, no longer match, or stay matching the query specified by self. This method should be preferred over EDataBook.DataBookView.notify_update() when the native representation of a contact is a vCard.

The important difference between this method and EDataBook.DataBookView.notify_update() and EDataBook.DataBookView.notify_update_vcard() is that it doesn’t match the contact against the book view query to see if it should be included, it assumes that this has been done and the contact is known to exist in the view.

notify_update_vcard(id, vcard)
Parameters:
  • id (str) – a unique id of the vcard
  • vcard (str) – a plain vCard

Notify listeners that vcard has changed. This can trigger an add, change or removal event depending on whether the change causes the contact to start matching, no longer match, or stay matching the query specified by self. This method should be preferred over EDataBook.DataBookView.notify_update() when the native representation of a contact is a vCard.

ref_backend()
Returns:The associated EDataBook.BookBackend.
Return type:EDataBook.BookBackend or None

Refs the backend that self is querying. Unref the returned backend, if not None, with GObject.Object.unref(), when no longer needed.

New in version 3.34.

Property Details

EDataBook.DataBookView.props.backend
Name:backend
Type:EDataBook.BookBackend
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The backend being monitored

EDataBook.DataBookView.props.connection
Name:connection
Type:Gio.DBusConnection
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The Gio.DBusConnection on which to export the view interface

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

The object path at which to export the view interface

EDataBook.DataBookView.props.sexp
Name:sexp
Type:EDataBook.BookBackendSExp
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The query expression for this view