diff options
author | Seth Alves <alves@src.gnome.org> | 2000-06-29 21:23:44 +0800 |
---|---|---|
committer | Seth Alves <alves@src.gnome.org> | 2000-06-29 21:23:44 +0800 |
commit | 70c974e7d9d44db682cd9cc447485f292ad2aa54 (patch) | |
tree | 83d68fc016f555e36e8fa010d1f8b2367307fff3 /calendar/pcs/cal.c | |
parent | fe1bb9d0b60ab6a1b8a8c525d28d0b09d2d74641 (diff) | |
download | gsoc2013-evolution-70c974e7d9d44db682cd9cc447485f292ad2aa54.tar.gz gsoc2013-evolution-70c974e7d9d44db682cd9cc447485f292ad2aa54.tar.zst gsoc2013-evolution-70c974e7d9d44db682cd9cc447485f292ad2aa54.zip |
server code to service these:
* pcs/cal.c (Cal_get_uid_by_pilot_id):
(Cal_update_pilot_id):
* pcs/cal-backend-imc.c (cal_backend_imc_update_pilot_id):
(cal_backend_imc_get_uid_by_pilot_id):
* pcs/cal-backend.c (cal_backend_get_uid_by_pilot_id):
(cal_backend_update_pilot_id): server code to service these:
* gui/calendar-pilot-sync.c: updated to make use of cal-client.
also uses dirty bits on both sides to aid in syncing.
* cal-client/cal-client.c (cal_client_get_uid_by_pilot_id): new
function -- ask the cal server to return uid given an object's
pilot id.
(cal_client_update_pilot_id): new function -- inform the
cal server of an objects pilot id and pilot dirty-flag.
svn path=/trunk/; revision=3789
Diffstat (limited to 'calendar/pcs/cal.c')
-rw-r--r-- | calendar/pcs/cal.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c index a01c0ce8dc..35677c6cac 100644 --- a/calendar/pcs/cal.c +++ b/calendar/pcs/cal.c @@ -517,6 +517,57 @@ Cal_remove_object (PortableServer_Servant servant, NULL); } + + +/* Cal::get_uid_by_pilot_id method */ +static Evolution_Calendar_CalObjUID +Cal_get_uid_by_pilot_id (PortableServer_Servant servant, + const Evolution_Calendar_PilotID pilot_id, + CORBA_Environment *ev) +{ + Cal *cal; + CalPrivate *priv; + char *uid; + + cal = CAL (bonobo_object_from_servant (servant)); + priv = cal->priv; + + uid = cal_backend_get_uid_by_pilot_id (priv->backend, pilot_id); + + if (uid) { + CORBA_char *uid_copy; + + uid_copy = CORBA_string_dup (uid); + g_free (uid); + return uid_copy; + } else { + CORBA_exception_set (ev, CORBA_USER_EXCEPTION, + ex_Evolution_Calendar_Cal_NotFound, + NULL); + return NULL; + } +} + + +/* Cal::update_pilot_id method */ +static void +Cal_update_pilot_id (PortableServer_Servant servant, + const Evolution_Calendar_CalObjUID uid, + const Evolution_Calendar_PilotID pilot_id, + const CORBA_unsigned_long pilot_status, + CORBA_Environment * ev) +{ + Cal *cal; + CalPrivate *priv; + + cal = CAL (bonobo_object_from_servant (servant)); + priv = cal->priv; + + cal_backend_update_pilot_id (priv->backend, uid, + pilot_id, pilot_status); +} + + /** * cal_get_epv: * @void: @@ -540,6 +591,8 @@ cal_get_epv (void) epv->get_alarms_for_object = Cal_get_alarms_for_object; epv->update_object = Cal_update_object; epv->remove_object = Cal_remove_object; + epv->get_uid_by_pilot_id = Cal_get_uid_by_pilot_id; + epv->update_pilot_id = Cal_update_pilot_id; return epv; } |