EBookContacts.BookIndicesUpdater

g EBookContacts.BookIndicesUpdater EBookContacts.BookIndicesUpdater GObject.Object GObject.Object GObject.Object->EBookContacts.BookIndicesUpdater

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add (uid, indices_index)

get_indices ()

remove (uid)

take_indices (indices)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class EBookContacts.BookIndicesUpdater(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

EBookContacts.BookIndicesUpdaterClass

An abstract object to handle EBookContacts.BookIndices changes.

New in version 3.50.

add(uid, indices_index)
Parameters:
  • uid (str) – a UID of a contact

  • indices_index (int) – index to the indices array the contact belongs to

Returns:

whether the indices changed

Return type:

bool

Notifies the self that a new contact with UID uid had been added to the set and it occupies the indices_index index in the indices. In case the uid had been added previously its index is modified instead.

This function can be used only after initial call to EBookContacts.BookIndicesUpdater.take_indices().

New in version 3.50.

get_indices()
Returns:

current indices, or None, when none had been set yet

Return type:

EBookContacts.BookIndices or None

Sets the initial indices to be updated by the self. If None, then unsets them.

New in version 3.50.

remove(uid)
Parameters:

uid (str) – a UID of a removed contact

Returns:

whether the indices changed

Return type:

bool

Notifies the self that an existing contact with UID uid had been removed from the set. Calling the function with uid unknown to the self does nothing and returns False.

This function can be used only after initial call to EBookContacts.BookIndicesUpdater.take_indices().

New in version 3.50.

take_indices(indices)
Parameters:

indices (EBookContacts.BookIndices or None) – an EBookContacts.BookIndices, or None

Returns:

whether the indices changed

Return type:

bool

Sets the initial indices to be updated by the self. If None, then unsets them. The function always discards data previously gathered about the involved contacts, regardless whether the indices changed or not.

The function assumes ownership of the indices.

New in version 3.50.