DataBookCursorStepFunc


Description:

[ CCode ( has_target = false ) ]
[ Version ( since = "3.12" ) ]
public delegate int DataBookCursorStepFunc (DataBookCursor cursor, string? revision_guard, BookCursorStepFlags flags, BookCursorOrigin origin, int count, out SList<string>? results, Cancellable? cancellable = null) throws Error

Method type for step

As all cursor methods may be called either by the addressbook service or directly by a client in Direct Read Access mode, it is important that the operation be an atomic transaction with the underlying database.

The revision_guard, if specified, will be set to the client_backend_property_revision value at the time which the given client issued the call to move the cursor. If the revision_guard provided by the client does not match the stored addressbook revision, then an e_client_error_out_of_sync error should be set to indicate that the revision was out of sync while attempting to move the cursor.

<note><para>If the addressbook backend supports direct read access, then the revision comparison and reading of the data store must be coupled into a single atomic operation (the data read back from the store must be the correct data for the given addressbook revision).</para></note>

See step for more details on the expected behaviour of this method.

Parameters:

cursor

an DataBookCursor

revision_guard

The expected current addressbook revision, or null

flags

The BookCursorStepFlags for this step

origin

The BookCursorOrigin from whence to step

count

a positive or negative amount of contacts to try and fetch

results

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

cancellable

A Cancellable

Returns:

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


Namespace: E