Method

EDataBookBookBackendcreate_cursor

since: 3.12

Declaration [src]

EDataBookCursor*
e_book_backend_create_cursor (
  EBookBackend* backend,
  EContactField* sort_fields,
  EBookCursorSortType* sort_types,
  guint n_fields,
  GError** error
)

Description [src]

Creates a new EDataBookCursor 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 error.

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

The returned cursor belongs to backend and should be destroyed with e_book_backend_delete_cursor() when no longer needed.

Available since: 3.12

Parameters

sort_fields

Type: EContactField

The EContactFields to sort by.

The data is owned by the caller of the method.
sort_types

Type: EBookCursorSortType

The EBookCursorSortTypes for the sorted fields.

The data is owned by the caller of the method.
n_fields

Type: guint

The number of fields in the sort_fields and sort_types.

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 a NULL GError*.
The argument will be left initialized to NULL by the method 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.

Return value

Type: EDataBookCursor

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

The returned data is owned by the instance.