aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/common
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/common')
-rw-r--r--calendar/common/authentication.c12
-rw-r--r--calendar/common/authentication.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/calendar/common/authentication.c b/calendar/common/authentication.c
index ba0eae2893..fa2be5323d 100644
--- a/calendar/common/authentication.c
+++ b/calendar/common/authentication.c
@@ -37,6 +37,18 @@ auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_dat
}
ECal *
+auth_new_cal_from_default (ECalSourceType type)
+{
+ ECal *ecal = NULL;
+
+ if (!e_cal_open_default (&ecal, type, auth_func_cb, NULL, NULL))
+ return NULL;
+
+
+ return ecal;
+}
+
+ECal *
auth_new_cal_from_source (ESource *source, ECalSourceType type)
{
ECal *cal;
diff --git a/calendar/common/authentication.h b/calendar/common/authentication.h
index cc022a12dd..2f8af70ace 100644
--- a/calendar/common/authentication.h
+++ b/calendar/common/authentication.h
@@ -27,6 +27,7 @@
#include <libedataserver/e-source.h>
#include <libecal/e-cal.h>
+ECal *auth_new_cal_from_default (ECalSourceType type);
ECal *auth_new_cal_from_source (ESource *source, ECalSourceType type);
ECal *auth_new_cal_from_uri (const char *uri, ECalSourceType type);