diff options
Diffstat (limited to 'calendar/pcs')
-rw-r--r-- | calendar/pcs/cal-backend-file.c | 8 | ||||
-rw-r--r-- | calendar/pcs/cal-backend.c | 10 | ||||
-rw-r--r-- | calendar/pcs/cal-backend.h | 2 | ||||
-rw-r--r-- | calendar/pcs/cal.c | 25 |
4 files changed, 45 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index 91081d77f0..7ab6506aa9 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -80,6 +80,7 @@ static const char *cal_backend_file_get_uri (CalBackend *backend); static gboolean cal_backend_file_is_read_only (CalBackend *backend); static const char *cal_backend_file_get_cal_address (CalBackend *backend); static const char *cal_backend_file_get_alarm_email_address (CalBackend *backend); +static const char *cal_backend_file_get_ldap_attribute (CalBackend *backend); static const char *cal_backend_file_get_static_capabilities (CalBackend *backend); static CalBackendOpenStatus cal_backend_file_open (CalBackend *backend, const char *uristr, @@ -180,6 +181,7 @@ cal_backend_file_class_init (CalBackendFileClass *class) backend_class->is_read_only = cal_backend_file_is_read_only; backend_class->get_cal_address = cal_backend_file_get_cal_address; backend_class->get_alarm_email_address = cal_backend_file_get_alarm_email_address; + backend_class->get_ldap_attribute = cal_backend_file_get_ldap_attribute; backend_class->get_static_capabilities = cal_backend_file_get_static_capabilities; backend_class->open = cal_backend_file_open; backend_class->is_loaded = cal_backend_file_is_loaded; @@ -441,6 +443,12 @@ cal_backend_file_get_cal_address (CalBackend *backend) } static const char * +cal_backend_file_get_ldap_attribute (CalBackend *backend) +{ + return NULL; +} + +static const char * cal_backend_file_get_alarm_email_address (CalBackend *backend) { /* A file backend has no particular email address associated diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 536501ce47..765d873f79 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -294,6 +294,16 @@ cal_backend_get_alarm_email_address (CalBackend *backend) } const char * +cal_backend_get_ldap_attribute (CalBackend *backend) +{ + g_return_val_if_fail (backend != NULL, NULL); + g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL); + + g_assert (CLASS (backend)->get_ldap_attribute != NULL); + return (* CLASS (backend)->get_ldap_attribute) (backend); +} + +const char * cal_backend_get_static_capabilities (CalBackend *backend) { g_return_val_if_fail (backend != NULL, NULL); diff --git a/calendar/pcs/cal-backend.h b/calendar/pcs/cal-backend.h index ba73886bbd..962b468fc3 100644 --- a/calendar/pcs/cal-backend.h +++ b/calendar/pcs/cal-backend.h @@ -97,6 +97,7 @@ struct _CalBackendClass { const char *(* get_cal_address) (CalBackend *backend); const char *(* get_alarm_email_address) (CalBackend *backend); + const char *(* get_ldap_attribute) (CalBackend *backend); const char *(* get_static_capabilities) (CalBackend *backend); @@ -157,6 +158,7 @@ const char *cal_backend_get_uri (CalBackend *backend); const char *cal_backend_get_cal_address (CalBackend *backend); const char *cal_backend_get_alarm_email_address (CalBackend *backend); +const char *cal_backend_get_ldap_attribute (CalBackend *backend); const char *cal_backend_get_static_capabilities (CalBackend *backend); diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c index 9040534940..bd6ffb4b38 100644 --- a/calendar/pcs/cal.c +++ b/calendar/pcs/cal.c @@ -125,6 +125,30 @@ impl_Cal_getAlarmEmailAddress (PortableServer_Servant servant, return str_email_address_copy; } + +/* Cal::get_ldap_attribute method */ +static CORBA_char * +impl_Cal_getLdapAttribute (PortableServer_Servant servant, + CORBA_Environment *ev) +{ + Cal *cal; + CalPrivate *priv; + const char *str_ldap_attr; + CORBA_char *str_ldap_attr_copy; + + cal = CAL (bonobo_object_from_servant (servant)); + priv = cal->priv; + + str_ldap_attr = cal_backend_get_ldap_attribute (priv->backend); + if (str_ldap_attr == NULL) { + bonobo_exception_set (ev, ex_GNOME_Evolution_Calendar_Cal_NotFound); + return CORBA_OBJECT_NIL; + } + + str_ldap_attr_copy = CORBA_string_dup (str_ldap_attr); + + return str_ldap_attr_copy; +} /* Cal::getSchedulingInformation method */ static CORBA_char * @@ -817,6 +841,7 @@ cal_class_init (CalClass *klass) epv->isReadOnly = impl_Cal_isReadOnly; epv->getCalAddress = impl_Cal_getCalAddress; epv->getAlarmEmailAddress = impl_Cal_getAlarmEmailAddress; + epv->getLdapAttribute = impl_Cal_getLdapAttribute; epv->getStaticCapabilities = impl_Cal_getStaticCapabilities; epv->setMode = impl_Cal_setMode; epv->countObjects = impl_Cal_countObjects; |