1 /* Evolution calendar listener
3 * Copyright (C) 2001 Ximian, Inc.
5 * Author: Federico Mena-Quintero <federico@ximian.com>
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.
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.
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.
21 #ifndef E_CAL_LISTENER_H
22 #define E_CAL_LISTENER_H
24 #include <bonobo/bonobo-object.h>
25 #include <libecal/e-cal-types.h>
27 #include "Evolution-DataServer-Calendar.h"
33 #define E_TYPE_CAL_LISTENER (e_cal_listener_get_type ())
34 #define E_CAL_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_LISTENER, ECalListener))
35 #define E_CAL_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CAL_LISTENER, \
37 #define E_IS_CAL_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL_LISTENER))
38 #define E_IS_CAL_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL_LISTENER))
40 typedef struct ECalListenerPrivate ECalListenerPrivate;
46 ECalListenerPrivate *priv;
50 BonoboObjectClass parent_class;
52 POA_GNOME_Evolution_Calendar_CalListener__epv epv;
55 void (*read_only) (ECalListener *listener, ECalendarStatus status, gboolean read_only);
56 void (*cal_address) (ECalListener *listener, ECalendarStatus status, const char *address);
57 void (*alarm_address) (ECalListener *listener, ECalendarStatus status, const char *address);
58 void (*ldap_attribute) (ECalListener *listener, ECalendarStatus status, const char *ldap_attribute);
59 void (*static_capabilities) (ECalListener *listener, ECalendarStatus status, const char *capabilities);
61 void (*open) (ECalListener *listener, ECalendarStatus status);
62 void (*remove) (ECalListener *listener, ECalendarStatus status);
64 void (*create_object) (ECalListener *listener, ECalendarStatus status, const char *id);
65 void (*modify_object) (ECalListener *listener, ECalendarStatus status);
66 void (*remove_object) (ECalListener *listener, ECalendarStatus status);
68 void (*discard_alarm) (ECalListener *listener, ECalendarStatus status);
70 void (*receive_objects) (ECalListener *listener, ECalendarStatus status);
71 void (*send_objects) (ECalListener *listener, ECalendarStatus status, GList *users, const char *object);
73 void (*default_object) (ECalListener *listener, ECalendarStatus status, const char *object);
74 void (*object) (ECalListener *listener, ECalendarStatus status, const char *object);
75 void (*object_list) (ECalListener *listener, ECalendarStatus status, GList **objects);
77 void (*attachment_list) (ECalListener *listener, ECalendarStatus status, GSList **objects);
79 void (*get_timezone) (ECalListener *listener, ECalendarStatus status, const char *object);
80 void (*add_timezone) (ECalListener *listener, ECalendarStatus status, const char *tzid);
81 void (*set_default_timezone) (ECalListener *listener, ECalendarStatus status, const char *tzid);
83 void (*get_changes) (ECalListener *listener, ECalendarStatus status, GList *changes);
84 void (*get_free_busy) (ECalListener *listener, ECalendarStatus status, GList *freebusy);
86 void (*query) (ECalListener *listener, ECalendarStatus status, GNOME_Evolution_Calendar_CalView query);
88 void (*auth_required) (ECalListener *listener);
89 void (*backend_error) (ECalListener *listener, ECalendarStatus status, const char *message);
92 /* Notification functions */
93 typedef void (* ECalListenerCalSetModeFn) (ECalListener *listener,
94 GNOME_Evolution_Calendar_CalListener_SetModeStatus status,
95 GNOME_Evolution_Calendar_CalMode mode,
98 GType e_cal_listener_get_type (void);
100 ECalListener *e_cal_listener_construct (ECalListener *listener,
101 ECalListenerCalSetModeFn cal_set_mode_fn,
104 ECalListener *e_cal_listener_new (ECalListenerCalSetModeFn cal_set_mode_fn,
107 void e_cal_listener_stop_notification (ECalListener *listener);