diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-07-05 05:40:28 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-07-09 02:37:52 +0800 |
commit | 137b0743ddfbd3bbc01c9813615ede91ddd9b954 (patch) | |
tree | 1d8e09ba0239eff419d432bdd8d5b521fbb727ba /mail/importers | |
parent | 36f1f29b9a42c56a619e031b045db5a18f2b1dd7 (diff) | |
download | gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.gz gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.tar.zst gsoc2013-evolution-137b0743ddfbd3bbc01c9813615ede91ddd9b954.zip |
Migrate from CamelException to GError.
Diffstat (limited to 'mail/importers')
-rw-r--r-- | mail/importers/elm-importer.c | 2 | ||||
-rw-r--r-- | mail/importers/evolution-mbox-importer.c | 4 | ||||
-rw-r--r-- | mail/importers/mail-importer.c | 16 | ||||
-rw-r--r-- | mail/importers/mail-importer.h | 2 | ||||
-rw-r--r-- | mail/importers/pine-importer.c | 2 |
5 files changed, 14 insertions, 12 deletions
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c index 937bfa50de..87c94ff524 100644 --- a/mail/importers/elm-importer.c +++ b/mail/importers/elm-importer.c @@ -205,7 +205,7 @@ elm_import_done(struct _elm_import_msg *m) { printf("importing complete\n"); - if (!camel_exception_is_set(&m->base.ex)) { + if (m->base.error == NULL) { GConfClient *gconf; gconf = gconf_client_get_default(); diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index dc419dc89e..8467f2c47f 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -204,7 +204,7 @@ mbox_status_timeout(gpointer data) } static void -mbox_import_done(gpointer data, CamelException *ex) +mbox_import_done(gpointer data, GError **error) { MboxImporter *importer = data; @@ -330,7 +330,7 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) gchar *from; msg = camel_mime_message_new(); - if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp) == -1) { + if (camel_mime_part_construct_from_parser ((CamelMimePart *)msg, mp, NULL) == -1) { g_object_unref (msg); break; } diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c index 35abd8365f..7c497108b1 100644 --- a/mail/importers/mail-importer.c +++ b/mail/importers/mail-importer.c @@ -54,7 +54,7 @@ struct _import_mbox_msg { gchar *uri; CamelOperation *cancel; - void (*done)(gpointer data, CamelException *ex); + void (*done)(gpointer data, GError **error); gpointer done_data; }; @@ -122,7 +122,8 @@ import_mbox_exec (struct _import_mbox_msg *m) if (m->uri == NULL || m->uri[0] == 0) folder = e_mail_local_get_folder (E_MAIL_FOLDER_INBOX); else - folder = mail_tool_uri_to_folder(m->uri, CAMEL_STORE_FOLDER_CREATE, &m->base.ex); + folder = mail_tool_uri_to_folder ( + m->uri, CAMEL_STORE_FOLDER_CREATE, &m->base.error); if (folder == NULL) return; @@ -160,7 +161,7 @@ import_mbox_exec (struct _import_mbox_msg *m) camel_operation_progress(NULL, pc); msg = camel_mime_message_new(); - if (camel_mime_part_construct_from_parser((CamelMimePart *)msg, mp) == -1) { + if (camel_mime_part_construct_from_parser((CamelMimePart *)msg, mp, NULL) == -1) { /* set exception? */ g_object_unref (msg); break; @@ -179,11 +180,12 @@ import_mbox_exec (struct _import_mbox_msg *m) flags |= decode_status(tmp); camel_message_info_set_flags(info, flags, ~0); - camel_folder_append_message(folder, msg, info, NULL, &m->base.ex); + camel_folder_append_message ( + folder, msg, info, NULL, &m->base.error); camel_message_info_free(info); g_object_unref (msg); - if (camel_exception_is_set(&m->base.ex)) + if (m->base.error != NULL) break; camel_mime_parser_step(mp, NULL, NULL); @@ -206,7 +208,7 @@ static void import_mbox_done (struct _import_mbox_msg *m) { if (m->done) - m->done(m->done_data, &m->base.ex); + m->done(m->done_data, &m->base.error); } static void @@ -227,7 +229,7 @@ static MailMsgInfo import_mbox_info = { }; gint -mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, CamelException *), gpointer data) +mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data) { struct _import_mbox_msg *m; gint id; diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h index 15de575f8b..01a69c981d 100644 --- a/mail/importers/mail-importer.h +++ b/mail/importers/mail-importer.h @@ -46,7 +46,7 @@ EImportImporter *pine_importer_peek(void); #define MSG_FLAG_MARKED 0x0004 #define MSG_FLAG_EXPUNGED 0x0008 -gint mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, CamelException *), gpointer data); +gint mail_importer_import_mbox(const gchar *path, const gchar *folderuri, CamelOperation *cancel, void (*done)(gpointer data, GError **), gpointer data); void mail_importer_import_mbox_sync(const gchar *path, const gchar *folderuri, CamelOperation *cancel); struct _MailImporterSpecial { diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index e6cc75e63c..354d53d377 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -247,7 +247,7 @@ pine_import_done (struct _pine_import_msg *m) { printf("importing complete\n"); - if (!camel_exception_is_set(&m->base.ex)) { + if (m->base.error == NULL) { GConfClient *gconf; gconf = gconf_client_get_default(); |