EDataBookView

## EDataBookView EDataBookView |

## Synopsis

    struct              EDataBookView;
    EDataBookView *		   e_data_book_view_new                (EDataBook *book,
                                                             const gchar *card_query,
                                                             EBookBackendSExp *card_sexp);
    guint               e_data_book_view_register_gdbus_object
                                                            (EDataBookView *query,
                                                             GDBusConnection *connection,
                                                             const gchar *object_path,
                                                             GError **error);
    const gchar *		     e_data_book_view_get_card_query     (EDataBookView *book_view);
    EBookBackendSExp *	 e_data_book_view_get_card_sexp      (EDataBookView *book_view);
    EBookBackend *		    e_data_book_view_get_backend        (EDataBookView *book_view);
    void                e_data_book_view_notify_update      (EDataBookView *book_view,
                                                             const EContact *contact);
    void                e_data_book_view_notify_update_vcard
                                                            (EDataBookView *book_view,
                                                             gchar *vcard);
    void                e_data_book_view_notify_update_prefiltered_vcard
                                                            (EDataBookView *book_view,
                                                             const gchar *id,
                                                             gchar *vcard);
    void                e_data_book_view_notify_remove      (EDataBookView *book_view,
                                                             const gchar *id);
    void                e_data_book_view_notify_complete    (EDataBookView *book_view,
                                                             const GError *error);
    void                e_data_book_view_notify_progress    (EDataBookView *book_view,
                                                             guint percent,
                                                             const gchar *message);
    void                e_data_book_view_ref                (EDataBookView *book_view);
    void                e_data_book_view_unref              (EDataBookView *book_view);

## Object Hierarchy

      GObject
       +----EDataBookView

## Description

## Details

### struct EDataBookView

    struct EDataBookView;

### e_data_book_view_new ()

    EDataBookView *		   e_data_book_view_new                (EDataBook *book,
                                                             const gchar *card_query,
                                                             EBookBackendSExp *card_sexp);

Create a new EDataBookView for the given EBook, filtering on card_sexp, and place it on DBus at the object path path.

`book` : | The EDataBook to search
`card_query` : | The query as a string
`card_sexp` : | The query as an EBookBackendSExp

### e_data_book_view_register_gdbus_object ()

    guint               e_data_book_view_register_gdbus_object
                                                            (EDataBookView *query,
                                                             GDBusConnection *connection,
                                                             const gchar *object_path,
                                                             GError **error);

Since 2.32

### e_data_book_view_get_card_query ()

    const gchar *		     e_data_book_view_get_card_query     (EDataBookView *book_view);

Gets the text representation of the s-expression used for matching contacts to `book_view`.

`book_view` : | an EDataBookView
Returns : | The textual s-expression used.

### e_data_book_view_get_card_sexp ()

    EBookBackendSExp *	 e_data_book_view_get_card_sexp      (EDataBookView *book_view);

Gets the s-expression used for matching contacts to `book_view`.

`book_view` : | an EDataBookView
Returns : | The EBookBackendSExp used.

### e_data_book_view_get_backend ()

    EBookBackend *		    e_data_book_view_get_backend        (EDataBookView *book_view);

Gets the backend that `book_view` is querying.

`book_view` : | an EDataBookView
Returns : | The associated EBookBackend.

### e_data_book_view_notify_update ()

    void                e_data_book_view_notify_update      (EDataBookView *book_view,
                                                             const EContact *contact);

Notify listeners that `contact` has changed. This can trigger an add, change or removal event depending on whether the change causes the contact to start matching, no longer match, or stay matching the query specified by `book_view`.

`book_view` : | an EDataBookView
`contact` : | an EContact

### e_data_book_view_notify_update_vcard ()

    void                e_data_book_view_notify_update_vcard
                                                            (EDataBookView *book_view,
                                                             gchar *vcard);

Notify listeners that `vcard` has changed. This can trigger an add, change or removal event depending on whether the change causes the contact to start matching, no longer match, or stay matching the query specified by `book_view`. This method should be preferred over e_data_book_view_notify_update when the native representation of a contact is a vCard.

`book_view` : | an EDataBookView
`vcard` : | a plain vCard

### e_data_book_view_notify_update_prefiltered_vcard ()

    void                e_data_book_view_notify_update_prefiltered_vcard
                                                            (EDataBookView *book_view,
                                                             const gchar *id,
                                                             gchar *vcard);

Notify listeners that `vcard` has changed. This can trigger an add, change or removal event depending on whether the change causes the contact to start matching, no longer match, or stay matching the query specified by `book_view`. This method should be preferred over e_data_book_view_notify_update when the native representation of a contact is a vCard.

The important difference between this method and e_data_book_view_notify_update and e_data_book_view_notify_update_vcard is that it doesn't match the contact against the book view query to see if it should be included, it assumes that this has been done and the contact is known to exist in the view.

`book_view` : | an EDataBookView
`id` : | the UID of this contact
`vcard` : | a plain vCard

### e_data_book_view_notify_remove ()

    void                e_data_book_view_notify_remove      (EDataBookView *book_view,
                                                             const gchar *id);

Notify listeners that a contact specified by `id` was removed from `book_view`.

`book_view` : | an EDataBookView
`id` : | a unique contact ID

### e_data_book_view_notify_complete ()

    void                e_data_book_view_notify_complete    (EDataBookView *book_view,
                                                             const GError *error);

Notifies listeners that all pending updates on `book_view` have been sent. The listener's information should now be in sync with the backend's.

`book_view` : | an EDataBookView
`error` : | the error of the query, if any

### e_data_book_view_notify_progress ()

    void                e_data_book_view_notify_progress    (EDataBookView *book_view,
                                                             guint percent,
                                                             const gchar *message);

Provides listeners with a human-readable text describing the current backend operation. This can be used for progress reporting.

`book_view` : | an EDataBookView
`percent` : | percent done; use -1 when not available
`message` : | a text message

Since 3.2

### e_data_book_view_ref ()

    void                e_data_book_view_ref                (EDataBookView *book_view);

Increase the reference count of the book view. This is a function to aid the transition from Bonobo to DBUS.

`book_view` : | an EBookView

Since 2.26

### e_data_book_view_unref ()

    void                e_data_book_view_unref              (EDataBookView *book_view);

Decrease the reference count of the book view. This is a function to aid the transition from Bonobo to DBUS.

`book_view` : | an EBookView

Since 2.26