From d9e3885428ec973fc18995b83daf6a1ad82103f0 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 20 Jun 2001 15:21:48 +0000 Subject: added getFreeBusy method 2001-06-20 Rodrigo Moya * idl/evolution-calendar.idl: added getFreeBusy method * pcs/cal.c (impl_Cal_get_free_busy): implementation of the new getFreeBusy added method * pcs/cal-backend.[ch]: added new virtual method to the CalBackend class (get_free_busy) * pcs/cal-backend-db.c (cal_backend_db_get_free_busy): new function, not implemented yet * pcs/cal-backend-file.c (cal_backend_file_get_free_busy): new funtion, not implemented yet svn path=/trunk/; revision=10333 --- calendar/pcs/cal-backend.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'calendar/pcs/cal-backend.c') diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 350e6468e4..d72a6fe5e6 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -134,11 +134,13 @@ cal_backend_class_init (CalBackendClass *class) class->get_uri = NULL; class->add_cal = NULL; class->open = NULL; + class->is_loaded = NULL; class->get_n_objects = NULL; class->get_object = NULL; class->get_type_by_uid = NULL; class->get_uids = NULL; class->get_objects_in_range = NULL; + class->get_free_busy = NULL; class->get_changes = NULL; class->get_alarms_in_range = NULL; class->get_alarms_for_object = NULL; @@ -325,6 +327,30 @@ cal_backend_get_objects_in_range (CalBackend *backend, CalObjType type, return (* CLASS (backend)->get_objects_in_range) (backend, type, start, end); } +/** + * cal_backend_get_free_busy: + * @backend: A calendar backend. + * @start: Start time for query. + * @end: End time for query. + * + * Builds a list of unique identifiers corresponding to free/busy calendar + * objects of the that occur or recur within the specified time range. + * + * Return value: A list of UID strings. The list should be freed using the + * cal_obj_uid_list_free() function. + **/ +GList * +cal_backend_get_free_busy (CalBackend *backend, time_t start, time_t end) +{ + g_return_val_if_fail (backend != NULL, NULL); + g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); + g_return_val_if_fail (start != -1 && end != -1, NULL); + g_return_val_if_fail (start <= end, NULL); + + g_assert (CLASS (backend)->get_free_busy != NULL); + return (* CLASS (backend)->get_free_busy) (backend, start, end); +} + /** * cal_backend_get_changes: * @backend: A calendar backend -- cgit v1.2.3