From 14e163207e7bea5a383f8b538041156dc2cb1c84 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 8 Aug 2000 22:39:13 +0000 Subject: Added a get_objects_in_range() method. Takes in a time range and the type 2000-08-08 Federico Mena Quintero * idl/evolution-calendar.idl (Cal): Added a get_objects_in_range() method. Takes in a time range and the type of component we are interested in; returns a list of UIDs. The idea is that ocurrences get computed in the client; we can have multiple recurrences in iCalendar and we cannot identify them trivially across the wire. (Cal): Removed the get_events_in_range() method. * pcs/cal-backend.c (cal_backend_free_uid_list): New function. (cal_backend_get_objects_in_range): New function. (cal_backend_get_events_in_range): Removed. * pcs/cal-backend-file.c (cal_backend_file_get_objects_in_range): Implemented new method. (cal_backend_file_get_events_in_range): Removed. * pcs/cal.c (Cal_get_events_in_range): Removed. (uncorba_obj_type): New function. (Cal_get_uids): Use uncorba_obj_type(). (Cal_get_n_objects): Likewise. (Cal_get_objects_in_range): Implemented new method. * cal-client/cal-client.c (cal_client_get_events_in_range): Removed. (cal_client_get_objects_in_range): Implemented. (corba_obj_type): New function. (cal_client_get_n_objects): Use corba_obj_type(). (cal_client_get_uids): Likewise. svn path=/trunk/; revision=4613 --- calendar/pcs/cal-backend.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'calendar/pcs/cal-backend.c') diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 97d09fac24..e33cedeae8 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -226,7 +226,8 @@ cal_backend_get_object (CalBackend *backend, const char *uid) * Builds a list of unique identifiers corresponding to calendar objects whose * type matches one of the types specified in the @type flags. * - * Return value: A list of strings that are the sought UIDs. + * Return value: A list of strings that are the sought UIDs. The list should be + * freed using the cal_obj_uid_list_free() function. **/ GList * cal_backend_get_uids (CalBackend *backend, CalObjType type) @@ -239,28 +240,29 @@ cal_backend_get_uids (CalBackend *backend, CalObjType type) } /** - * cal_backend_get_events_in_range: + * cal_backend_get_objects_in_range: * @backend: A calendar backend. + * @type: Bitmask with types of objects to return. * @start: Start time for query. * @end: End time for query. - * - * Builds a sorted list of calendar event object instances that occur or recur - * within the specified time range. Each object instance contains the object - * itself and the start/end times at which it occurs or recurs. - * - * Return value: A list of calendar event object instances, sorted by their - * start times. + * + * Builds a list of unique identifiers corresponding to calendar objects of the + * specified type 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_events_in_range (CalBackend *backend, time_t start, time_t end) +cal_backend_get_objects_in_range (CalBackend *backend, CalObjType type, + 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_events_in_range != NULL); - return (* CLASS (backend)->get_events_in_range) (backend, start, end); + g_assert (CLASS (backend)->get_objects_in_range != NULL); + return (* CLASS (backend)->get_objects_in_range) (backend, type, start, end); } /** -- cgit v1.2.3