cursor_step


Description:

public int cursor_step (BookCacheCursor cursor, BookCacheCursorStepFlags flags, BookCacheCursorOrigin origin, int count, out SList<BookCacheSearchData>? out_results, Cancellable? cancellable = null) throws Error

Steps cursor through its sorted query by a maximum of count contacts starting from origin.

If count is negative, then the cursor will move through the list in reverse.

If cursor reaches the beginning or end of the query results, then the returned list might not contain the amount of desired contacts, or might return no results if the cursor currently points to the last contact. Reaching the end of the list is not considered an error condition. Attempts to step beyond the end of the list after having reached the end of the list will however trigger an e_cache_error_end_of_list error.

If e_book_cache_cursor_step_fetch is specified in flags, a pointer to a null SList pointer should be provided for the out_results parameter.

The result list will be stored to out_results and should be freed with g_slist_free_full (results, e_book_cache_search_data_free); when no longer needed.

Parameters:

this

An BookCache

cursor

The BookCacheCursor to use

flags

The BookCacheCursorStepFlags for this step

origin

The BookCacheCursorOrigin from whence to step

count

A positive or negative amount of contacts to try and fetch

out_results

A return location to store the results, or null if e_book_cache_cursor_step_fetch is not specified in flags.

cancellable

optional Cancellable object, or null

Returns:

The number of contacts traversed if successful, otherwise -1 is returned and the throws is set.