From de861766eded0c80ffbe050088043a16d7e4923f Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 19 Dec 2000 18:12:57 +0000 Subject: Fix confusion in the way the range is expanded. 2000-12-19 Federico Mena Quintero * pcs/cal-backend-file.c (compute_alarm_range): Fix confusion in the way the range is expanded. * cal-util/cal-component.c (cal_component_alarms_free): Doh, alarms->alarms is a list, not a generic pointer. Free it properly. (cal_component_free_pilot_id): Removed unused function. (cal_component_free_pilot_status): Likewise. * gui/main.c (init_bonobo): Use VERSION instead of a hardcoded string. Pass argc by value, not by reference. Test the return value of gnome_init_with_popt_table(). * cal-client/cal-client.c (cal_client_free_alarms): Oops, missed implementing this function. * cal-util/timeutil.c (print_time_t): Better printing format. (isodiff_to_secs): Removed unused function. (isodiff_from_secs): Removed unused function. (time_day_end): Removed crufty part. (time_day_begin): Removed crufty part. (time_day_hour): Removed unused function. (format_simple_hour): Removed unused function. (get_time_t_hour): Removed unused function. (time_from_start_duration): Removed unused function. * cal-util/timeutil.h (parse_date): Removed unimplemented, unused function prototype. svn path=/trunk/; revision=7083 --- calendar/cal-client/cal-client.c | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'calendar/cal-client/cal-client.c') diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index b3e8cd507d..fb4e673ae7 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -1282,6 +1282,30 @@ cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end) return alarms; } +/** + * cal_client_free_alarms: + * @comp_alarms: A list of #CalComponentAlarms structures. + * + * Frees a list of #CalComponentAlarms structures as returned by + * cal_client_get_alarms_in_range(). + **/ +void +cal_client_free_alarms (GSList *comp_alarms) +{ + GSList *l; + + for (l = comp_alarms; l; l = l->next) { + CalComponentAlarms *alarms; + + alarms = l->data; + g_assert (alarms != NULL); + + cal_component_alarms_free (alarms); + } + + g_slist_free (comp_alarms); +} + /** * cal_client_get_alarms_for_object: * @client: A calendar client. @@ -1289,7 +1313,8 @@ cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end) * @start: Start time for query. * @end: End time for query. * @alarms: Return value for the component's alarm instances. Will return NULL - * if no instances occur within the specified time range. + * if no instances occur within the specified time range. This should be freed + * using the cal_component_alarms_free() function. * * Queries a calendar for the alarms of a particular object that trigger in the * specified range of time. @@ -1412,6 +1437,20 @@ cal_client_update_object (CalClient *client, CalComponent *comp) return retval; } +/** + * cal_client_remove_object: + * @client: A calendar client. + * @uid: Unique identifier of the calendar component to remove. + * + * Asks a calendar to remove a component. If the server is able to remove the + * component, all clients will be notified and they will emit the "obj_removed" + * signal. + * + * Return value: TRUE on success, FALSE on specifying a UID for a component that + * is not in the server. Returning FALSE is normal; the object may have + * disappeared from the server before the client has had a chance to receive the + * corresponding notification. + **/ gboolean cal_client_remove_object (CalClient *client, const char *uid) { -- cgit v1.2.3