diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-06-09 15:04:09 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-06-09 15:04:09 +0800 |
commit | 943862dd20ad79007900192fec5c705e9748542a (patch) | |
tree | 01330a057de763ae84f14e8ce004928d835012f1 /calendar/pcs/cal.c | |
parent | 95ebc1fc92ebe028654b8842bc9d7e5174a0090e (diff) | |
download | gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.gz gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.bz2 gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.lz gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.xz gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.tar.zst gsoc2013-evolution-943862dd20ad79007900192fec5c705e9748542a.zip |
Added a get_n_objects() method.
2000-06-09 Federico Mena Quintero <federico@helixcode.com>
* idl/evolution-calendar.idl (Cal): Added a get_n_objects()
method.
* pcs/cal-backend.c (cal_backend_get_n_objects): New function.
* pcs/cal-backend-imc.c (cal_backend_imc_get_n_objects):
Implemented.
* pcs/cal.c (Cal_get_n_objects): Implemented.
* cal-client/cal-client.c (cal_client_get_uids): Free the ev.
(cal_client_get_n_objects): Implemented.
* cal-util/calobj.h (iCalObjectField): New enumeration to identify
the fields in an iCalObject.
svn path=/trunk/; revision=3486
Diffstat (limited to 'calendar/pcs/cal.c')
-rw-r--r-- | calendar/pcs/cal.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c index 13fab067f8..a01c0ce8dc 100644 --- a/calendar/pcs/cal.c +++ b/calendar/pcs/cal.c @@ -166,7 +166,35 @@ Cal_get_uri (PortableServer_Servant servant, g_free (str_uri); return str_uri_copy; +} + +/* Cal::get_n_objects method */ +static CORBA_long +Cal_get_n_objects (PortableServer_Servant servant, + Evolution_Calendar_CalObjType type, + CORBA_Environment *ev) +{ + Cal *cal; + CalPrivate *priv; + int t; + int n; + + cal = CAL (bonobo_object_from_servant (servant)); + priv = cal->priv; + + /* Translate the CORBA flags to our own flags */ + + t = (((type & Evolution_Calendar_TYPE_EVENT) ? CALOBJ_TYPE_EVENT : 0) + | ((type & Evolution_Calendar_TYPE_TODO) ? CALOBJ_TYPE_TODO : 0) + | ((type & Evolution_Calendar_TYPE_JOURNAL) ? CALOBJ_TYPE_JOURNAL : 0) + | ((type & Evolution_Calendar_TYPE_OTHER) ? CALOBJ_TYPE_OTHER : 0) + /* + | ((type & Evolution_Calendar_TYPE_ANY) ? CALOBJ_TYPE_ANY : 0) + */ + ); + n = cal_backend_get_n_objects (priv->backend, t); + return n; } /* Cal::get_object method */ @@ -504,6 +532,7 @@ cal_get_epv (void) epv = g_new0 (POA_Evolution_Calendar_Cal__epv, 1); epv->_get_uri = Cal_get_uri; + epv->get_n_objects = Cal_get_n_objects; epv->get_object = Cal_get_object; epv->get_uids = Cal_get_uids; epv->get_events_in_range = Cal_get_events_in_range; |