Constructor

EDataBookDataBookCursorCachenew

since: 3.26

Declaration [src]

EDataBookCursor*
e_data_book_cursor_cache_new (
  EBookBackend* book_backend,
  EBookCache* book_cache,
  const EContactField* sort_fields,
  const EBookCursorSortType* sort_types,
  guint n_fields,
  GError** error
)

Description [src]

Creates an EDataBookCursor and implements all of the cursor methods using the delegate book_cache object.

This is suitable cursor type for any backend which stores its contacts using the EBookCache object. The EBookMetaBackend does that transparently.

Available since: 3.26

Parameters

book_backend

Type: EBookBackend

The EBookBackend creating this cursor.

The data is owned by the caller of the function.
book_cache

Type: EBookCache

The EBookCache object to base this cursor on.

The data is owned by the caller of the function.
sort_fields

Type: An array of EContactField

An array of EContactFields as sort keys in order of priority.

The length of the array is specified in the n_fields argument.
The data is owned by the caller of the function.
sort_types

Type: An array of EBookCursorSortType

An array of EBookCursorSortTypes, one for each field in sort_fields.

The length of the array is specified in the n_fields argument.
The data is owned by the caller of the function.
n_fields

Type: guint

The number of fields to sort results by.

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 constructor 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 EDataBookCursor, or NULL if cursor creation failed.

The caller of the function takes ownership of the data, and is responsible for freeing it.