Top | ![]() |
![]() |
![]() |
![]() |
EBookIndicesUpdaterEBookIndicesUpdater — Handle EBookIndices updates |
gboolean | e_book_indices_updater_take_indices () |
const EBookIndices * | e_book_indices_updater_get_indices () |
void | e_book_indices_set_ascending_sort () |
gboolean | e_book_indices_get_ascending_sort () |
gboolean | e_book_indices_updater_add () |
gboolean | e_book_indices_updater_remove () |
GObject ╰── EBookIndicesUpdater ├── EDataBookViewWatcherCache ├── EDataBookViewWatcherMemory ╰── EDataBookViewWatcherSqlite
This is an abstract class to handle EBooKindices updates. It's suitable
as a base class for objects handling manual query views (see E_BOOK_CLIENT_VIEW_FLAGS_MANUAL_QUERY
).
The users of this class should call e_book_indices_updater_take_indices()
first,
thus the EBookIndices knows the indices. The indices are subsequently updated
by e_book_indices_updater_add()
, e_book_indices_updater_modify()
and
e_book_indices_updater_remove()
functions, where each returns whether
the indices changed.
Current indices can be obtained by e_book_indices_updater_get_indices()
.
Note the class is not thread safe. It's a responsibility of the caller to ensure thread safety.
gboolean e_book_indices_updater_take_indices (EBookIndicesUpdater *self
,EBookIndices *indices
);
Sets the initial indices to be updated by the self
. If NULL
,
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
.
Since: 3.50
const EBookIndices *
e_book_indices_updater_get_indices (EBookIndicesUpdater *self
);
Sets the initial indices to be updated by the self
. If NULL
,
then unsets them.
Since: 3.50
void e_book_indices_set_ascending_sort (EBookIndicesUpdater *self
,gboolean ascending_sort
);
Sets whether the contacts are sorted in an ascending order; if not, then they are sorted in the descending order. That influences what indexes the indices have set.
Since: 3.50
gboolean
e_book_indices_get_ascending_sort (EBookIndicesUpdater *self
);
Returns whether the self
considers contacts stored in the ascending order.
TRUE
, when considers contacts sorted in ascending order,
FALSE
when in the descending order.
Since: 3.50
gboolean e_book_indices_updater_add (EBookIndicesUpdater *self
,const gchar *uid
,guint indices_index
);
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 e_book_indices_updater_take_indices()
.
self |
||
uid |
a UID of a contact |
|
indices_index |
index to the indices array the contact belongs to |
Since: 3.50
gboolean e_book_indices_updater_remove (EBookIndicesUpdater *self
,const gchar *uid
);
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 e_book_indices_updater_take_indices()
.
Since: 3.50
struct EBookIndicesUpdater;
An abstract object to handle EBookIndices changes.
Since: 3.50