## EDataBookView EDataBookView |

## Synopsis

    struct              EDataBookView;
    EDataBookView *     e_data_book_view_new                (EBookBackend *backend,
                                                             GNOME_Evolution_Addressbook_BookViewListener listener,
                                                             const char *card_query,
                                                             EBookBackendSExp *card_sexp,
                                                             int max_results);
    void                e_data_book_view_set_thresholds     (EDataBookView *book_view,
                                                             int minimum_grouping_threshold,
                                                             int maximum_grouping_threshold);
    const char*         e_data_book_view_get_card_query     (EDataBookView *book_view);
    EBookBackendSExp*   e_data_book_view_get_card_sexp      (EDataBookView *book_view);
    int                 e_data_book_view_get_max_results    (EDataBookView *book_view);
    EBookBackend*       e_data_book_view_get_backend        (EDataBookView *book_view);
    GNOME_Evolution_Addressbook_BookViewListener  e_data_book_view_get_listener
                                                            (EDataBookView *book_view);
    GMutex*             e_data_book_view_get_mutex          (EDataBookView *book_view);
    void                e_data_book_view_notify_update      (EDataBookView *book_view,
                                                             EContact *contact);
    void                e_data_book_view_notify_update_vcard
                                                            (EDataBookView *book_view,
                                                             char *vcard);
    void                e_data_book_view_notify_update_prefiltered_vcard
                                                            (EDataBookView *book_view,
                                                             const char *id,
                                                             char *vcard);
    void                e_data_book_view_notify_remove      (EDataBookView *book_view,
                                                             const char *id);
    void                e_data_book_view_notify_complete    (EDataBookView *book_view,
                                                             GNOME_Evolution_Addressbook_CallStatus );
    void                e_data_book_view_notify_status_message
                                                            (EDataBookView *book_view,
                                                             const char *message);

## Object Hierarchy

      GObject
       +----BonoboObject
             +----EDataBookView

## Description

## Details

### struct EDataBookView

    struct EDataBookView;

### e_data_book_view_new ()

    EDataBookView *     e_data_book_view_new                (EBookBackend *backend,
                                                             GNOME_Evolution_Addressbook_BookViewListener listener,
                                                             const char *card_query,
                                                             EBookBackendSExp *card_sexp,
                                                             int max_results);

`backend` : | an EBookBackend to view
`listener` : | a CORBA listener to reveive notifications
`card_query` : | an s-expression representing the query
`card_sexp` : |
`max_results` : | the maximum number of results for the query
Returns : | A new EDataBookView.

### e_data_book_view_set_thresholds ()

    void                e_data_book_view_set_thresholds     (EDataBookView *book_view,
                                                             int minimum_grouping_threshold,
                                                             int maximum_grouping_threshold);

Sets the thresholds for grouping add events together for efficiency reasons. The minimum threshold specifies how many adds must be grouped (as long as there are pending adds), and the maximum threshold specifies the maximum number of adds that can be grouped.

`book_view` : | an EDataBookView
`minimum_grouping_threshold` : | the minimum threshold
`maximum_grouping_threshold` : | the maximum threshold

### e_data_book_view_get_card_query ()

    const char*         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_max_results ()

    int                 e_data_book_view_get_max_results    (EDataBookView *book_view);

Gets the maximum number of results returned by `book_view`'s query.

`book_view` : | an EDataBookView
Returns : | The maximum number of results returned.

### 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_get_listener ()

    GNOME_Evolution_Addressbook_BookViewListener  e_data_book_view_get_listener
                                                            (EDataBookView *book_view);

Gets the CORBA listener that `book_view` is dispatching events to.

`book_view` : | an EDataBookView
Returns : | The CORBA book view listener.

### e_data_book_view_get_mutex ()

    GMutex*             e_data_book_view_get_mutex          (EDataBookView *book_view);

Gets the internal mutex of `book_view`.

`book_view` : | an EDataBookView
Returns : | The GMutex for `book_view`.

### e_data_book_view_notify_update ()

    void                e_data_book_view_notify_update      (EDataBookView *book_view,
                                                             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,
                                                             char *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 char *id,
                                                             char *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 char *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,
                                                             GNOME_Evolution_Addressbook_CallStatus );

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

### e_data_book_view_notify_status_message ()

    void                e_data_book_view_notify_status_message
                                                            (EDataBookView *book_view,
                                                             const char *message);

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

`book_view` : | an EDataBookView
`message` : | a text message