## EDataCalView

EDataCalView — Implementation of the calendar CORBA search interface.

## Synopsis

    #define             QUERY                               (obj)
    #define             IS_QUERY                            (obj)
    EDataCalView*       e_data_cal_view_new                 (ECalBackend *backend,
                                                             GNOME_Evolution_Calendar_CalViewListener ql,
                                                             ECalBackendSExp *sexp);
    void                e_data_cal_view_add_listener        (EDataCalView *query,
                                                             GNOME_Evolution_Calendar_CalViewListener ql);
    const char*         e_data_cal_view_get_text            (EDataCalView *query);
    ECalBackendSExp*    e_data_cal_view_get_object_sexp     (EDataCalView *query);
    gboolean            e_data_cal_view_object_matches      (EDataCalView *query,
                                                             const char *object);
    GList*              e_data_cal_view_get_matched_objects (EDataCalView *query);
    gboolean            e_data_cal_view_is_started          (EDataCalView *query);
    gboolean            e_data_cal_view_is_done             (EDataCalView *query);
    GNOME_Evolution_Calendar_CallStatus e_data_cal_view_get_done_status
                                                            (EDataCalView *query);
    void                e_data_cal_view_notify_objects_added
                                                            (EDataCalView *query,
                                                             const GList *objects);
    void                e_data_cal_view_notify_objects_added_1
                                                            (EDataCalView *query,
                                                             const char *object);
    void                e_data_cal_view_notify_objects_modified
                                                            (EDataCalView *query,
                                                             const GList *objects);
    void                e_data_cal_view_notify_objects_modified_1
                                                            (EDataCalView *query,
                                                             const char *object);
    void                e_data_cal_view_notify_objects_removed
                                                            (EDataCalView *query,
                                                             const GList *ids);
    void                e_data_cal_view_notify_objects_removed_1
                                                            (EDataCalView *query,
                                                             const ECalComponentId *id);
    void                e_data_cal_view_notify_progress     (EDataCalView *query,
                                                             const char *message,
                                                             int percent);
    void                e_data_cal_view_notify_done         (EDataCalView *query,
                                                             GNOME_Evolution_Calendar_CallStatus status);

## Description

## Details

### QUERY()

    #define QUERY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_CAL_VIEW_TYPE, EDataCalView))

`obj` : |

### IS_QUERY()

    #define IS_QUERY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_DATA_CAL_VIEW_TYPE))

`obj` : |

### e_data_cal_view_new ()

    EDataCalView*       e_data_cal_view_new                 (ECalBackend *backend,
                                                             GNOME_Evolution_Calendar_CalViewListener ql,
                                                             ECalBackendSExp *sexp);

Creates a new query engine object that monitors a calendar backend.

`backend` : | Calendar backend that the query object will monitor.
`ql` : | Listener for query results.
`sexp` : | Sexp that defines the query.
Returns : | A newly-created query object, or NULL on failure.

### e_data_cal_view_add_listener ()

    void                e_data_cal_view_add_listener        (EDataCalView *query,
                                                             GNOME_Evolution_Calendar_CalViewListener ql);

Adds the given CORBA listener to a EDataCalView object. This makes the view object notify that listener when notifying the other listeners already attached to the view.

`query` : | A EDataCalView object.
`ql` : | A CORBA query listener to add to the list of listeners.

### e_data_cal_view_get_text ()

    const char*         e_data_cal_view_get_text            (EDataCalView *query);

Get the expression used for the given query.

`query` : | A EDataCalView object.
Returns : | the query expression used to search.

### e_data_cal_view_get_object_sexp ()

    ECalBackendSExp*    e_data_cal_view_get_object_sexp     (EDataCalView *query);

Get the ECalBackendSExp object used for the given query.

`query` : | A query object.
Returns : | The expression object used to search.

### e_data_cal_view_object_matches ()

    gboolean            e_data_cal_view_object_matches      (EDataCalView *query,
                                                             const char *object);

Compares the given `object` to the regular expression used for the given query.

`query` : | A query object.
`object` : | Object to match.
Returns : | TRUE if the object matches the expression, FALSE if not.

### e_data_cal_view_get_matched_objects ()

    GList*              e_data_cal_view_get_matched_objects (EDataCalView *query);

Gets the list of objects already matched for the given query.

`query` : | A query object.
Returns : | A list of matched objects.

### e_data_cal_view_is_started ()

    gboolean            e_data_cal_view_is_started          (EDataCalView *query);

Checks whether the given query has already been started.

`query` : | A query object.
Returns : | TRUE if the query has already been started, FALSE otherwise.

### e_data_cal_view_is_done ()

    gboolean            e_data_cal_view_is_done             (EDataCalView *query);

Checks whether the given query is already done. Being done means the initial matching of objects have been finished, not that no more notifications about changes will be sent. In fact, even after done, notifications will still be sent if there are changes in the objects matching the query search expression.

`query` : | A query object.
Returns : | TRUE if the query is done, FALSE if still in progress.

### e_data_cal_view_get_done_status ()

    GNOME_Evolution_Calendar_CallStatus e_data_cal_view_get_done_status
                                                            (EDataCalView *query);

Gets the status code obtained when the initial matching of objects was done for the given query.

`query` : | A query object.
Returns : | The query status.

### e_data_cal_view_notify_objects_added ()

    void                e_data_cal_view_notify_objects_added
                                                            (EDataCalView *query,
                                                             const GList *objects);

Notifies all query listeners of the addition of a list of objects.

`query` : | A query object.
`objects` : | List of objects that have been added.

### e_data_cal_view_notify_objects_added_1 ()

    void                e_data_cal_view_notify_objects_added_1
                                                            (EDataCalView *query,
                                                             const char *object);

Notifies all the query listeners of the addition of a single object.

`query` : | A query object.
`object` : | The object that has been added.

### e_data_cal_view_notify_objects_modified ()

    void                e_data_cal_view_notify_objects_modified
                                                            (EDataCalView *query,
                                                             const GList *objects);

Notifies all query listeners of the modification of a list of objects.

`query` : | A query object.
`objects` : | List of modified objects.

### e_data_cal_view_notify_objects_modified_1 ()

    void                e_data_cal_view_notify_objects_modified_1
                                                            (EDataCalView *query,
                                                             const char *object);

Notifies all query listeners of the modification of a single object.

`query` : | A query object.
`object` : | The modified object.

### e_data_cal_view_notify_objects_removed ()

    void                e_data_cal_view_notify_objects_removed
                                                            (EDataCalView *query,
                                                             const GList *ids);

Notifies all query listener of the removal of a single object.

`query` : | A query object.
`ids` : |

### e_data_cal_view_notify_objects_removed_1 ()

    void                e_data_cal_view_notify_objects_removed_1
                                                            (EDataCalView *query,
                                                             const ECalComponentId *id);

`query` : |
`id` : |

### e_data_cal_view_notify_progress ()

    void                e_data_cal_view_notify_progress     (EDataCalView *query,
                                                             const char *message,
                                                             int percent);

Notifies all query listeners of progress messages.

`query` : | A query object.
`message` : | Progress message to send to listeners.
`percent` : | Percentage completed.

### e_data_cal_view_notify_done ()

    void                e_data_cal_view_notify_done         (EDataCalView *query,
                                                             GNOME_Evolution_Calendar_CallStatus status);

Notifies all query listeners of the completion of the query, including a status code.

`query` : | A query object.
`status` : | Query completion status code.