EBook.BookClientCursor.set_alphabetic_index_sync

### Method

# EBook BookClientCursorset_alphabetic_index_sync

since: 3.12

#### Declaration [src]

    gboolean
    e_book_client_cursor_set_alphabetic_index_sync (
      EBookClientCursor* cursor,
      gint index,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Sets the cursor to point to an Alphabetic Index.

After setting the alphabetic index, for example the index for letter ‘E’, then further calls to `e_book_client_cursor_step()` will return results starting with the letter ‘E’ (or results starting with the last result in ‘D’ when navigating through cursor results in reverse).

The passed index must be a valid index into the alphabet parameters returned by e_book_client_cursor_get_alphabet().

If this method is called from the same thread context in which the cursor was created, then the updates to the `EBookClientCursor:position` property are guaranteed to be delivered synchronously upon successful completion of moving the cursor. Otherwise, notifications will be delivered asynchronously in the cursor’s original thread context.

If this method completes with an `E_CLIENT_ERROR_OUT_OF_SYNC` error, it is an indication that the addressbook has been set into a new locale and it would be unsafe to set the alphabetic index at this time. If you receive an out of sync error from this method, then you should wait until an `EBookClientCursor:alphabet` property change notification is delivered and then proceed to load the new alphabet before trying to set any alphabetic index.

Available since: 3.12

#### Parameters

`index`

  Type: `gint`

  The alphabetic index.

`cancellable`

  Type: `GCancellable`

  A `GCancellable` to optionally cancel this operation while in progress.

  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`

`TRUE` on success, otherwise `FALSE` is returned and `error` is set.