aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-session.c')
-rw-r--r--mail/mail-session.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 643f60fc42..bf8d5560c3 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -131,8 +131,8 @@ make_key (CamelService *service, const char *item)
}
static char *
-get_password (CamelSession *session, const char *prompt, gboolean secret,
- CamelService *service, const char *item, CamelException *ex)
+main_get_password (CamelSession *session, const char *prompt, gboolean secret,
+ CamelService *service, const char *item, CamelException *ex)
{
MailSession *mail_session = MAIL_SESSION (session);
gboolean cache = TRUE;
@@ -173,9 +173,16 @@ get_password (CamelSession *session, const char *prompt, gboolean secret,
return ans;
}
+static char *
+get_password (CamelSession *session, const char *prompt, gboolean secret,
+ CamelService *service, const char *item, CamelException *ex)
+{
+ return (char *)mail_call_main(MAIL_CALL_p_ppippp, (MailMainFunc)main_get_password,
+ session, prompt, secret, service, item, ex);
+}
+
static void
-forget_password (CamelSession *session, CamelService *service,
- const char *item, CamelException *ex)
+main_forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
{
char *key = make_key (service, item);
@@ -184,6 +191,13 @@ forget_password (CamelSession *session, CamelService *service,
g_free (key);
}
+static void
+forget_password (CamelSession *session, CamelService *service, const char *item, CamelException *ex)
+{
+ mail_call_main(MAIL_CALL_p_pppp, (MailMainFunc)main_forget_password,
+ session, service, item, ex);
+}
+
static gboolean
alert_user (CamelSession *session, CamelSessionAlertType type,
const char *prompt, gboolean cancel)
@@ -317,7 +331,7 @@ get_folder (CamelFilterDriver *d, const char *uri, void *data, CamelException *e
}
static CamelFilterDriver *
-get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+main_get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
{
CamelFilterDriver *driver;
RuleContext *fc;
@@ -369,6 +383,13 @@ get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
return driver;
}
+static CamelFilterDriver *
+get_filter_driver (CamelSession *session, const char *type, CamelException *ex)
+{
+ return (CamelFilterDriver *)mail_call_main(MAIL_CALL_p_ppp, (MailMainFunc)main_get_filter_driver,
+ session, type, ex);
+}
+
char *
mail_session_get_password (const char *url_string)
{