update proto
authorJP Rosevear <jpr@ximian.com>
Wed, 4 Feb 2004 21:31:37 +0000 (21:31 +0000)
committerJP Rosevear <jpr@src.gnome.org>
Wed, 4 Feb 2004 21:31:37 +0000 (21:31 +0000)
2004-02-04  JP Rosevear <jpr@ximian.com>

* libecal/e-cal.h: update proto

* libecal/e-cal.c (async_idle_cb): return FALSE to remove the idle
handler
(get_default): take an auth func and use it
(e_cal_open_default): ditto

calendar/ChangeLog
calendar/libecal/e-cal.c
calendar/libecal/e-cal.h

index 9133c89..f0878af 100644 (file)
@@ -1,5 +1,14 @@
 2004-02-04  JP Rosevear <jpr@ximian.com>
 
+       * libecal/e-cal.h: update proto
+
+       * libecal/e-cal.c (async_idle_cb): return FALSE to remove the idle
+       handler
+       (get_default): take an auth func and use it 
+       (e_cal_open_default): ditto
+
+2004-02-04  JP Rosevear <jpr@ximian.com>
+
        * libecal/e-cal.h: redo protos
 
        * libecal/e-cal.c (e_cal_open_default): open the default ecal
index 2191840..0a1b2ad 100644 (file)
@@ -1565,6 +1565,8 @@ async_idle_cb (gpointer data)
        /* free memory */
        g_object_unref (ccad->ecal);
        g_free (ccad);
+
+       return FALSE;
 }
 
 static gpointer
@@ -3958,7 +3960,7 @@ e_cal_get_error_message (ECalendarStatus status)
 }
 
 static gboolean
-get_default (ECal **ecal, ESourceList *sources, ECalSourceType type, GError **error)
+get_default (ECal **ecal, ESourceList *sources, ECalSourceType type, ECalAuthFunc func, gpointer data, GError **error)
 {
        GSList *g;
        GError *err = NULL;
@@ -3989,6 +3991,7 @@ get_default (ECal **ecal, ESourceList *sources, ECalSourceType type, GError **er
                        goto done;
                }
 
+               e_cal_set_auth_func (*ecal, func, data);
                if (!e_cal_open (*ecal, TRUE, &err)) {
                        g_propagate_error (error, err);
                        rv = FALSE;
@@ -4012,6 +4015,7 @@ get_default (ECal **ecal, ESourceList *sources, ECalSourceType type, GError **er
                        goto done;
                }
 
+               e_cal_set_auth_func (*ecal, func, data);
                if (!e_cal_open (*ecal, TRUE, &err)) {
                        g_propagate_error (error, err);
                        rv = FALSE;
@@ -4030,7 +4034,7 @@ get_default (ECal **ecal, ESourceList *sources, ECalSourceType type, GError **er
 }
 
 gboolean
-e_cal_open_default (ECal **ecal, ECalSourceType type, GError **error)
+e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointer data, GError **error)
 {
        ESourceList *sources;
        GError *err = NULL;
@@ -4040,7 +4044,7 @@ e_cal_open_default (ECal **ecal, ECalSourceType type, GError **error)
                return FALSE;
        }
 
-       return get_default (ecal, sources, type, error);
+       return get_default (ecal, sources, type, func, data, error);
 }
 
 gboolean
index 77a3187..1d90d33 100644 (file)
@@ -190,8 +190,7 @@ char* e_cal_get_component_as_string (ECal *ecal, icalcomponent *icalcomp);
 const char * e_cal_get_error_message (ECalendarStatus status);
 
 /* Calendar/Tasks Discovery */
-gboolean    e_cal_open_default (ECal **ecal, ECalSourceType type, GError **error);
-
+gboolean    e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointer data, GError **error);
 gboolean    e_cal_set_default (ECal  *ecal, GError **error);
 gboolean    e_cal_set_default_source (ESource *source, ECalSourceType type, GError **error);
 gboolean    e_cal_get_sources (ESourceList **sources, ECalSourceType type, GError **error);