From cc1b730fe46aa2324a203e7af8b6f9a71cb121b9 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 21 Aug 2001 13:21:23 +0000 Subject: new files to contain utility functions for calendar backends 2001-08-21 Rodrigo Moya * pcs/cal-backend-util.[ch]: new files to contain utility functions for calendar backends * pcs/cal-backend.c (cal_backend_add_cal): implement it here, and not in the calendar backends. Add a "cal_added" signal, so that backends are notified when a new Cal is added, if they need to (cal_backend_get_type_by_uid): implement it here * pcs/cal-backend-file.c (fill_alarm_instances_seq): moved to cal-backend-util.c (cal_backend_file_add_cal): removed (cal_backend_file_init): connect to the "cal_added" signal in the CalBackend class so that we can update categories when a new Cal is added (cal_backend_file_get_type_by_uid): removed * pcs/cal-backend-db.c (fill_alarm_instances_seq): moved to cal-backend-util.c (cal_backend_db_add_cal): removed (cal_backend_db_get_type_by_uid): removed * AUTHORS: added JP and Damon to list of authors svn path=/trunk/; revision=12339 --- calendar/pcs/cal-backend.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'calendar/pcs/cal-backend.h') diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h index 4af8befa84..59b5023a7d 100644 --- a/calendar/pcs/cal-backend.h +++ b/calendar/pcs/cal-backend.h @@ -60,6 +60,7 @@ typedef enum { struct _CalBackend { GtkObject object; + GList *clients; }; struct _CalBackendClass { @@ -67,6 +68,7 @@ struct _CalBackendClass { /* Notification signals */ void (* last_client_gone) (CalBackend *backend); + void (* cal_added) (CalBackend *backend, Cal *cal); void (* opened) (CalBackend *backend, CalBackendOpenStatus status); void (* obj_updated) (CalBackend *backend, const char *uid); @@ -74,7 +76,6 @@ struct _CalBackendClass { /* Virtual methods */ GnomeVFSURI *(* get_uri) (CalBackend *backend); - void (* add_cal) (CalBackend *backend, Cal *cal); CalBackendOpenStatus (* open) (CalBackend *backend, GnomeVFSURI *uri, gboolean only_if_exists); @@ -86,7 +87,6 @@ struct _CalBackendClass { char *(* get_object) (CalBackend *backend, const char *uid); CalComponent *(* get_object_component) (CalBackend *backend, const char *uid); char *(* get_timezone_object) (CalBackend *backend, const char *tzid); - CalObjType(* get_type_by_uid) (CalBackend *backend, const char *uid); GList *(* get_uids) (CalBackend *backend, CalObjType type); GList *(* get_objects_in_range) (CalBackend *backend, CalObjType type, @@ -131,6 +131,8 @@ CalComponent *cal_backend_get_object_component (CalBackend *backend, const char char *cal_backend_get_timezone_object (CalBackend *backend, const char *tzid); +CalObjType cal_backend_get_type_by_uid (CalBackend *backend, const char *uid); + GList *cal_backend_get_uids (CalBackend *backend, CalObjType type); GList *cal_backend_get_objects_in_range (CalBackend *backend, CalObjType type, -- cgit