aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@src.gnome.org>2000-06-23 01:24:17 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-06-23 01:24:17 +0800
commita3a3ee2b1456314989686ed356108b7356c0a272 (patch)
tree437bbf0e9af949208d07b547f852f377585f2f8e /calendar/cal-client
parentc14e8dd705e3483f2b0cf1fec2d754637d66b062 (diff)
downloadgsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.tar
gsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.tar.gz
gsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.tar.bz2
gsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.tar.lz
gsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.tar.xz
gsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.tar.zst
gsoc2013-evolution-a3a3ee2b1456314989686ed356108b7356c0a272.zip
Sync - Federico
svn path=/trunk/; revision=3693
Diffstat (limited to 'calendar/cal-client')
-rw-r--r--calendar/cal-client/cal-client.c23
-rw-r--r--calendar/cal-client/cal-client.h2
2 files changed, 14 insertions, 11 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c
index 007e284b7a..f1e60be3f3 100644
--- a/calendar/cal-client/cal-client.c
+++ b/calendar/cal-client/cal-client.c
@@ -979,22 +979,22 @@ cal_client_get_alarms_for_object (CalClient *client, const char *uid,
/**
* cal_client_update_object:
* @client: A calendar client.
- * @uid: Unique identifier of object to update.
- * @calobj: String representation of the new calendar object.
+ * @ico: A calendar object.
*
- * Asks a calendar to update an object based on its UID. Any existing object
- * with the specified 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.
+ * Asks a calendar to update an object. Any existing object with the specified
+ * 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: TRUE on success, FALSE on specifying an invalid object.
**/
gboolean
-cal_client_update_object (CalClient *client, const char *uid, const char *calobj)
+cal_client_update_object (CalClient *client, iCalObject *ico)
{
CalClientPrivate *priv;
CORBA_Environment ev;
gboolean retval;
+ char *obj_string;
g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (IS_CAL_CLIENT (client), FALSE);
@@ -1002,13 +1002,16 @@ cal_client_update_object (CalClient *client, const char *uid, const char *calobj
priv = client->priv;
g_return_val_if_fail (priv->load_state == LOAD_STATE_LOADED, FALSE);
- g_return_val_if_fail (uid != NULL, FALSE);
- g_return_val_if_fail (calobj != NULL, FALSE);
+ g_return_val_if_fail (ico != NULL, FALSE);
+ g_return_val_if_fail (ico->uid != NULL, FALSE);
retval = FALSE;
+ obj_string = ical_object_to_string (ico);
+
CORBA_exception_init (&ev);
- Evolution_Calendar_Cal_update_object (priv->cal, uid, calobj, &ev);
+ Evolution_Calendar_Cal_update_object (priv->cal, ico->uid, obj_string, &ev);
+ g_free (obj_string);
if (ev._major == CORBA_USER_EXCEPTION &&
strcmp (CORBA_exception_id (&ev), ex_Evolution_Calendar_Cal_InvalidObject) == 0)
diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h
index 947c9dd5dc..7c67cfba2e 100644
--- a/calendar/cal-client/cal-client.h
+++ b/calendar/cal-client/cal-client.h
@@ -97,7 +97,7 @@ gboolean cal_client_get_alarms_for_object (CalClient *client, const char *uid,
time_t start, time_t end,
GList **alarms);
-gboolean cal_client_update_object (CalClient *client, const char *uid, const char *calobj);
+gboolean cal_client_update_object (CalClient *client, iCalObject *ico);
gboolean cal_client_remove_object (CalClient *client, const char *uid);