diff options
author | JP Rosevear <jpr@ximian.com> | 2001-09-26 00:35:40 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2001-09-26 00:35:40 +0800 |
commit | ce71400f35232aa9122fceb3436dfc56b8b206e8 (patch) | |
tree | 67fae3fc60b7549edad8d2ccf6965cb7a622fead /calendar/pcs/cal-backend.c | |
parent | 240af05417b2f326140a2ac8fe4043f457b00976 (diff) | |
download | gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.tar gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.tar.gz gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.tar.bz2 gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.tar.lz gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.tar.xz gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.tar.zst gsoc2013-evolution-ce71400f35232aa9122fceb3436dfc56b8b206e8.zip |
use bonobo-exception stuff to clean code
2001-09-25 JP Rosevear <jpr@ximian.com>
* pcs/cal.c: use bonobo-exception stuff to clean code
* pcs/cal-factory.c (add_uri): add uri to the list if the type
matches
(impl_CalFactory_uriList): implement uriList method
* pcs/cal-backend.h: new virtual function member
* pcs/cal-backend.c (cal_backend_is_remote): call virtual function
* pcs/cal-backend-file.c (cal_backend_file_class_init): override
virtual function
(cal_backend_file_is_remote): new virtual function, always return
FALSE
* idl/evolution-calendar.idl: uriList factory call, with flags for
types to get
* gui/dialogs/comp-editor.c (comp_editor_destroy): cast to remove
warning
* gui/e-itip-control.c (write_label_piece): kill warnings by take
const char *
* gui/component-factory.c (create_object): aggregate offline
interface
* gui/Makefile.am: compile new files
* calobj.[hc]: Remove obsolete files
* cal-util/cal-util.h: enum URI types for uriList call
* cal-client/cal-client.c (build_uri_list): build list from string
sequence
(cal_client_uri_list): factory call to get uri list
* cal-client/cal-client.h: new proto
* cal-client/cal-client.c: use bonobo exception stuff to clean
code
* gui/calendar-offline-handler.[hc]: Start some skeleton routines
for online/offline handling
* pcs/cal-factory.c (launch_backend_for_uri): use accessor and
remove FIXME
svn path=/trunk/; revision=13110
Diffstat (limited to 'calendar/pcs/cal-backend.c')
-rw-r--r-- | calendar/pcs/cal-backend.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index 20f3a74ee1..296af0e8a3 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_uri = NULL; class->open = NULL; class->is_loaded = NULL; + class->is_remote = NULL; class->get_n_objects = NULL; class->get_object = NULL; class->get_object_component = NULL; @@ -278,7 +279,8 @@ cal_backend_open (CalBackend *backend, GnomeVFSURI *uri, gboolean only_if_exists * * Queries whether a calendar backend has been loaded yet. * - * Return value: TRUE if the backend has been loaded with data, FALSE otherwise. + * Return value: TRUE if the backend has been loaded with data, FALSE + * otherwise. **/ gboolean cal_backend_is_loaded (CalBackend *backend) @@ -295,6 +297,29 @@ cal_backend_is_loaded (CalBackend *backend) } /** + * cal_backend_is_remote: + * @backend: A calendar backend. + * + * Queries whether a calendar backend is connected remotely. + * + * Return value: TRUE if the backend is connected remotely, FALSE + * otherwise. + **/ +gboolean +cal_backend_is_remote (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_remote != NULL); + result = (* CLASS (backend)->is_remote) (backend); + + return result; +} + +/** * cal_backend_get_n_objects: * @backend: A calendar backend. * @type: Types of objects that will be included in the count. |