Method

EDataBookBookCachedup_query_field

since: 3.50

Declaration [src]

gboolean
e_book_cache_dup_query_field (
  EBookCache* book_cache,
  EContactField summary_field,
  const gchar* sexp,
  EContactField sort_field,
  EBookCursorSortType sort_type,
  guint n_offset,
  guint n_limit,
  GPtrArray** out_uids,
  GPtrArray** out_values,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Queries the book_cache for a summary_field value for contacts in the given range and order. To get complete contacts use e_book_cache_dup_query_contacts(). Note the field value may not correspond precisely to the value stored in the vCard (it can be in lower case).

Both summary_field and sort_field should be in the summary, otherwise an error is returned.

The out_uids and out_values will have the same number of elements, the indexes corresponding to each other. Free the arrays with g_ptr_aray_unref(), when no longer needed.

Available since: 3.50

Parameters

summary_field

Type: EContactField

A field to query, which should be in the summary.

sexp

Type: const gchar*

Search expression; use NULL or an empty string to consider all stored contacts.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
sort_field

Type: EContactField

A field to sort by, which should be in the summary.

sort_type

Type: EBookCursorSortType

An EBookCursorSortType.

n_offset

Type: guint

A 0-based offset in the sorted result to start reading from, or 0 to read from start.

n_limit

Type: guint

How many values to return only; use 0 or G_MAXUINT to read everything from the n_offset.

out_uids

Type: An array of utf8

Contact UID-s in the requested order.

The instance takes ownership of the data container, but not the data inside it.
Each element is a NUL terminated UTF-8 string.
out_values

Type: An array of utf8

summary_field values in the requested order.

The instance takes ownership of the data container, but not the data inside it.
Each element is a NUL terminated UTF-8 string.
cancellable

Type: GCancellable

A GCancellable.

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

Whether succeeded.