aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-02-02 17:51:20 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-02-02 17:51:20 +0800
commit9d6fc52249f34b5a3985bea8ace18059be9e4bba (patch)
tree59ac26466d87061d4573e72fe228d47b77dbb318 /calendar/cal.c
parent9d4be61768f69a0aff9daa55c088724d0d5a54a6 (diff)
downloadgsoc2013-evolution-9d6fc52249f34b5a3985bea8ace18059be9e4bba.tar.gz
gsoc2013-evolution-9d6fc52249f34b5a3985bea8ace18059be9e4bba.tar.zst
gsoc2013-evolution-9d6fc52249f34b5a3985bea8ace18059be9e4bba.zip
Added the get_object() method.
2000-02-03 Federico Mena Quintero <federico@helixcode.com> * evolution-calendar.idl (Cal): Added the get_object() method. * cal-client.c (cal_client_get_object): New function to get a calendar object by its UID. * cal.c (Cal_get_object): Implemented. * cal-backend.c (cal_backend_get_object): New unfinished backend function. We need some reorganizing of how the calendar objects are stored. svn path=/trunk/; revision=1663
Diffstat (limited to 'calendar/cal.c')
-rw-r--r--calendar/cal.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/calendar/cal.c b/calendar/cal.c
index eac02bb6d4..1403c2c028 100644
--- a/calendar/cal.c
+++ b/calendar/cal.c
@@ -167,6 +167,35 @@ Cal_get_uri (PortableServer_Servant servant,
}
+/* Cal::get_object method */
+static Evolution_Calendar_CalObj
+Cal_get_object (PortableServer_Servant servant,
+ const Evolution_Calendar_CalObjUID uid,
+ CORBA_Environment *ev)
+{
+ Cal *cal;
+ CalPrivate *priv;
+ char *calobj;
+
+ cal = CAL (bonobo_object_from_servant (servant));
+ priv = cal->priv;
+
+ calobj = cal_backend_get_object (priv->backend, uid);
+
+ if (uid) {
+ CORBA_char *calobj_copy;
+
+ calobj_copy = CORBA_string_dup (calobj);
+ g_free (calobj);
+ return calobj_copy;
+ } else {
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+ ex_Evolution_Calendar_Cal_NotFound,
+ NULL);
+ return NULL;
+ }
+}
+
/**
* cal_get_epv:
* @void:
@@ -182,6 +211,7 @@ cal_get_epv (void)
epv = g_new0 (POA_Evolution_Calendar_Cal__epv, 1);
epv->_get_uri = Cal_get_uri;
+ epv->get_object = Cal_get_object;
return epv;
}