diff options
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 9f3d2dad28..0678370b49 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1986,84 +1986,6 @@ mail_execute_shell_command (CamelFilterDriver *driver, gint argc, gchar **argv, g_spawn_async (NULL, argv, NULL, 0, NULL, data, NULL, NULL); } -/* Async service-checking/authtype-lookup code. */ -struct _check_msg { - MailMsg base; - - EMailSession *session; - gchar *service_uid; - GList *authtypes; - - void (*done)(GList *types, gpointer data); - gpointer data; -}; - -static gchar * -check_service_desc (struct _check_msg *m) -{ - return g_strdup(_("Checking Service")); -} - -static void -check_service_exec (struct _check_msg *m, - GCancellable *cancellable, - GError **error) -{ - CamelService *service; - - service = camel_session_get_service ( - CAMEL_SESSION (m->session), m->service_uid); - if (!service) - return; - - m->authtypes = camel_service_query_auth_types_sync ( - service, cancellable, error); -} - -static void -check_service_done (struct _check_msg *m) -{ - if (m->done) - m->done (m->authtypes, m->data); -} - -static void -check_service_free (struct _check_msg *m) -{ - g_object_unref (m->session); - g_free (m->service_uid); - g_list_free (m->authtypes); -} - -static MailMsgInfo check_service_info = { - sizeof (struct _check_msg), - (MailMsgDescFunc) check_service_desc, - (MailMsgExecFunc) check_service_exec, - (MailMsgDoneFunc) check_service_done, - (MailMsgFreeFunc) check_service_free -}; - -gint -mail_check_service (EMailSession *session, - const gchar *service_uid, - void (*done)(GList *authtypes, gpointer data), - gpointer data) -{ - struct _check_msg *m; - gint id; - - m = mail_msg_new (&check_service_info); - m->session = g_object_ref (session); - m->service_uid = g_strdup (service_uid); - m->done = done; - m->data = data; - - id = m->base.seq; - mail_msg_unordered_push (m); - - return id; -} - /* ---------------------------------------------------------------------------------- */ struct _disconnect_msg { |