### Constructor

# EDataBook BookCache new_full

since: 3.26

#### Declaration [src]

    EBookCache*
    e_book_cache_new_full (
      const gchar* filename,
      ESource* source,
      ESourceBackendSummarySetup* setup,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Creates a new `EBookCache` with the given or the default summary configuration.

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.

Available since: 3.26

#### Parameters

`filename`

  Type: `const gchar*`

  File name to load or create the new cache.

  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 `EBookCache`, 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.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

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

A new `EBookCache` or `NULL` on error.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.