Constructor

EDataBookDataBookCursorSqlitenew

since: 3.12

Declaration [src]

EDataBookCursor*
e_data_book_cursor_sqlite_new (
  EBookBackend* backend,
  EBookSqlite* ebsql,
  const gchar* revision_key,
  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 ebsql object.

This is a suitable cursor type for any backend which stores its contacts using the EBookSqlite object.

Available since: 3.12

Parameters

backend

Type: EBookBackend

The EBookBackend creating this cursor.

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

Type: EBookSqlite

The EBookSqlite object to base this cursor on.

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

Type: const gchar*

The key name to consult for the current overall contacts database revision.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
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.