EDataBook.BookCache.cursor_calculate

### Method

# EDataBook BookCachecursor_calculate

since: 3.26

#### Declaration [src]

    gboolean
    e_book_cache_cursor_calculate (
      EBookCache* book_cache,
      EBookCacheCursor* cursor,
      gint* out_total,
      gint* out_position,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Calculates the `out_total` amount of results for the `cursor`‘s query expression, as well as the current `out_position` of `cursor` in the results. The `out_position` is represented as the amount of results which lead up to the current value of `cursor`, if `cursor` currently points to an exact contact, the position also includes the cursor contact.

Available since: 3.26

#### Parameters

`cursor`

  Type: `EBookCacheCursor`

  The `EBookCacheCursor`.

  The data is owned by the caller of the method.

`out_total`

  Type: `gint*`

  A return location to store the total result set for this cursor.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.

`out_position`

  Type: `gint*`

  A return location to store the cursor position.

  The argument will be set by the function.
  The argument can be set to `NULL` by the method.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`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: `gboolean`

Whether `out_total` and `out_position` were successfully calculated.