aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-01-22 15:09:39 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-22 15:09:39 +0800
commit101996359f684e0282f1261f92f54d5b10e1ddb3 (patch)
tree94006182b470ca2e6794e04c84613d4aec6d6156 /calendar/pcs/cal-backend.c
parent84423c930ecc93ce93040bfd49e20c68670d4364 (diff)
downloadgsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.tar
gsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.tar.gz
gsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.tar.bz2
gsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.tar.lz
gsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.tar.xz
gsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.tar.zst
gsoc2013-evolution-101996359f684e0282f1261f92f54d5b10e1ddb3.zip
Take in a GnomeVFSURI, not a string.
2000-01-22 Federico Mena Quintero <federico@helixcode.com> * cal-backend.c (cal_backend_load): Take in a GnomeVFSURI, not a string. * cal-listener.c (Listener_cal_loaded): Pass the load status to the signal. (cal_listener_destroy): Better error checking. (cal_listener_new): Better error checking. * cal-listener.h (CalListenerLoadStatus): New enum for the load status of a calendar. (CalListenerClass): Added the status argument to the cal_loaded signal. * gnome-calendar.idl (cal_loaded): Added a load status code. * cal-backend.h (CalBackendLoadStatus): Renamed from CalBackendLoadResult. svn path=/trunk/; revision=1607
Diffstat (limited to 'calendar/pcs/cal-backend.c')
-rw-r--r--calendar/pcs/cal-backend.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c
index 2fb523dc14..0d90e7a2dd 100644
--- a/calendar/pcs/cal-backend.c
+++ b/calendar/pcs/cal-backend.c
@@ -303,41 +303,36 @@ cal_backend_add_cal (CalBackend *backend, Cal *cal)
/**
* cal_backend_load:
* @backend: A calendar backend.
- * @str_uri: URI that contains the calendar data.
+ * @uri: URI that contains the calendar data.
*
* Loads a calendar backend with data from a calendar stored at the specified
* URI.
*
- * Return value: An operation result code.
+ * Return value: An operation status code.
**/
-CalBackendLoadResult
-cal_backend_load (CalBackend *backend, char *str_uri)
+CalBackendLoadStatus
+cal_backend_load (CalBackend *backend, GnomeVFSURI *uri)
{
CalBackendPrivate *priv;
- GnomeVFSURI *uri;
VObject *vobject;
g_return_val_if_fail (backend != NULL, CAL_BACKEND_LOAD_ERROR);
g_return_val_if_fail (IS_CAL_BACKEND (backend), CAL_BACKEND_LOAD_ERROR);
- g_return_val_if_fail (str_uri != NULL, CAL_BACKEND_LOAD_ERROR);
+ g_return_val_if_fail (uri != NULL, CAL_BACKEND_LOAD_ERROR);
priv = backend->priv;
g_return_val_if_fail (!priv->loaded, CAL_BACKEND_LOAD_ERROR);
- uri = gnome_vfs_uri_new (str_uri);
- if (!uri)
- return CAL_BACKEND_LOAD_ERROR;
-
vobject = Parse_MIME_FromURI (uri);
- if (!vobject) {
- gnome_vfs_uri_unref (uri);
+ if (!vobject)
return CAL_BACKEND_LOAD_ERROR;
- }
load_from_vobject (backend, vobject);
cleanVObject (vobject);
cleanStrTbl ();
+ gnome_vfs_uri_ref (uri);
+
priv->uri = uri;
priv->loaded = TRUE;
return CAL_BACKEND_LOAD_SUCCESS;