aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2002-09-05 00:19:21 +0800
committerJP Rosevear <jpr@src.gnome.org>2002-09-05 00:19:21 +0800
commitf768bddb9325e7784477bcbcef0bce2a466a635a (patch)
tree7a5223bc31dc49e046ea4b41e0c3da35467b282c /calendar/cal-client
parentddaa0af2ceba5de217424eeddfa3f650049ddfa1 (diff)
downloadgsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar
gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.gz
gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.bz2
gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.lz
gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.xz
gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.tar.zst
gsoc2013-evolution-f768bddb9325e7784477bcbcef0bce2a466a635a.zip
provide error message param, give a dialog with the message if we get a
2002-09-04 JP Rosevear <jpr@ximian.com> * gui/itip-utils.c (comp_server_send): provide error message param, give a dialog with the message if we get a busy result; return TRUE if we succeed (itip_send_comp): bail out if we had a problem sending via the server * cal-client/cal-client.c (cal_client_send_object): pass back error message if we get the busy exception in the new param * cal-client/cal-client.h: update proto * pcs/cal.c (impl_Cal_send_object): dump backend error message into Busy exception * pcs/cal-backend.h: update proto * pcs/cal-backend.c (cal_backend_send_object): take/pass new error message parameter * pcs/cal-backend-file.c (cal_backend_file_send_object): take new param * idl/evolution-calendar.idl: add errorMsg to Busy exception svn path=/trunk/; revision=17964
Diffstat (limited to 'calendar/cal-client')
-rw-r--r--calendar/cal-client/cal-client.c13
-rw-r--r--calendar/cal-client/cal-client.h3
2 files changed, 10 insertions, 6 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index b46dc3a215..6d9deacde8 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -2446,7 +2446,8 @@ cal_client_remove_object (CalClient *client, const char *uid)
CalClientResult
cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
- icalcomponent **new_icalcomp, GList **users)
+ icalcomponent **new_icalcomp, GList **users,
+ char error_msg[256])
{
CalClientPrivate *priv;
CORBA_Environment ev;
@@ -2470,13 +2471,15 @@ cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
CORBA_exception_init (&ev);
obj_string = GNOME_Evolution_Calendar_Cal_sendObject (priv->cal, obj_string, &user_list, &ev);
- if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject))
+ if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_InvalidObject)) {
retval = CAL_CLIENT_SEND_INVALID_OBJECT;
- else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_Busy))
+ } else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_Busy)) {
retval = CAL_CLIENT_SEND_BUSY;
- else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_PermissionDenied))
+ strcpy (error_msg,
+ ((GNOME_Evolution_Calendar_Cal_Busy *)(CORBA_exception_value (&ev)))->errorMsg);
+ } else if (BONOBO_USER_EX (&ev, ex_GNOME_Evolution_Calendar_Cal_PermissionDenied)) {
retval = CAL_CLIENT_SEND_PERMISSION_DENIED;
- else if (BONOBO_EX (&ev)) {
+ } else if (BONOBO_EX (&ev)) {
g_message ("cal_client_update_objects(): could not send the objects");
retval = CAL_CLIENT_SEND_CORBA_ERROR;
} else {
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index de5e19ffdf..ef42cdccd6 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -186,7 +186,8 @@ CalClientResult cal_client_update_objects (CalClient *client, icalcomponent *ica
CalClientResult cal_client_remove_object (CalClient *client, const char *uid);
CalClientSendResult cal_client_send_object (CalClient *client, icalcomponent *icalcomp,
- icalcomponent **new_icalcomp, GList **users);
+ icalcomponent **new_icalcomp, GList **users,
+ char error_msg[256]);
CalQuery *cal_client_get_query (CalClient *client, const char *sexp);