## EDataBookViewWatcherMemory

EDataBookViewWatcherMemory — Watch EDataBookView changes with contacts in memory

## Functions

GObject * | e_data_book_view_watcher_memory_new ()
void | e_data_book_view_watcher_memory_set_locale ()
void | e_data_book_view_watcher_memory_take_sort_fields ()

## Types and Values

struct | EDataBookViewWatcherMemory

## Object Hierarchy

        GObject
        ╰── EBookIndicesUpdater
            ╰── EDataBookViewWatcherMemory

## Includes

    #include <libedata-book/libedata-book.h>

## Description

This is the default implementation of "manual query" views for an EBookBackend. It listens for the changes in the provided EDataBookView and keeps in memory information about the indices of the book view and the contacts.

See `E_BOOK_CLIENT_VIEW_FLAGS_MANUAL_QUERY` for what it means "manual query" view.

## Functions

### e_data_book_view_watcher_memory_new ()

    GObject *
    e_data_book_view_watcher_memory_new (EBookBackend *backend,
                                         EDataBookView *view);

Creates a new EDataBookViewWatcherMemory, which will watch the `view` and will provide the information about indices and total contacts to the `backend` . The locale is taken from the `backend` during the creation process too.

#### Parameters

backend | an EBookBackend |
view | an EDataBookView |

#### Returns

a new EDataBookViewWatcherMemory.

[transfer full]

Since: 3.50

### e_data_book_view_watcher_memory_set_locale ()

    void
    e_data_book_view_watcher_memory_set_locale
                                   (EDataBookViewWatcherMemory *self,
                                    const gchar *locale);

Sets a locale to use for sorting. When `NULL`, or when cannot use the provided locale, tries to use the system locale.

#### Parameters

self | an EDataBookViewWatcherMemory |
locale | a locale to set, or `NULL`. | [nullable]

Since: 3.50

### e_data_book_view_watcher_memory_take_sort_fields ()

    void
    e_data_book_view_watcher_memory_take_sort_fields
                                   (EDataBookViewWatcherMemory *self,
                                    EBookClientViewSortFields *sort_fields);

Sets `sort_fields` as fields to sort the contacts by. If `NULL`, sorts by file-as field. The function assumes ownership of the `sort_fields` .

#### Parameters

self | an EDataBookViewWatcherMemory |
sort_fields | an EBookClientViewSortFields, or `NULL`. | [nullable][transfer full]

Since: 3.50

## Types and Values

### struct EDataBookViewWatcherMemory

    struct EDataBookViewWatcherMemory;

A structure used as a default implementation to handle "manual query" views by the EBookBackend.

Since: 3.50