Function
EDataBookDataBookCursorGetPositionFunc
since: 3.12
Declaration
gboolean
(* EDataBookCursorGetPositionFunc) (
EDataBookCursor* cursor,
gint* total,
gint* position,
GCancellable* cancellable,
GError** error
)
Description [src]
Method type for EDataBookCursorClass.get_position()
Cursor implementations must implement this to count the total results matching cursor‘s query expression and to calculate the amount of contacts
leading up to the current cursor state (cursor inclusive).
A cursor position is defined as an integer which is inclusive of the
current contact to which it points (if the cursor points to an exact
contact). A position of 0 indicates that the cursor is situated in
a position that is before and after the entire result set. The cursor
position should be 0 at creation time, and should start again from
the symbolic 0 position whenever E_BOOK_CURSOR_ORIGIN_BEGIN is
specified in the EDataBookCursorClass.step() method (or whenever
moving the cursor beyond the end of the result set).
If the cursor is positioned beyond the end of the list, then
the position should be the total amount of contacts available
in the list (as returned through the total argument) plus one.
This method is called by e_data_book_cursor_recalculate() and in some
other cases where cursor‘s current position and total must be
recalculated from scratch.
Available since: 3.12
Parameters
cursor-
Type:
EDataBookCursorAn
EDataBookCursor.The data is owned by the caller of the function. total-
Type:
gint*The total number of contacts matching
cursor‘s query expression.The argument will be set by the function. position-
Type:
gint*The current position of
cursorin its result list.The argument will be set by the function. cancellable-
Type:
GCancellableA
GCancellable.The argument can be NULL.The data is owned by the caller of the function. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the function if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.