aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-session.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-31 01:09:42 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-31 01:09:42 +0800
commit2bdcfe5c47e9add476eab5d848b30d9d1715c153 (patch)
tree03ea965b34ee45f22bc00a737e9d9af1dd1992f7 /camel/camel-session.c
parente8df3eea83688f5656c076952dfcffb297c08ad1 (diff)
downloadgsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.tar
gsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.tar.gz
gsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.tar.bz2
gsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.tar.lz
gsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.tar.xz
gsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.tar.zst
gsoc2013-evolution-2bdcfe5c47e9add476eab5d848b30d9d1715c153.zip
Make CamelServices connect only when told to (old behavior). Make CamelRemoteStore do its stuff in service::connect, not ::post_connect.
svn path=/trunk/; revision=5116
Diffstat (limited to 'camel/camel-session.c')
-rw-r--r--camel/camel-session.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 3454517216..9992a48aaf 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -253,6 +253,25 @@ camel_session_get_service (CamelSession *session, const char *url_string,
return service;
}
+CamelService *
+camel_session_get_service_connected (CamelSession *session, const char *url_string,
+ CamelProviderType type, CamelException *ex)
+{
+ CamelService *svc;
+
+ svc = camel_session_get_service (session, url_string, type, ex);
+ if (svc == NULL)
+ return NULL;
+
+ if (svc->connected == FALSE) {
+ if (camel_service_connect (svc, ex) == FALSE) {
+ camel_object_unref (CAMEL_OBJECT (svc));
+ return NULL;
+ }
+ }
+
+ return svc;
+}
/**
* camel_session_query_authenticator: query the session authenticator