EBook.BookClientView¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The |
||
r/w/co |
The |
||
r |
|||
r |
|||
r/w/co |
The object path used to create the D-Bus proxy |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The signal is emitted whenever content of any contact in the client_view changes, or a contact is added or removed. |
|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class EBook.BookClientView(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data the should be read and manipulated using the functions below.
New in version 3.2.
- dup_contacts(range_start, range_length, cancellable, cb, *user_data)¶
- Parameters:
range_start (
int
) – 0-based range start to retrieve the contacts forrange_length (
int
) – how many contacts to retrievecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
cb (
Gio.AsyncReadyCallback
orNone
) – a callback to call when the contacts are received
Asynchronously reads range_length contacts from index range_start. When there are asked more than
EBook.BookClientView.get_n_total
() contacts only those up to the total number of contacts are read. Asking for out of range contacts results in an error.Finish the call by
EBook.BookClientView.dup_contacts_finish
() from the cb.Note: This function can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- dup_contacts_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – an asynchronous call result- Raises:
- Returns:
whether succeeded; if not, the error is set
- out_range_start:
output location where to store original range start, or
None
- out_contacts:
output location where to store array of the read contacts
- Return type:
(
bool
, out_range_start:int
, out_contacts: [EBookContacts.Contact
])
Finishes previous call of
EBook.BookClientView.dup_contacts
(); see it for further information.Free the returned
GLib.PtrArray
with g_ptr_array_unref(), when no longer needed.Note: This function can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- dup_indices()¶
- Returns:
list of indices for the view
- Return type:
Returns a list of
EBookContacts.BookIndices
holding indices of the contacts in the view. These are received from the first sort field set byEBook.BookClientView.set_sort_fields_sync
(). The last item of the returned array is the one with chr member beingNone
.Free the returned array with e_book_indices_free(), when no longer needed.
Note: This function can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- get_client()¶
- Returns:
- Return type:
Returns the
EBook.BookClientView
:client
associated with self.Deprecated since version 3.10: Use
EBook.BookClientView.ref_client
() instead.
- get_connection()¶
- Returns:
- Return type:
Returns the
Gio.DBusConnection
used to create the D-Bus proxy.New in version 3.8.
- get_id()¶
- Returns:
an identifier of the view
- Return type:
Returns an identifier of the self. It does not change for the whole life time of the self.
Note: This function can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- get_n_total()¶
- Returns:
how many contacts are available in the view
- Return type:
Returns how many contacts are available in the view.
Note: This function can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- get_object_path()¶
- Returns:
the object path
- Return type:
Returns the object path used to create the D-Bus proxy.
New in version 3.8.
- ref_client()¶
- Returns:
- Return type:
Returns the
EBook.BookClientView
:client
associated with self.The returned
EBook.BookClient
is referenced for thread-safety. Unreference theEBook.BookClient
withGObject.Object.unref
() when finished with it.New in version 3.10.
- set_fields_of_interest(fields_of_interest)¶
- Parameters:
fields_of_interest ([
str
]) – List of field names in which the client is interested- Raises:
Client can instruct server to which fields it is interested in only, thus the server can return less data over the wire. The server can still return complete objects, this is just a hint to it that the listed fields will be used only. The UID field is returned always. Initial views has no fields of interest and using
None
for fields_of_interest will unset any previous changes.Some backends can use summary information of its cache to create artifical objects, which will omit stored object parsing. If this cannot be done then it will simply return object as is stored in the cache.
- set_flags(flags)¶
- Parameters:
flags (
EBookContacts.BookClientViewFlags
) – theEBookContacts.BookClientViewFlags
for self- Raises:
Sets the flags which control the behaviour of self.
New in version 3.4.
- set_sort_fields_sync(fields, cancellable)¶
- Parameters:
fields (
EBookContacts.BookClientViewSortFields
) – an array ofEBookContacts.BookClientViewSortFields
, terminated by item withEBookContacts.ContactField.FIELD_LAST
fieldcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
whether succeeded
- Return type:
Sets fields to sort the view by. The default is to sort by the file-as field in ascending order. Not every field can be used for sorting, usually available fields are
EBookContacts.ContactField.FILE_AS
,EBookContacts.ContactField.GIVEN_NAME
andEBookContacts.ContactField.FAMILY_NAME
.The array is terminated by an item with an
EBookContacts.ContactField.FIELD_LAST
field.The first sort field is used to populate indices, as returned by
EBook.BookClientView.dup_indices
().Note: This function can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- start()¶
- Raises:
Tells self to start processing events.
- stop()¶
- Raises:
Tells self to stop processing events.
- do_complete(error) virtual¶
- Parameters:
error (
GLib.Error
) –
Notification that loading a view has completed, after calling
EBook.BookClientView.start
()
- do_progress(percent, message) virtual¶
-
Signal emitted intermittently while loading a view after calling
EBook.BookClientView.start
()
Signal Details¶
- EBook.BookClientView.signals.complete(book_client_view, object)¶
- Signal Name:
complete
- Flags:
- Parameters:
book_client_view (
EBook.BookClientView
) – The object which received the signalobject (
GLib.Error
) –
- EBook.BookClientView.signals.content_changed(book_client_view)¶
- Signal Name:
content-changed
- Flags:
- Parameters:
book_client_view (
EBook.BookClientView
) – The object which received the signal
The signal is emitted whenever content of any contact in the client_view changes, or a contact is added or removed. It may or may not change EBookClientView
:n-total
property too.Note: This signal can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- EBook.BookClientView.signals.objects_added(book_client_view, objects)¶
- Signal Name:
objects-added
- Flags:
- Parameters:
book_client_view (
EBook.BookClientView
) – The object which received the signalobjects ([
EBookContacts.Contact
]) – aGLib.SList
of addedEBookContacts.Contact
objects into the client_view.
- EBook.BookClientView.signals.objects_modified(book_client_view, objects)¶
- Signal Name:
objects-modified
- Flags:
- Parameters:
book_client_view (
EBook.BookClientView
) – The object which received the signalobjects ([
EBookContacts.Contact
]) – aGLib.SList
of modifiedEBookContacts.Contact
objects within the client_view
- EBook.BookClientView.signals.objects_removed(book_client_view, uids)¶
- Signal Name:
objects-removed
- Flags:
- Parameters:
book_client_view (
EBook.BookClientView
) – The object which received the signaluids ([
str
]) – aGLib.SList
of removed objects, described by their UID.
- EBook.BookClientView.signals.progress(book_client_view, object, p0)¶
- Signal Name:
progress
- Flags:
- Parameters:
book_client_view (
EBook.BookClientView
) – The object which received the signalobject (
int
) –p0 (
str
) –
Property Details¶
- EBook.BookClientView.props.client¶
- Name:
client
- Type:
- Default Value:
- Flags:
The
EBook.BookClient
for the view
- EBook.BookClientView.props.connection¶
- Name:
connection
- Type:
- Default Value:
- Flags:
The
Gio.DBusConnection
used to create the D-Bus proxy
- EBook.BookClientView.props.indices¶
- Name:
indices
- Type:
- Default Value:
- Flags:
A list of
EBookContacts.BookIndices
holding indices of the contacts in the view. These are received from the first sort field set byEBook.BookClientView.set_sort_fields_sync
(). The last item of the returned array is the one with chr member beingNone
.Note: This property can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.
- EBook.BookClientView.props.n_total¶
-
How many contacts are available in the view.
Note: This property can be used only with
EBookContacts.BookClientViewFlags.MANUAL_QUERY
.New in version 3.50.