diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-10-02 02:03:10 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-10-02 02:03:10 +0800 |
commit | b48599b701d22e5dff77c1d94dd4e0059a922c37 (patch) | |
tree | 94daca16651660838d9fbc4e198312412ef768a0 /calendar/cal-client | |
parent | 14829e0cc4f6ed7e25f60aafb52a1ff17359731c (diff) | |
download | gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar.gz gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar.zst gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.zip |
added isReadOnly method to Cal interface.
2002-10-01 Rodrigo Moya <rodrigo@ximian.com>
* idl/evolution-calendar.idl: added isReadOnly method to Cal
interface.
* pcs/cal.c (impl_Cal_is_read_only): new method implementation.
* pcs/cal-backend.[ch]: added is_read_only method to CalBackend class.
(cal_backend_is_read_only): new function.
* pcs/cal-backend-file.c (cal_backend_file_is_read_only): new method.
(cal_backend_file_class_init): set new signal's virtual method.
* cal-client/cal-client.[ch] (cal_client_is_read_only): new function.
svn path=/trunk/; revision=18282
Diffstat (limited to 'calendar/cal-client')
-rw-r--r-- | calendar/cal-client/cal-client.c | 31 | ||||
-rw-r--r-- | calendar/cal-client/cal-client.h | 2 |
2 files changed, 33 insertions, 0 deletions
diff --git a/calendar/cal-client/cal-client.c b/calendar/cal-client/cal-client.c index 21932ed464..0f270c05bc 100644 --- a/calendar/cal-client/cal-client.c +++ b/calendar/cal-client/cal-client.c @@ -1019,6 +1019,37 @@ cal_client_get_uri (CalClient *client) } /** + * cal_client_is_read_only: + * @client: A calendar client. + * + * Queries whether the calendar client can perform modifications + * on the calendar or not. + * + * Return value: TRUE if the calendar is read-only, FALSE otherwise. + */ +gboolean +cal_client_is_read_only (CalClient *client) +{ + CalClientPrivate *priv; + CORBA_Environment ev; + CORBA_boolean read_only; + + g_return_val_if_fail (client != NULL, NULL); + g_return_val_if_fail (IS_CAL_CLIENT (client), NULL); + + priv = client->priv; + + CORBA_exception_init (&ev); + read_only = GNOME_Evolution_Calendar_Cal_isReadOnly (priv->cal, &ev); + if (BONOBO_EX (&ev)) { + g_message ("cal_client_is_read_only: could not call isReadOnly method"); + } + CORBA_exception_free (&ev); + + return read_only; +} + +/** * cal_client_get_email_address: * @client: A calendar client. * diff --git a/calendar/cal-client/cal-client.h b/calendar/cal-client/cal-client.h index f636bf4896..e7a1649a0c 100644 --- a/calendar/cal-client/cal-client.h +++ b/calendar/cal-client/cal-client.h @@ -143,6 +143,8 @@ CalClientLoadState cal_client_get_load_state (CalClient *client); const char *cal_client_get_uri (CalClient *client); +gboolean cal_client_is_read_only (CalClient *client); + const char *cal_client_get_email_address (CalClient *client); gboolean cal_client_set_mode (CalClient *client, CalMode mode); |