aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-08-08 03:34:07 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-08-08 03:34:07 +0800
commit51012e60d827b73a7bfd42b921760b0835dc7b66 (patch)
treea2a99d0306ad84d22226541cd3199e379e7692af /calendar/pcs/cal.c
parent1c34dc5138579c3c7855622ae0e0880c55c62f68 (diff)
downloadgsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.tar
gsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.tar.gz
gsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.tar.bz2
gsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.tar.lz
gsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.tar.xz
gsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.tar.zst
gsoc2013-evolution-51012e60d827b73a7bfd42b921760b0835dc7b66.zip
just return the object untouched since we don't send anything
2002-08-07 JP Rosevear <jpr@ximian.com> * pcs/cal-backend-file.c (cal_backend_file_send_object): just return the object untouched since we don't send anything * pcs/cal-backend.c (cal_backend_remove_object): call virtual method * pcs/cal-backend.h: add send result codes, new proto * pcs/cal.c (impl_Cal_send_object): implement sendObject corba call (cal_class_init): add to epv * gui/itip-utils.c (comp_toplevel_with_zones): utility function to create icalcomponent with necessary timezone info (comp_has_attendee): see if attendee is in the attendee list (comp_server_send): use above and remove attendees if the server sends them * gui/e-itip-control.c (show_current_todo): remove unused var * idl/evolution-calendar.idl: add Busy exception and * cal-client/cal-client.c (cal_client_send_object): send object via the server (if the server can) * cal-client/cal-client.h: add send results and new proto svn path=/trunk/; revision=17734
Diffstat (limited to 'calendar/pcs/cal.c')
-rw-r--r--calendar/pcs/cal.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index 26ed90de76..4f8ff173f0 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -441,6 +441,49 @@ impl_Cal_remove_object (PortableServer_Servant servant,
}
}
+/* Cal::send_object method */
+static GNOME_Evolution_Calendar_CalObj
+impl_Cal_send_object (PortableServer_Servant servant,
+ const GNOME_Evolution_Calendar_CalObj calobj,
+ GNOME_Evolution_Calendar_UserList **user_list,
+ CORBA_Environment *ev)
+{
+ Cal *cal;
+ CalPrivate *priv;
+ CORBA_char *calobj_copy;
+ char *new_calobj;
+ CalBackendSendResult result;
+
+ cal = CAL (bonobo_object_from_servant (servant));
+ priv = cal->priv;
+
+ result = cal_backend_send_object (priv->backend, calobj, &new_calobj, user_list);
+ switch (result) {
+ case CAL_BACKEND_SEND_SUCCESS:
+ calobj_copy = CORBA_string_dup (calobj);
+ g_free (new_calobj);
+
+ return calobj_copy;
+
+ case CAL_BACKEND_SEND_INVALID_OBJECT:
+ bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject);
+ break;
+
+ case CAL_BACKEND_SEND_BUSY:
+ bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_Busy);
+ break;
+
+ case CAL_BACKEND_SEND_PERMISSION_DENIED:
+ bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_PermissionDenied);
+ break;
+
+ default :
+ g_assert_not_reached ();
+ }
+
+ return NULL;
+}
+
/* Cal::getQuery implementation */
static GNOME_Evolution_Calendar_Query
impl_Cal_get_query (PortableServer_Servant servant,
@@ -671,6 +714,7 @@ cal_class_init (CalClass *klass)
epv->getAlarmsForObject = impl_Cal_get_alarms_for_object;
epv->updateObjects = impl_Cal_update_objects;
epv->removeObject = impl_Cal_remove_object;
+ epv->sendObject = impl_Cal_send_object;
epv->getQuery = impl_Cal_get_query;
}