create_cursor


Description:

[ Version ( since = "3.12" ) ]
public unowned DataBookCursor create_cursor (ContactField sort_fields, BookCursorSortType sort_types, uint n_fields) throws Error

Creates a new DataBookCursor for the given backend if the backend has cursor support.

If the backend does not support cursors then an e_client_error_not_supported error will be set in throws.

Backends can also refuse to create cursors for some values of sort_fields and report more specific errors.

The returned cursor belongs to this and should be destroyed with delete_cursor when no longer needed.

Parameters:

this

an BookBackend

sort_fields

the ContactFields to sort by

sort_types

the BookCursorSortTypes for the sorted fields

n_fields

the number of fields in the sort_fields and sort_types

Returns:

A newly created cursor, the cursor belongs to the backend and should not be unreffed, or null on error