aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers/mail-importer.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-29 21:32:50 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-29 21:33:36 +0800
commite41b4083a60c2a8c4879ea3a7fc2e1d29a01720b (patch)
tree86234111f2facee6e45c4247b33d0f9050ad706c /mail/importers/mail-importer.c
parent6ec1118c92dcdf1f8377efde3ea575b5bc94412a (diff)
downloadgsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.tar
gsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.tar.gz
gsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.tar.bz2
gsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.tar.lz
gsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.tar.xz
gsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.tar.zst
gsoc2013-evolution-e41b4083a60c2a8c4879ea3a7fc2e1d29a01720b.zip
camel_operation_new() now returns a GCancellable pointer.
Diffstat (limited to 'mail/importers/mail-importer.c')
-rw-r--r--mail/importers/mail-importer.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index b70b6b0c0c..08d0141f84 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -52,7 +52,7 @@ struct _import_mbox_msg {
gchar *path;
gchar *uri;
- CamelOperation *cancel;
+ GCancellable *cancellable;
void (*done)(gpointer data, GError **error);
gpointer done_data;
@@ -212,8 +212,8 @@ import_mbox_done (struct _import_mbox_msg *m)
static void
import_mbox_free (struct _import_mbox_msg *m)
{
- if (m->cancel)
- g_object_unref (m->cancel);
+ if (m->cancellable)
+ g_object_unref (m->cancellable);
g_free (m->uri);
g_free (m->path);
}
@@ -227,7 +227,7 @@ static MailMsgInfo import_mbox_info = {
};
gint
-mail_importer_import_mbox (const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data)
+mail_importer_import_mbox (const gchar *path, const gchar *folderuri, GCancellable *cancellable, void (*done)(gpointer data, GError **), gpointer data)
{
struct _import_mbox_msg *m;
gint id;
@@ -237,8 +237,8 @@ mail_importer_import_mbox (const gchar *path, const gchar *folderuri, CamelOpera
m->uri = g_strdup (folderuri);
m->done = done;
m->done_data = data;
- if (cancel)
- m->cancel = g_object_ref (cancel);
+ if (cancellable)
+ m->cancellable = g_object_ref (cancellable);
id = m->base.seq;
mail_msg_fast_ordered_push (m);
@@ -247,15 +247,15 @@ mail_importer_import_mbox (const gchar *path, const gchar *folderuri, CamelOpera
}
void
-mail_importer_import_mbox_sync (const gchar *path, const gchar *folderuri, CamelOperation *cancel)
+mail_importer_import_mbox_sync (const gchar *path, const gchar *folderuri, GCancellable *cancellable)
{
struct _import_mbox_msg *m;
m = mail_msg_new (&import_mbox_info);
m->path = g_strdup (path);
m->uri = g_strdup (folderuri);
- if (cancel)
- m->cancel = g_object_ref (cancel);
+ if (cancellable)
+ m->cancellable = g_object_ref (cancellable);
import_mbox_exec (m);
import_mbox_done (m);
@@ -264,7 +264,7 @@ mail_importer_import_mbox_sync (const gchar *path, const gchar *folderuri, Camel
struct _import_folders_data {
MailImporterSpecial *special_folders;
- CamelOperation *cancel;
+ GCancellable *cancellable;
guint elmfmt:1;
};
@@ -319,7 +319,7 @@ import_folders_rec (struct _import_folders_data *m, const gchar *filepath, const
}
printf("importing to uri %s\n", uri);
- mail_importer_import_mbox_sync (filefull, uri, m->cancel);
+ mail_importer_import_mbox_sync (filefull, uri, m->cancellable);
g_free (uri);
/* This little gem re-uses the stat buffer and filefull to automagically scan mozilla-format folders */
@@ -363,13 +363,13 @@ import_folders_rec (struct _import_folders_data *m, const gchar *filepath, const
* standard unix directories.
**/
void
-mail_importer_import_folders_sync (const gchar *filepath, MailImporterSpecial special_folders[], gint flags, CamelOperation *cancel)
+mail_importer_import_folders_sync (const gchar *filepath, MailImporterSpecial special_folders[], gint flags, GCancellable *cancellable)
{
struct _import_folders_data m;
m.special_folders = special_folders;
m.elmfmt = (flags & MAIL_IMPORTER_MOZFMT) == 0;
- m.cancel = cancel;
+ m.cancellable = cancellable;
import_folders_rec (&m, filepath, NULL);
}