aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-12-20 02:12:57 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-12-20 02:12:57 +0800
commitde861766eded0c80ffbe050088043a16d7e4923f (patch)
tree5010fda36af306efaab59e11ebfa12b7bd43023a /calendar/cal-client
parent20dabfff3014eb67b5c930345e8cb64116dba374 (diff)
downloadgsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.gz
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.tar.zst
gsoc2013-evolution-de861766eded0c80ffbe050088043a16d7e4923f.zip
Fix confusion in the way the range is expanded.
2000-12-19 Federico Mena Quintero <federico@helixcode.com> * 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
Diffstat (limited to 'calendar/cal-client')
-rw-r--r--calendar/cal-client/cal-client.c41
-rw-r--r--calendar/cal-client/cal-client.h2
2 files changed, 41 insertions, 2 deletions
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
@@ -1283,13 +1283,38 @@ cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end)
}
/**
+ * 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.
* @uid: Unique identifier for a calendar component.
* @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)
{
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index ecf714a9a4..bbd0d1871e 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -104,7 +104,7 @@ void cal_client_generate_instances (CalClient *client, CalObjType type,
GSList *cal_client_get_alarms_in_range (CalClient *client, time_t start, time_t end);
-void cal_client_free_alarms (GSList *alarms);
+void cal_client_free_alarms (GSList *comp_alarms);
gboolean cal_client_get_alarms_for_object (CalClient *client, const char *uid,
time_t start, time_t end,