Constructor
EDataBookBookCachenew_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:
ESourceAn optional
ESource, associated with theEBookCache, orNULL.The argument can be NULL.The data is owned by the caller of the function. setup-
Type:
ESourceBackendSummarySetupAn
ESourceBackendSummarySetupdescribing how the summary should be setup, orNULLto use the default.The argument can be NULL.The data is owned by the caller of the function. cancellable-
Type:
GCancellableOptional
GCancellableobject, orNULL.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 aNULLGError*.The argument will be left initialized to NULLby 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. |