aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
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/pcs
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/pcs')
-rw-r--r--calendar/pcs/cal-backend.c27
-rw-r--r--calendar/pcs/cal-backend.h2
-rw-r--r--calendar/pcs/cal-factory.c4
-rw-r--r--calendar/pcs/cal.c30
4 files changed, 61 insertions, 2 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
index 983edbb3cc..91ffd8dc1d 100644
--- a/calendar/pcs/cal-backend.c
+++ b/calendar/pcs/cal-backend.c
@@ -385,3 +385,30 @@ cal_backend_load (CalBackend *backend, GnomeVFSURI *uri)
priv->loaded = TRUE;
return CAL_BACKEND_LOAD_SUCCESS;
}
+
+/**
+ * cal_backend_get_object:
+ * @backend: A calendar backend.
+ * @uid: Unique identifier for a calendar object.
+ *
+ * Queries a calendar backend for a calendar object based on its unique
+ * identifier.
+ *
+ * Return value: The string representation of the sought object, or NULL if no
+ * object had the specified UID.
+ **/
+char *
+cal_backend_get_object (CalBackend *backend, const char *uid)
+{
+ CalBackendPrivate *priv;
+
+ g_return_val_if_fail (backend != NULL, NULL);
+ g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
+
+ priv = backend->priv;
+ g_return_val_if_fail (priv->loaded, NULL);
+
+ g_return_val_if_fail (uid != NULL, NULL);
+
+ /* FIXME */
+}
diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h
index 31f726a68f..e972cbd59e 100644
--- a/calendar/pcs/cal-backend.h
+++ b/calendar/pcs/cal-backend.h
@@ -66,6 +66,8 @@ void cal_backend_remove_cal (CalBackend *backend, Cal *cal);
CalBackendLoadStatus cal_backend_load (CalBackend *backend, GnomeVFSURI *uri);
+char *cal_backend_get_object (CalBackend *backend, const char *uid);
+
END_GNOME_DECLS
diff --git a/calendar/pcs/cal-factory.c b/calendar/pcs/cal-factory.c
index f544964612..d5b79ef423 100644
--- a/calendar/pcs/cal-factory.c
+++ b/calendar/pcs/cal-factory.c
@@ -156,7 +156,7 @@ cal_factory_destroy (GtkObject *object)
/* CalFactory::load method */
static void
CalFactory_load (PortableServer_Servant servant,
- CORBA_char *uri,
+ const CORBA_char *uri,
Evolution_Calendar_Listener listener,
CORBA_Environment *ev)
{
@@ -187,7 +187,7 @@ CalFactory_load (PortableServer_Servant servant,
/* CalFactory::create method */
static void
CalFactory_create (PortableServer_Servant servant,
- CORBA_char *uri,
+ const CORBA_char *uri,
Evolution_Calendar_Listener listener,
CORBA_Environment *ev)
{
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index eac02bb6d4..1403c2c028 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/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;
}
5-06-073-34/+2 * Use MAKE_ARGSvs2005-06-072-46/+3 * - Use PLIST_FILES/PORTDOCSvs2005-06-073-10/+9 * change the libtool version to use from 1.3 to 1.5oliver2005-06-044-10/+2 * - Fix build with gcc-3.4pav2005-05-282-4/+154 * Changed MASTER_SITES because of missing the distfile.sumikawa2005-05-081-1/+1 * Fix C99-ism.bland2005-05-012-4/+4 * Add USB devices support for 5.x.bland2005-04-274-2/+176 * Commit a patch forgotten in the last commit:marcus2005-04-224-2/+24 * Link the gnome-pilot libraries correctly so they play nice with the newmarcus2005-04-224-0/+42 * Set my ports to their shiny new MAINTAINER address.lawrance2005-04-1213-13/+13 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-128-8/+8 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-118-8/+8 * Update to 2.0.13.marcus2005-04-1112-16/+38 * Fix MASTER_SITES.krion2005-03-311-3/+1 * BROKEN: Unfetchablekris2005-03-271-0/+2 * Bump PORTREVISION to chase the glib20 shared lib version change.marcus2005-03-1210-5/+10 * Update to 0.13arved2005-03-092-2/+3 * Remove more copies of Tcl's SunOS shared library hack.das2005-02-202-0/+34 * As previously announced, remove ports that have reached their expiry date,kris2005-02-196-55/+0 * Fix gzip namespace pollution (bump PORTREV)vs2005-02-172-1/+10 * BROKEN: Incorrect pkg-plistkris2005-02-121-0/+2 * ColdSync 2.2.5 fails to work with devices running PalmOS 4.0 and above,vs2005-02-123-6/+54 * - Fix pkg-plistleeym2005-02-081-0/+1 * - Look for pilot-link in ${LOCALBASE}pav2005-02-061-1/+2 * Unquote IGNORE.vs2005-01-201-1/+1 * [maintainer] palm/synce-kde: update to 0.8.0; transform from rapipedwin2005-01-145-434/+40 * - remove palm/rapip after repocopysem2005-01-105-484/+0 * Add synce-multisync, a SynCE synchronization plugin for Multisync.pav2005-01-095-0/+42 * repo copy palm/rapip -> palm/synce-kdesem2005-01-091-1/+1 * - Fix build on 4.xpav2005-01-092-0/+52 * - Update to 0.9.0pav2005-01-0927-140/+84 * Now buildable on 4.x, still broken on >= 5.x.kris2005-01-081-2/+4 * Say hello to the linux mega patch, it consolidates our linux bits anetchild2005-01-011-1/+1 * This port is scheduled to be removed on 2005-02-18 if it is stillkris2004-12-191-0/+2 * BROKEN on 4.x: Does not buildkris2004-12-121-1/+7 * o) I'm not using syncal anymore for several month so it would be best to givelkoeller2004-11-301-1/+1 * Use new GCONF_SCHEMAS.mezz2004-11-244-6/+2 * Use new INSTALLS_OMF.mezz2004-11-234-4/+2 * More pthread-check fixes.lofi2004-11-124-2/+840 * Bump PORTREVISIONS for all ports that depend on atk or pango to ease in themarcus2004-11-089-5/+9 * Update tp 1.3.0kevlo2004-11-062-3/+4 * - Update to 1.8pav2004-11-038-42/+84 * Updated to 4.15skv2004-10-192-3/+3 * Now builds on amd64kris2004-09-281-4/+0 * BROKEN: Configure failskris2004-09-261-0/+2 * BROKEN on 4.x alsokris2004-09-261-4/+2 * BROKEN on 5.x: Does not compilekris2004-09-261-0/+4 * - Fix package on 4.x (perl 5.0) - Pod:Man is needed for generating of some ma...pav2004-09-262-0/+5 * - Fix plist and unbreakpav2004-09-262-284/+303 * Update to 0.7 to fix build failure (deal with usbdevs changes).thierry2004-09-252-4/+4 * Update to 2.0.12.marcus2004-09-0412-12/+16 * Update to KDE 3.3lofi2004-08-315-189/+0 * Use intlhack.adamw2004-08-282-2/+2 * Update to 2.0.11.marcus2004-08-27