EDataBook.BookSqlite.new_full
Description: Reference for EDataBook.BookSqlite.new_full

### Constructor

# EDataBook BookSqlitenew_full

since: 3.12

#### Declaration [src]

    EBookSqlite*
    e_book_sqlite_new_full (
      const gchar* path,
      ESource* source,
      ESourceBackendSummarySetup* setup,
      EbSqlVCardCallback vcard_callback,
      EbSqlChangeCallback change_callback,
      gpointer user_data,
      GDestroyNotify user_data_destroy,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Opens or creates a new addressbook at `path`.

Like e_book_sqlite_new(), but allows configuration of which contact fields will be stored for quick reference in the summary. The configuration indicated by `setup` will only be taken into account when initially creating the underlying table, further configurations will be ignored.

The fields `E_CONTACT_UID` and `E_CONTACT_REV` are not optional, they will be stored in the summary regardless of this function’s parameters. Only `EContactFields` with the type #G_TYPE_STRING, #G_TYPE_BOOLEAN or

# E_TYPE_CONTACT_ATTR_LIST are currently supported.

If `vcard_callback` is specified, then vcards will not be stored by functions such as e_book_sqlitedb_add_contact(). Instead `vcard_callback` will be invoked at any time the created `EBookSqlite` requires a vcard, either as a fallback for querying search expressions which cannot be satisfied with the summary fields, or when reporting results from searches.

If any error occurs and `NULL` is returned, then the passed `user_data` will be automatically freed using the `user_data_destroy` function, if specified.

It is recommended to store all contact vcards in the `EBookSqlite` addressbook if at all possible, however in some cases the vcards must be stored in some other storage.

Available since: 3.12

#### Parameters

`path`

  Type: `const gchar*`

  Location to load or create the new database.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`source`

  Type: `ESource`

  An optional `ESource`, associated with the `EBookSqlite`, or `NULL`.

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

`setup`

  Type: `ESourceBackendSummarySetup`

  An `ESourceBackendSummarySetup` describing how the summary should be setup, or `NULL` to use the default.

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

`vcard_callback`

  Type: `EbSqlVCardCallback`

  A function to resolve vcards.

  The argument can be `NULL`.

`change_callback`

  Type: `EbSqlChangeCallback`

  A function to catch notifications of vcard changes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Callback user data.

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

`user_data_destroy`

  Type: `GDestroyNotify`

  A function to free `user_data` automatically when the created `EBookSqlite` is destroyed.

  The argument can be `NULL`.

`cancellable`

  Type: `GCancellable`

  A `GCancellable`.

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

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

The newly created `EBookSqlite`, or `NULL` if opening or creating the addressbook failed.

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