Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / calendar / libedata-cal / e-data-cal-view.h
1 /* Evolution calendar - Live search query implementation
2  *
3  * Copyright (C) 2001 Ximian, Inc.
4  *
5  * Author: Federico Mena-Quintero <federico@ximian.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20
21 #ifndef E_DATA_CAL_VIEW_H
22 #define E_DATA_CAL_VIEW_H
23
24 #include <bonobo/bonobo-object.h>
25 #include <libedata-cal/Evolution-DataServer-Calendar.h>
26 #include <libedata-cal/e-data-cal-common.h>
27 #include <libedata-cal/e-cal-backend-sexp.h>
28
29 G_BEGIN_DECLS
30
31 \f
32
33 #define E_DATA_CAL_VIEW_TYPE            (e_data_cal_view_get_type ())
34 #define QUERY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_DATA_CAL_VIEW_TYPE, EDataCalView))
35 #define E_DATA_CAL_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), E_DATA_CAL_VIEW_TYPE, EDataCalViewClass))
36 #define IS_QUERY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_DATA_CAL_VIEW_TYPE))
37 #define IS_E_DATA_CAL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_DATA_CAL_VIEW_TYPE))
38
39 typedef struct _EDataCalViewPrivate EDataCalViewPrivate;
40
41 struct _EDataCalView {
42         BonoboObject xobject;
43
44         /* Private data */
45         EDataCalViewPrivate *priv;
46 };
47
48 struct _EDataCalViewClass {
49         BonoboObjectClass parent_class;
50
51         POA_GNOME_Evolution_Calendar_CalView__epv epv;
52 };
53
54 GType                 e_data_cal_view_get_type (void);
55 EDataCalView         *e_data_cal_view_new (ECalBackend                             *backend,
56                                            GNOME_Evolution_Calendar_CalViewListener  ql,
57                                            ECalBackendSExp                   *sexp);
58 void                  e_data_cal_view_add_listener (EDataCalView *query, GNOME_Evolution_Calendar_CalViewListener ql);
59 const char           *e_data_cal_view_get_text (EDataCalView *query);
60 ECalBackendSExp      *e_data_cal_view_get_object_sexp (EDataCalView *query);
61 gboolean              e_data_cal_view_object_matches (EDataCalView *query, const char *object);
62
63 GList                *e_data_cal_view_get_matched_objects (EDataCalView *query);
64 gboolean              e_data_cal_view_is_started (EDataCalView *query);
65 gboolean              e_data_cal_view_is_done (EDataCalView *query);
66 GNOME_Evolution_Calendar_CallStatus e_data_cal_view_get_done_status (EDataCalView *query);
67
68 void                  e_data_cal_view_notify_objects_added (EDataCalView       *query,
69                                                             const GList *objects);
70 void                  e_data_cal_view_notify_objects_added_1 (EDataCalView       *query,
71                                                               const char *object);
72 void                  e_data_cal_view_notify_objects_modified (EDataCalView       *query,
73                                                                const GList *objects);
74 void                  e_data_cal_view_notify_objects_modified_1 (EDataCalView       *query,
75                                                                  const char *object);
76 void                  e_data_cal_view_notify_objects_removed (EDataCalView       *query,
77                                                               const GList *ids);
78 void                  e_data_cal_view_notify_objects_removed_1 (EDataCalView       *query,
79                                                                 const ECalComponentId *id);
80 void                  e_data_cal_view_notify_progress (EDataCalView      *query,
81                                                        const char *message,
82                                                        int         percent);
83 void                  e_data_cal_view_notify_done (EDataCalView                               *query,
84                                                    GNOME_Evolution_Calendar_CallStatus status);
85
86 G_END_DECLS
87
88 #endif