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/pcs/cal-backend.c | |
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/pcs/cal-backend.c')
-rw-r--r-- | calendar/pcs/cal-backend.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 19f8261797..95bc26b093 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -144,6 +144,7 @@ cal_backend_class_init (CalBackendClass *class) class->get_email_address = NULL; class->open = NULL; class->is_loaded = NULL; + class->is_read_only = NULL; class->get_query = NULL; class->get_mode = NULL; class->set_mode = NULL; @@ -319,6 +320,28 @@ cal_backend_is_loaded (CalBackend *backend) } /** + * cal_backend_is_read_only + * @backend: A calendar backend. + * + * Queries whether a calendar backend is read only or not. + * + * Return value: TRUE if the calendar is read only, FALSE otherwise. + */ +gboolean +cal_backend_is_read_only (CalBackend *backend) +{ + gboolean result; + + g_return_val_if_fail (backend != NULL, FALSE); + g_return_val_if_fail (IS_CAL_BACKEND (backend), FALSE); + + g_assert (CLASS (backend)->is_read_only != NULL); + result = (* CLASS (backend)->is_read_only) (backend); + + return result; +} + +/** * cal_backend_get_query: * @backend: A calendar backend. * @ql: The query listener. |