aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-03-05 03:51:20 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-05 03:51:20 +0800
commitcd4477930e72b1be069d5c97b90d96e989645bfc (patch)
tree348d4fa6d370d331eba44eac39fe0fdc07c1b824 /calendar
parent1ca4ebaaeb073f8a136240ac03013cc2612524f9 (diff)
downloadgsoc2013-evolution-cd4477930e72b1be069d5c97b90d96e989645bfc.tar.gz
gsoc2013-evolution-cd4477930e72b1be069d5c97b90d96e989645bfc.tar.zst
gsoc2013-evolution-cd4477930e72b1be069d5c97b90d96e989645bfc.zip
Merging in 1.2 stuff
2003-03-04 JP Rosevear <jpr@ximian.com> Merging in 1.2 stuff Fixes #35598 * gui/dialogs/task-details-page.c (task_details_page_fill_widgets): count a status of needs action as a status of none (not started) (date_changed_cb): set the option menu to a status of none (status_changed): no need to handle needs action status now * gui/dialogs/task-details-page.glade: remove needs-action menu item Fixes #36763 * gui/dialogs/alarm-page.c (add_clicked_cb): if no address was set for an email alarm, set the default (button_options_clicked_cb): pass the default email address * gui/dialogs/alarm-options.h (alarm_options_dialog_run): update proto * gui/dialogs/alarm-options.c (alarm_to_malarm_widgets): if there are no email attendees, default to the passed in value (alarm_options_dialog_run): take and track an email param * pcs/cal.c (impl_Cal_get_alarm_email_address): implement by calling backend method (cal_class_init): set alarm email address method implementation * pcs/cal-backend.h: add new virtual proto * pcs/cal-backend.c (cal_backend_class_init): set alarm email address virtual method to NULL (cal_backend_get_alarm_email_address): call backend method * pcs/cal-backend-file.c (cal_backend_file_class_init): set alarm email address method (cal_backend_file_get_alarm_email_address): implement by returning NULL * idl/evolution-calendar.idl: add getAlarmEmailAddress method Fixes #37102 * gui/dialogs/task-editor.c (set_menu_sens): don't allow task assignment if the backend says not to * gui/dialogs/recurrence-page.c (fill_component): kill warning (preview_recur): display the recurrences in the dtstart timezone if possible * gui/gnome-cal.c (dn_query_obj_updated_cb): pass NULL to use default tag zone * gui/tag-calendar.c (tag_calendar_by_comp): allow display zone for the tagged calendar to be passed in (prepare_tag): use the passed in timezone for display if non-null * gui/tag-calendar.h (tag_calendar_by_comp): update proto * gui/dialogs/recurrence-page.c (recurrence_page_set_dates): make sure we always update the preview * conduits/todo/todo-conduit.c (add_record): make sure to create a unique uid for the record * conduits/calendar/calendar-conduit.c (add_record): ditto * conduits/todo/todo-conduit.c (e_todo_context_new): init default comp and timezone to NULL (e_todo_context_destroy): unref default comp (pre_sync): et the default comp via the client and set the default timezone (add_record): pass the default comp as the base comp * conduits/calendar/calendar-conduit.c (e_calendar_context_new): init default comp to NULL (e_calendar_context_destroy): unref default comp (pre_sync): get the default comp via the client (add_record): pass the default comp as the base comp * conduits/calendar/calendar-conduit.c (local_record_from_comp): only add the recurrence rule if its not an instance * gui/itip-control-factory.c (set_data_idle_cb): idle call back to set control data (pstream_load): set the data in an idle callback to avoid deadlock (get_prop): handle view_only (set_prop): ditto (itip_control_factory): add view_only * gui/e-itip-control.h: add protos * gui/e-itip-control.c (write_html): only write out the options if we aren't in view_only mode (e_itip_control_set_view_only): accessor (e_itip_control_get_view_only): ditto Fixes #36909 * gui/dialogs/alarm-page.c (button_options_clicked_cb): indicate whether the options dialog should allow repeating * gui/dialogs/alarm-options.h: update proto * gui/dialogs/alarm-options.c (alarm_to_repeat_widgets): if repeating is not allowed, sensitize the widgets appropriately (alarm_options_dialog_run): store the repeat param * gui/calendar-model.c (calendar_model_append_row): guard against saving before the calendar is open * gui/e-day-view.c (e_day_view_key_press): ditto * gui/dialogs/comp-editor.c (page_changed_cb): change warning dialog to not mention email (page_summary_changed_cb): ditto (page_dates_changed_cb): ditto * gui/itip-utils.c (itip_organizer_is_user): make the compare case insensitive * gui/dialogs/meeting-page.c (meeting_page_fill_widgets): don't allow the organizer to be changed if its not an email address * gui/e-day-view.c, calendar-model.c, e-week-view.c, task-editor.c, event-editor.c, comp-editor.c, meeting-page.c: pass additional param * gui/itip-utils.c (itip_organizer_is_user): take client as param, and if organizer-not-email-address and email address and organizer match, assume the user is the organizer * gui/itip-utils.h: update proto * pcs/cal.c (build_fb_seq): set the max * gui/e-meeting-model.c (e_meeting_model_add_attendee_with_defaults): correct typo and set rsvp appropriately * gui/dialogs/send-comp.c (send_component_dialog): if save schedules, return FALSE for now * gui/dialogs/recurrence-page.c (sensitize_recur_widgets): de-sensitize the preview widget if we are viewing an instance (preview_recur): return if the comp is an instance * gui/dialogs/event-page.glade: name the show time frame * gui/dialogs/event-page.c (event_page_fill_widgets) (event_page_init): init show time frame (event_page_fill_widgets): hide/show frame as needed (get_widgets): get the frame * gui/alarm-notify/alarm-queue.c (mail_notification): kill mail notification code * cal-client/cal-client.c (load_static_capabilities): grab static capabilities string (check_capability): see if a capability is in the string (cal_client_get_one_alarm_only): accessor (cal_client_get_organizer_must_attend): use check_capability (cal_client_get_static_capability): ditto * cal-client/cal-client.h: new, changed protos * idl/evolution-calendar.idl: change over getSchedulingInformation to a more general getStaticCapabilities call * pcs/cal-backend-file.c (cal_backend_file_get_static_capabilities): return "no-email-alarms" * pcs/cal-backend.c (cal_backend_get_static_capabilities): ditto * pcs/cal-backend.h: ditto * pcs/cal.c (impl_Cal_get_static_capabilities): ditto * gui/alarm-notify/alarm-queue.c (get_default_address): utility routine to snag address info * gui/alarm-notify/Makefile.am: build composer idl * *.c: pass client param for send an cancel params * gui/dialogs/send-comp.c (send_component_dialog): take client as a parm and if save schedules return true right away * gui/dialogs/send-comp.h: update proto * gui/dialogs/cancel-comp.c (cancel_component_dialog): take client as a param and if we are deleting and schedule saves, return true right away * gui/dialogs/cancel-comp.h (cancel_component_dialog): update proto * gui/dialogs/alarm-options.glade: add Send To: button * gui/dialogs/alarm-options.c (addressbook_clicked_cb): display dialog (setup_select_names): attach above to Send To: button clicked signal * gui/dialogs/alarm-options.c (get_widgets): get mail alarm widgets (setup_select_names): add the select names widget (alarm_to_malarm_widgets): show the attendees and description (alarm_to_dialog): set the title for mail alarms properly (malarm_widgets_to_alarm): save attendees and descriptions in alarm (alarm_options_dialog_run): call setup_select_names * gui/dialogs/alarm-page.c: add email to alarm types * gui/dialogs/alarm-options.glade: add mail alarm widgets * gui/dialogs/alarm-page.glade: add email to alarm types * cal-util/cal-component.c (scan_attendee): kill unnecessary CalComponent param (scan_property): don't pass same (set_attendee_list): take an icalcomp instead of a CalComponent (cal_component_set_attendee_list): pass same (scan_alarm_property): if its an attendee, scan it (make_alarm): set attendee_list member to null (cal_component_alarm_new): ditto (cal_component_alarm_free): free attendee list (cal_component_alarm_get_attendee_list): return attendee list (cal_component_alarm_set_attendee_list): set attendee list (cal_component_alarm_has_attendees): return true if alarm has attendees * cal-util/cal-component.h: new protos * gui/calendar-model.c (calendar_model_append_row): use cal_comp_task_new_with_defaults * gui/comp-editor-factory.c (get_default_task): ditto * gui/e-tasks.c (e_tasks_new_task): ditto * gui/gnome-cal.c (gnome_calendar_new_task): ditto * gui/comp-util.h (cal_comp_task_new_with_defaults): new proto * gui/comp-util.c (cal_comp_task_new_with_defaults): new utility routine * cal-util/cal-util.c (generate_absolute_triggers): skip omitted alarm types (add_alarm_occurrences_cb): ditto (cal_util_generate_alarms_for_list): take/pass omit param (cal_util_generate_alarms_for_comp): ditto * cal-util/cal-util.h: update protos * pcs/cal-backend-file.c (cal_backend_file_get_alarms_for_object): add omit param (cal_backend_file_get_alarms_in_range): ditto * pcs/cal-backend.c (cal_backend_get_scheduling_information): remove dead param * gui/dialogs/meeting-page.h: delete proto * gui/dialogs/meeting-page.c: remove dead routine * gui/dialogs/event-editor.c (event_editor_edit_comp): we don't need to add the organizer as an attendee ourselves, just set the edit level properly * gui/dialogs/task-editor.c (task_editor_edit_comp): ditto * gui/comp-util.c (cal_comp_event_new_with_defaults): take client as arg so we can obtain the default from the backend * gui/comp-editor-factory.c (get_default_event): pass cal_comp_event_new_with_defaults the new param * gui/gnome-cal.c (gnome_calendar_new_appointment_for): ditto * gui/e-week-view.c (e_week_view_key_press): ditto * gui/e-day-view.c (e_day_view_key_press): ditto * gui/calendar-model.c (calendar_model_append_row): ditto * gui/comp-util.h (cal_comp_event_new_with_defaults): update proto * pcs/cal-backend-file.c (cal_backend_file_get_default_object): return appropriate default object * pcs/cal-backend.c (cal_backend_get_default_object): call get_default_backend class method * pcs/cal-backend.h: add proto * pcs/cal.c (impl_Cal_get_default_object): implement (cal_class_init): set handler for getDefaultObject call * idl/evolution-calendar.idl: remove always schedule from SchedulingInformation and add getDefaultObject call * cal-client/cal-client.c (cal_client_get_default_object): gets a default object from the server (cal_client_init): remove always_schedule (load_scheduling_info): ditto * cal-client/cal-client.h: add a proto, delete a proto * gui/dialogs/meeting-page.c (right_click_cb): if the attendee is not fully editable, don't allow deletion (meeting_page_construct): keep the default organizer as an itip address (meeting_page_get_default_organizer): return the default organizer * gui/dialogs/meeting-page.h: new proto * gui/dialogs/event-editor.c (event_editor_edit_comp): we set appropriate edit levels now for users and if the backend always schedules we always show the meeting pages and add the organizer as an attendee * gui/dialogs/task-editor.c (task_editor_edit_comp): same * gui/e-meeting-model.c (is_cell_editable): use the edit level of the attendee to determine if cell is editable (init): we no longer keep the attendee list of restricted * gui/e-meeting-attendee.c (e_meeting_attendee_get_edit_level): accessor (e_meeting_attendee_set_edit_level): ditto * gui/e-meeting-attendee.h: new protos and edit level enum * cal-client/cal-client.c (load_scheduling_info): load the scheduling info (cal_client_get_always_schedule): accessor (cal_client_get_organizer_must_attend): ditto (cal_client_get_save_schedules): ditto (cal_client_init): init scheduling data members * cal-client/cal-client.h: accessors for scheduling information * pcs/cal-backend-file.c (cal_backend_file_get_scheduling_information): implement the new virtual method * pcs/cal-backend.c (cal_backend_get_scheduling_information): call the class specific method * pcs/cal-backend.h: add virtual method * idl/evolution-calendar.idl: add a getSchedulingInformation call which describes how the backend does its scheduling * pcs/cal.c (impl_Cal_get_scheduling_information): implement above * gui/e-day-view.c: pass NULL as parent to recur dialog * gui/e-week-view.c: ditto * gui/dialogs/comp-editor.c (prompt_to_save_changes): show recur dialog after prompting, not before (save_cmd): ditto (save_close_cmd): ditto (real_edit_comp): don't show recur dialog before opening * gui/dialogs/recur-comp.h (recur_component_dialog): update proto * gui/dialogs/recur-comp.c (recur_component_dialog): take a parent argument and set the dialog parent if non-null * gui/e-week-view.c (e_day_view_on_editing_stopped): Don't update appointment if both the old and the new summary texts are empty. * gui/e-week-view.c (e_week_view_show_popup_menu): mask out "make moveable" if its an instance * gui/e-day-view.c (e_day_view_on_event_right_click): ditto * gui/e-week-view.c (e_week_view_on_editing_stopped): if its an instance, show the recur comp dialog and modify it based on the response (or not if cancel is hit) * gui/e-day-view.c (e_day_view_finish_long_event_resize): if its an instance, show the recur comp dialog and modify it based on the response (or not if cancel is hit) (e_day_view_finish_resize): ditto (e_day_view_on_editing_stopped): ditto (e_day_view_on_top_canvas_drag_data_received): ditto (e_day_view_on_main_canvas_drag_data_received): ditto * gui/dialogs/comp-editor.c (real_edit_comp): reflect changes in proto of recur_component_dialog * gui/dialogs/recur-comp.c (recur_component_dialog): use ok/cancel instead and radio buttons for the mod type * gui/dialogs/recur-comp.h: update proto * gui/e-day-view.c (e_day_view_on_long_event_click): allow dragging if its an instance (e_day_view_on_event_click): ditto (e_day_view_on_top_canvas_motion): ditto (e_day_view_on_main_canvas_motion): ditto * gui/dialogs/comp-editor.c (save_comp): if its an instance, update with the mod type (real_edit_comp): ask the user what instances they want to change * gui/dialogs/recur-comp.[hc]: new dialog to ask user what recurrences to modify * gui/dialogs/Makefile.am: Compile new files * gui/e-day-view.c (e_day_view_on_delete_occurrence): if its an instance, just remove with THIS mod * gui/e-week-view.c (e_week_view_on_delete_occurrence): ditto * cal-client/cal-client.c (cal_client_remove_object_with_mod): send the mod parameter to the backend (cal_client_remove_object): implement with above (cal_client_update_object_with_mod): send the mod parameter to the backend (cal_client_update_object): implement with above * cal-client/cal-client.h: new protos * cal-client/cal-client.c (cal_client_is_read_only): return booleans in the pre conditions (cal_client_update_object): pass mod param (cal_client_update_objects): ditto (cal_client_remove_object): ditto (cal_client_ensure_timezone_on_server): ditto * pcs/cal.c (impl_Cal_update_objects): take mod param (impl_Cal_remove_object): ditto * pcs/cal-backend.h: fix protos * pcs/cal-backend.c (cal_backend_update_objects): take mod param (cal_backend_remove_object): ditto * pcs/cal-backend-file.c (cal_backend_file_update_objects): take mod param (cal_backend_file_remove_object): ditto * cal-util/cal-util.h: add mod enum * cal-util/cal-recur.c (cal_recur_generate_instances_of_rule): if its an instance, just report the instance * cal-util/cal-component.h: new protos * cal-util/cal-component.c (cal_component_is_instance): indicate whether the component is an instance or not (cal_component_free_range): free a range * idl/evolution-calendar.idl: get remove and update to take mod type svn path=/trunk/; revision=20142
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog2
-rw-r--r--calendar/cal-client/cal-client.c255
-rw-r--r--calendar/cal-client/cal-client.h12
3 files changed, 237 insertions, 32 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index b6559a4df6..bd3be952b0 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,7 @@
2003-03-04 JP Rosevear <jpr@ximian.com>
+ Merging in 1.2 stuff
+
Fixes #35598
* gui/dialogs/task-details-page.c
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 89579a34a0..5fe10efcbc 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -49,7 +49,11 @@ struct _CalClientPrivate {
/* Email address associated with this calendar, or NULL */
char *email_address;
+ char *alarm_email_address;
+ /* Scheduling info */
+ char *capabilities;
+
/* The calendar factories we are contacting */
GList *factories;
@@ -309,6 +313,8 @@ cal_client_init (CalClient *client, CalClientClass *klass)
priv->load_state = CAL_CLIENT_LOAD_NOT_LOADED;
priv->uri = NULL;
priv->email_address = NULL;
+ priv->alarm_email_address = NULL;
+ priv->capabilities = FALSE;
priv->factories = NULL;
priv->timezones = g_hash_table_new (g_str_hash, g_str_equal);
priv->w_client = NULL;
@@ -447,6 +453,14 @@ cal_client_finalize (GObject *object)
g_free (priv->email_address);
priv->email_address = NULL;
}
+ if (priv->alarm_email_address) {
+ g_free (priv->email_address);
+ priv->email_address = NULL;
+ }
+ if (priv->capabilities) {
+ g_free (priv->capabilities);
+ priv->capabilities = NULL;
+ }
g_hash_table_foreach (priv->timezones, free_timezone, NULL);
g_hash_table_destroy (priv->timezones);
@@ -1178,6 +1192,101 @@ cal_client_get_email_address (CalClient *client)
return priv->email_address;
}
+const char *
+cal_client_get_alarm_email_address (CalClient *client)
+{
+ CalClientPrivate *priv;
+
+ g_return_val_if_fail (client != NULL, NULL);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), NULL);
+
+ priv = client->priv;
+ g_return_val_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED, NULL);
+
+ if (priv->alarm_email_address == NULL) {
+ CORBA_Environment ev;
+ CORBA_char *email_address;
+
+ CORBA_exception_init (&ev);
+ email_address = GNOME_Evolution_Calendar_Cal_getAlarmEmailAddress (priv->cal, &ev);
+ if (!BONOBO_EX (&ev)) {
+ priv->alarm_email_address = g_strdup (email_address);
+ CORBA_free (email_address);
+ }
+ CORBA_exception_free (&ev);
+ }
+
+ return priv->alarm_email_address;
+}
+
+static void
+load_static_capabilities (CalClient *client)
+{
+ CalClientPrivate *priv;
+ CORBA_Environment ev;
+ char *cap;
+
+ priv = client->priv;
+
+ if (priv->capabilities)
+ return;
+
+ CORBA_exception_init (&ev);
+ cap = GNOME_Evolution_Calendar_Cal_getStaticCapabilities (priv->cal, &ev);
+ if (!BONOBO_EX (&ev))
+ priv->capabilities = g_strdup (cap);
+ else
+ priv->capabilities = g_strdup ("");
+ CORBA_exception_free (&ev);
+}
+
+static gboolean
+check_capability (CalClient *client, const char *cap)
+{
+ CalClientPrivate *priv;
+
+ priv = client->priv;
+
+ load_static_capabilities (client);
+ if (strstr (priv->capabilities, cap))
+ return TRUE;
+
+ return FALSE;
+}
+
+gboolean
+cal_client_get_one_alarm_only (CalClient *client)
+{
+ g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
+
+ return check_capability (client, "one-alarm-only");
+}
+
+gboolean
+cal_client_get_organizer_must_attend (CalClient *client)
+{
+ g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
+
+ return check_capability (client, "organizer-must-attend");
+}
+
+gboolean
+cal_client_get_static_capability (CalClient *client, const char *cap)
+{
+ return check_capability (client, cap);
+}
+
+gboolean
+cal_client_get_save_schedules (CalClient *client)
+{
+ g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
+
+ return check_capability (client, "save-schedules");
+}
+
/* Converts our representation of a calendar component type into its CORBA representation */
static GNOME_Evolution_Calendar_CalObjType
corba_obj_type (CalObjType type)
@@ -1262,6 +1371,75 @@ struct _CalClientGetTimezonesData {
CalClientGetStatus status;
};
+CalClientGetStatus
+cal_client_get_default_object (CalClient *client, CalObjType type, CalComponent **comp)
+{
+ CalClientPrivate *priv;
+ CORBA_Environment ev;
+ GNOME_Evolution_Calendar_CalObj comp_str;
+ CalClientGetStatus retval;
+ icalcomponent *icalcomp;
+ CalClientGetTimezonesData cb_data;
+
+ g_return_val_if_fail (client != NULL, CAL_CLIENT_GET_NOT_FOUND);
+ g_return_val_if_fail (IS_CAL_CLIENT (client), CAL_CLIENT_GET_NOT_FOUND);
+
+ priv = client->priv;
+ g_return_val_if_fail (priv->load_state == CAL_CLIENT_LOAD_LOADED, CAL_CLIENT_GET_NOT_FOUND);
+
+ g_return_val_if_fail (comp != NULL, CAL_CLIENT_GET_NOT_FOUND);
+
+ retval = CAL_CLIENT_GET_NOT_FOUND;
+ *comp = NULL;
+
+ CORBA_exception_init (&ev);
+ comp_str = GNOME_Evolution_Calendar_Cal_getDefaultObject (priv->cal, type, &ev);
+
+ if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_NotFound))
+ goto out;
+ else if (BONOBO_EX (&ev)) {
+ g_message ("cal_client_get_object(): could not get the object");
+ goto out;
+ }
+
+ icalcomp = icalparser_parse_string (comp_str);
+ CORBA_free (comp_str);
+
+ if (!icalcomp) {
+ retval = CAL_CLIENT_GET_SYNTAX_ERROR;
+ goto out;
+ }
+
+ *comp = cal_component_new ();
+ if (!cal_component_set_icalcomponent (*comp, icalcomp)) {
+ icalcomponent_free (icalcomp);
+ g_object_unref (*comp);
+ *comp = NULL;
+
+ retval = CAL_CLIENT_GET_SYNTAX_ERROR;
+ goto out;
+ }
+
+ /* Now make sure we have all timezones needed for this object.
+ We do this to try to avoid any problems caused by getting a timezone
+ in the middle of other code. Any calls to ORBit result in a
+ recursive call of the GTK+ main loop, which can cause problems for
+ code that doesn't expect it. Currently GnomeCanvas has problems if
+ we try to get a timezone in the middle of a redraw, and there is a
+ resize pending, which leads to an assert failure and an abort. */
+ cb_data.client = client;
+ cb_data.status = CAL_CLIENT_GET_SUCCESS;
+ icalcomponent_foreach_tzid (icalcomp,
+ cal_client_get_object_timezones_cb,
+ &cb_data);
+
+ retval = cb_data.status;
+
+ out:
+
+ CORBA_exception_free (&ev);
+ return retval;
+}
/**
* cal_client_get_object:
@@ -2450,21 +2628,8 @@ cal_client_get_component_as_string (CalClient *client,
TRUE);
}
-/**
- * cal_client_update_object:
- * @client: A calendar client.
- * @comp: A calendar component object.
- *
- * Asks a calendar to update a component. Any existing component with the
- * specified component's UID will be replaced. The client program should not
- * assume that the object is actually in the server's storage until it has
- * received the "obj_updated" notification signal.
- *
- * Return value: a #CalClientResult value indicating the result of the
- * operation.
- **/
CalClientResult
-cal_client_update_object (CalClient *client, CalComponent *comp)
+cal_client_update_object_with_mod (CalClient *client, CalComponent *comp, CalObjModType mod)
{
CalClientPrivate *priv;
CORBA_Environment ev;
@@ -2487,7 +2652,7 @@ cal_client_update_object (CalClient *client, CalComponent *comp)
return CAL_CLIENT_RESULT_INVALID_OBJECT;
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, &ev);
+ GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, mod, &ev);
g_free (obj_string);
if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
@@ -2507,6 +2672,27 @@ cal_client_update_object (CalClient *client, CalComponent *comp)
return retval;
}
+
+/**
+ * cal_client_update_object:
+ * @client: A calendar client.
+ * @comp: A calendar component object.
+ *
+ * Asks a calendar to update a component. Any existing component with the
+ * specified component's UID will be replaced. The client program should not
+ * assume that the object is actually in the server's storage until it has
+ * received the "obj_updated" notification signal.
+ *
+ * Return value: a #CalClientResult value indicating the result of the
+ * operation.
+ **/
+CalClientResult
+cal_client_update_object (CalClient *client, CalComponent *comp)
+{
+
+ return cal_client_update_object_with_mod (client, comp, CALOBJ_MOD_ALL);
+}
+
/**
* cal_client_update_objects:
* @client: A calendar client.
@@ -2546,7 +2732,7 @@ cal_client_update_objects (CalClient *client, icalcomponent *icalcomp)
obj_string = icalcomponent_as_ical_string (icalcomp);
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, &ev);
+ GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, GNOME_Evolution_Calendar_MOD_ALL, &ev);
if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
retval = CAL_CLIENT_RESULT_INVALID_OBJECT;
@@ -2565,21 +2751,8 @@ cal_client_update_objects (CalClient *client, icalcomponent *icalcomp)
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: a #CalClientResult value indicating the result of the
- * operation.
- **/
CalClientResult
-cal_client_remove_object (CalClient *client, const char *uid)
+cal_client_remove_object_with_mod (CalClient *client, const char *uid, CalObjModType mod)
{
CalClientPrivate *priv;
CORBA_Environment ev;
@@ -2594,7 +2767,7 @@ cal_client_remove_object (CalClient *client, const char *uid)
g_return_val_if_fail (uid != NULL, CAL_CLIENT_RESULT_NOT_FOUND);
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_removeObject (priv->cal, (char *) uid, &ev);
+ GNOME_Evolution_Calendar_Cal_removeObject (priv->cal, (char *) uid, mod, &ev);
if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
retval = CAL_CLIENT_RESULT_INVALID_OBJECT;
@@ -2613,6 +2786,24 @@ cal_client_remove_object (CalClient *client, const char *uid)
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: a #CalClientResult value indicating the result of the
+ * operation.
+ **/
+CalClientResult
+cal_client_remove_object (CalClient *client, const char *uid)
+{
+ return cal_client_remove_object_with_mod (client, uid, CALOBJ_MOD_ALL);
+}
+
CalClientResult
cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
icalcomponent **new_icalcomp, GList **users,
@@ -2758,7 +2949,7 @@ cal_client_ensure_timezone_on_server (CalClient *client, icaltimezone *zone)
g_string_free (vcal_string, FALSE);
CORBA_exception_init (&ev);
- GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, &ev);
+ GNOME_Evolution_Calendar_Cal_updateObjects (priv->cal, obj_string, GNOME_Evolution_Calendar_MOD_ALL, &ev);
g_free (obj_string);
if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index 3ea0b1a213..d30982b2ab 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -155,11 +155,21 @@ const char *cal_client_get_uri (CalClient *client);
gboolean cal_client_is_read_only (CalClient *client);
const char *cal_client_get_email_address (CalClient *client);
+const char *cal_client_get_alarm_email_address (CalClient *client);
+
+gboolean cal_client_get_one_alarm_only (CalClient *client);
+gboolean cal_client_get_organizer_must_attend (CalClient *client);
+gboolean cal_client_get_save_schedules (CalClient *client);
+gboolean cal_client_get_static_capability (CalClient *client, const char *cap);
gboolean cal_client_set_mode (CalClient *client, CalMode mode);
int cal_client_get_n_objects (CalClient *client, CalObjType type);
+CalClientGetStatus cal_client_get_default_object (CalClient *client,
+ CalObjType type,
+ CalComponent **comp);
+
CalClientGetStatus cal_client_get_object (CalClient *client,
const char *uid,
CalComponent **comp);
@@ -192,11 +202,13 @@ gboolean cal_client_get_alarms_for_object (CalClient *client, const char *uid,
/* Add or update a single object. When adding an object only builtin timezones
are allowed. To use external VTIMEZONE data call update_objects() instead.*/
CalClientResult cal_client_update_object (CalClient *client, CalComponent *comp);
+CalClientResult cal_client_update_object_with_mod (CalClient *client, CalComponent *comp, CalObjModType mod);
/* Add or update multiple objects, possibly including VTIMEZONE data. */
CalClientResult cal_client_update_objects (CalClient *client, icalcomponent *icalcomp);
CalClientResult cal_client_remove_object (CalClient *client, const char *uid);
+CalClientResult cal_client_remove_object_with_mod (CalClient *client, const char *uid, CalObjModType mod);
CalClientSendResult cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
icalcomponent **new_icalcomp, GList **users,