aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-client/cal-client.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2002-10-02 02:03:10 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2002-10-02 02:03:10 +0800
commitb48599b701d22e5dff77c1d94dd4e0059a922c37 (patch)
tree94daca16651660838d9fbc4e198312412ef768a0 /calendar/cal-client/cal-client.c
parent14829e0cc4f6ed7e25f60aafb52a1ff17359731c (diff)
downloadgsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar
gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar.gz
gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar.bz2
gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar.lz
gsoc2013-evolution-b48599b701d22e5dff77c1d94dd4e0059a922c37.tar.xz
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/cal-client.c')
-rw-r--r--calendar/cal-client/cal-client.c31
1 files changed, 31 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.
*