EDataBook.DataBookCursorCompareContactFunc
Description: Reference for EDataBook.DataBookCursorCompareContactFunc

### Function

# EDataBookDataBookCursorCompareContactFunc

since: 3.12

#### Declaration

    gint
    (* EDataBookCursorCompareContactFunc) (
      EDataBookCursor* cursor,
      EContact* contact,
      gboolean* matches_sexp
    )

#### Description [src]

Method type for `EDataBookCursorClass`.compare_contact()

Cursor implementations must implement this in order to compare a contact with the current cursor state.

This is called when the addressbook backends notify active cursors that the addressbook has been modified with `e_data_book_cursor_contact_added()` and e_data_book_cursor_contact_removed().

Available since: 3.12

#### Parameters

`cursor`

  Type: `EDataBookCursor`

  An `EDataBookCursor`.

  The data is owned by the caller of the function.

`contact`

  Type: `EContact`

  The `EContact` to compare with `cursor`.

  The data is owned by the caller of the function.

`matches_sexp`

  Type: `gboolean*`

  Return location to set whether `contact` matched `cursor`‘s search expression.

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

#### Return value

Type: `gint`

A value that is less than, equal to, or greater than zero if `contact` is found, respectively, to be less than, to match, or be greater than the current value of `cursor`.