aboutsummaryrefslogtreecommitdiffstats
path: root/mail/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/session.c')
-rw-r--r--mail/session.c44
1 files changed, 2 insertions, 42 deletions
diff --git a/mail/session.c b/mail/session.c
index b822d3e177..b7b24920b0 100644
--- a/mail/session.c
+++ b/mail/session.c
@@ -11,7 +11,7 @@
#include "mail.h"
#include "e-util/e-setup.h"
-SessionStore *default_session;
+CamelSession *session;
static void
request_callback (gchar *string, gpointer data)
@@ -52,51 +52,11 @@ evolution_auth_callback (char *prompt, gboolean secret,
return ans;
}
-SessionStore *
-session_store_new (const char *uri)
-{
- SessionStore *ss = g_new (SessionStore, 1);
- CamelException ex;
-
- ss->session = camel_session_new (evolution_auth_callback);
- camel_exception_init (&ex);
- ss->store = camel_session_get_store (ss->session, uri, &ex);
-
-
- g_assert (ss->session);
- g_assert (ss->store);
-
- return ss;
-}
-
-void
-session_store_destroy (SessionStore *ss)
-{
- g_assert (ss != NULL);
-
- gtk_object_unref (GTK_OBJECT (ss->store));
- gtk_object_unref (GTK_OBJECT (ss->session));
-
- g_free (ss);
-}
-
-static void
-init_default_session (void)
-{
- char *url;
-
- url = g_strconcat ("mbox://", evolution_folders_dir, NULL);
- default_session = session_store_new (url);
- g_free (url);
-}
-
void
session_init (void)
{
e_setup_base_dir ();
camel_init ();
- init_default_session ();
+ session = camel_session_new (evolution_auth_callback);
}
-
-