[evolution-data-server] Remove CamelFolderSummaryClass.message_info_migrate().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove CamelFolderSummaryClass.message_info_migrate().
- Date: Sun, 13 Nov 2011 06:04:57 +0000 (UTC)
commit 4754f304cb09da533ffb26931c465329670c3c6d
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Nov 12 22:27:55 2011 -0500
Remove CamelFolderSummaryClass.message_info_migrate().
No longer needed.
camel/camel-folder-summary.c | 83 -------------------------
camel/camel-folder-summary.h | 1 -
camel/providers/imap/camel-imap-summary.c | 23 -------
camel/providers/imapx/camel-imapx-summary.c | 27 --------
camel/providers/local/camel-maildir-summary.c | 24 -------
camel/providers/local/camel-mbox-summary.c | 27 --------
6 files changed, 0 insertions(+), 185 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index a8ef3b6..4bfe98c 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -135,7 +135,6 @@ static gint summary_header_save (CamelFolderSummary *, FILE *);
static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
static CamelMessageInfo * message_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
static CamelMessageInfo * message_info_new_from_message (CamelFolderSummary *summary, CamelMimeMessage *msg, const gchar *bodystructure);
-static CamelMessageInfo * message_info_migrate (CamelFolderSummary *, FILE *);
static void message_info_free (CamelFolderSummary *, CamelMessageInfo *);
static CamelMessageContentInfo * content_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
@@ -1156,7 +1155,6 @@ camel_folder_summary_class_init (CamelFolderSummaryClass *class)
class->message_info_new_from_header = message_info_new_from_header;
class->message_info_new_from_parser = message_info_new_from_parser;
class->message_info_new_from_message = message_info_new_from_message;
- class->message_info_migrate = message_info_migrate;
class->message_info_free = message_info_free;
class->message_info_clone = message_info_clone;
class->message_info_from_uid = message_info_from_uid;
@@ -3787,87 +3785,6 @@ message_info_new_from_header (CamelFolderSummary *summary,
return (CamelMessageInfo *) mi;
}
-static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *summary,
- FILE *in)
-{
- CamelMessageInfoBase *mi;
- guint32 count;
- gint i;
- gchar *subject, *from, *to, *cc, *mlist, *uid;
-
- mi = (CamelMessageInfoBase *) camel_message_info_new (summary);
-
- io(printf("Loading message info\n"));
-
- camel_file_util_decode_string (in, &uid);
- camel_file_util_decode_uint32 (in, (guint32 *) &mi->flags);
- camel_file_util_decode_uint32 (in, &mi->size);
- camel_file_util_decode_time_t (in, &mi->date_sent);
- camel_file_util_decode_time_t (in, &mi->date_received);
- camel_file_util_decode_string (in, &subject);
- camel_file_util_decode_string (in, &from);
- camel_file_util_decode_string (in, &to);
- camel_file_util_decode_string (in, &cc);
- camel_file_util_decode_string (in, &mlist);
-
- mi->uid = camel_pstring_add (uid, TRUE);
- mi->subject = camel_pstring_add (subject, TRUE);
- mi->from = camel_pstring_add (from, TRUE);
- mi->to = camel_pstring_add (to, TRUE);
- mi->cc = camel_pstring_add (cc, TRUE);
- mi->mlist = camel_pstring_add (mlist, TRUE);
-
- mi->content = NULL;
-
- camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->message_id.id.part.hi);
- camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->message_id.id.part.lo);
-
- if (camel_file_util_decode_uint32 (in, &count) == -1)
- goto error;
-
- if (count > 0) {
- mi->references = g_malloc (sizeof (*mi->references) + ((count - 1) * sizeof (mi->references->references[0])));
- mi->references->size = count;
- for (i = 0; i < count; i++) {
- camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->references->references[i].id.part.hi);
- camel_file_util_decode_fixed_int32 (in, (gint32 *) &mi->references->references[i].id.part.lo);
- }
- }
-
- if (camel_file_util_decode_uint32 (in, &count) == -1)
- goto error;
-
- for (i = 0; i < count; i++) {
- gchar *name;
- if (camel_file_util_decode_string (in, &name) == -1 || name == NULL)
- goto error;
- camel_flag_set (&mi->user_flags, name, TRUE);
- g_free (name);
- }
-
- if (camel_file_util_decode_uint32 (in, &count) == -1)
- goto error;
-
- for (i = 0; i < count; i++) {
- gchar *name, *value;
- if (camel_file_util_decode_string (in, &name) == -1 || name == NULL
- || camel_file_util_decode_string (in, &value) == -1)
- goto error;
- camel_tag_set (&mi->user_tags, name, value);
- g_free (name);
- g_free (value);
- }
-
- if (!ferror (in))
- return (CamelMessageInfo *) mi;
-
-error:
- camel_message_info_free ((CamelMessageInfo *) mi);
-
- return NULL;
-}
-
static void
message_info_free (CamelFolderSummary *summary,
CamelMessageInfo *info)
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index b6eb2c9..5f39b0a 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -273,7 +273,6 @@ struct _CamelFolderSummaryClass {
CamelMessageInfo * (*message_info_new_from_header)(CamelFolderSummary *, struct _camel_header_raw *);
CamelMessageInfo * (*message_info_new_from_parser)(CamelFolderSummary *, CamelMimeParser *);
CamelMessageInfo * (*message_info_new_from_message)(CamelFolderSummary *, CamelMimeMessage *, const gchar *);
- CamelMessageInfo * (*message_info_migrate)(CamelFolderSummary *, FILE *);
void (*message_info_free)(CamelFolderSummary *, CamelMessageInfo *);
CamelMessageInfo * (*message_info_clone)(CamelFolderSummary *, const CamelMessageInfo *);
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
index fc32104..b96771f 100644
--- a/camel/providers/imap/camel-imap-summary.c
+++ b/camel/providers/imap/camel-imap-summary.c
@@ -39,7 +39,6 @@
static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
-static CamelMessageInfo *message_info_migrate (CamelFolderSummary *s, FILE *in);
static gboolean info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state);
static CamelMessageContentInfo *content_info_migrate (CamelFolderSummary *s, FILE *in);
@@ -79,7 +78,6 @@ camel_imap_summary_class_init (CamelImapSummaryClass *class)
folder_summary_class->message_info_clone = imap_message_info_clone;
folder_summary_class->summary_header_load = summary_header_load;
folder_summary_class->summary_header_save = summary_header_save;
- folder_summary_class->message_info_migrate = message_info_migrate;
folder_summary_class->content_info_migrate = content_info_migrate;
folder_summary_class->summary_header_to_db = summary_header_to_db;
folder_summary_class->summary_header_from_db = summary_header_from_db;
@@ -274,27 +272,6 @@ message_info_from_db (CamelFolderSummary *s,
return info;
}
-static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s,
- FILE *in)
-{
- CamelMessageInfo *info;
- CamelImapMessageInfo *iinfo;
-
- info = CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->message_info_migrate (s, in);
- if (info) {
- iinfo = (CamelImapMessageInfo *) info;
-
- if (camel_file_util_decode_uint32 (in, &iinfo->server_flags) == -1)
- goto error;
- }
-
- return info;
-error:
- camel_message_info_free (info);
- return NULL;
-}
-
static CamelMIRecord *
message_info_to_db (CamelFolderSummary *s,
CamelMessageInfo *info)
diff --git a/camel/providers/imapx/camel-imapx-summary.c b/camel/providers/imapx/camel-imapx-summary.c
index 874cd45..973aafd 100644
--- a/camel/providers/imapx/camel-imapx-summary.c
+++ b/camel/providers/imapx/camel-imapx-summary.c
@@ -38,7 +38,6 @@
static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
-static CamelMessageInfo *message_info_migrate (CamelFolderSummary *s, FILE *in);
static gboolean info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state);
static CamelMessageContentInfo *content_info_migrate (CamelFolderSummary *s, FILE *in);
@@ -83,7 +82,6 @@ camel_imapx_summary_class_init (CamelIMAPXSummaryClass *class)
folder_summary_class->message_info_clone = imapx_message_info_clone;
folder_summary_class->summary_header_load = summary_header_load;
folder_summary_class->summary_header_save = summary_header_save;
- folder_summary_class->message_info_migrate = message_info_migrate;
folder_summary_class->content_info_migrate = content_info_migrate;
folder_summary_class->summary_header_to_db = summary_header_to_db;
folder_summary_class->summary_header_from_db = summary_header_from_db;
@@ -304,31 +302,6 @@ message_info_from_db (CamelFolderSummary *s,
return info;
}
-static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s,
- FILE *in)
-{
- CamelMessageInfo *info;
- CamelIMAPXMessageInfo *iinfo;
- CamelFolderSummaryClass *folder_summary_class;
-
- folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (
- camel_imapx_summary_parent_class);
-
- info = folder_summary_class->message_info_migrate (s, in);
- if (info) {
- iinfo = (CamelIMAPXMessageInfo *) info;
-
- if (camel_file_util_decode_uint32 (in, &iinfo->server_flags) == -1)
- goto error;
- }
-
- return info;
-error:
- camel_message_info_free (info);
- return NULL;
-}
-
static CamelMIRecord *
message_info_to_db (CamelFolderSummary *s,
CamelMessageInfo *info)
diff --git a/camel/providers/local/camel-maildir-summary.c b/camel/providers/local/camel-maildir-summary.c
index e673df6..723db89 100644
--- a/camel/providers/local/camel-maildir-summary.c
+++ b/camel/providers/local/camel-maildir-summary.c
@@ -46,7 +46,6 @@
#define CAMEL_MAILDIR_SUMMARY_VERSION (0x2000)
-static CamelMessageInfo *message_info_migrate (CamelFolderSummary *s, FILE *in);
static CamelMessageInfo *message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
static void message_info_free (CamelFolderSummary *, CamelMessageInfo *mi);
@@ -98,7 +97,6 @@ camel_maildir_summary_class_init (CamelMaildirSummaryClass *class)
folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (class);
folder_summary_class->message_info_size = sizeof (CamelMaildirMessageInfo);
folder_summary_class->content_info_size = sizeof (CamelMaildirMessageContentInfo);
- folder_summary_class->message_info_migrate = message_info_migrate;
folder_summary_class->message_info_new_from_header = message_info_new_from_header;
folder_summary_class->message_info_free = message_info_free;
folder_summary_class->next_uid_string = maildir_summary_next_uid_string;
@@ -390,28 +388,6 @@ static gchar *maildir_summary_next_uid_string (CamelFolderSummary *s)
}
}
-static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s,
- FILE *in)
-{
- CamelMessageInfo *mi;
- CamelMaildirSummary *mds = (CamelMaildirSummary *) s;
-
- mi = ((CamelFolderSummaryClass *) camel_maildir_summary_parent_class)->message_info_migrate (s, in);
- if (mi) {
- gchar *name;
-
- if (mds->priv->load_map
- && (name = g_hash_table_lookup (mds->priv->load_map, camel_message_info_uid (mi)))) {
- d(printf("Setting filename of %s to %s\n", camel_message_info_uid(mi), name));
- camel_maildir_info_set_filename (mi, g_strdup (name));
- camel_maildir_summary_name_to_info ((CamelMaildirMessageInfo *) mi, name);
- }
- }
-
- return mi;
-}
-
static gint
maildir_summary_load (CamelLocalSummary *cls,
gint forceindex,
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index dca35d5..ad28c14 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -53,7 +53,6 @@ static gint summary_header_save (CamelFolderSummary *, FILE *);
static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
static CamelMessageInfo * message_info_new_from_parser (CamelFolderSummary *, CamelMimeParser *);
-static CamelMessageInfo * message_info_migrate (CamelFolderSummary *, FILE *);
/*static void message_info_free (CamelFolderSummary *, CamelMessageInfo *);*/
static gchar *mbox_summary_encode_x_evolution (CamelLocalSummary *cls, const CamelLocalMessageInfo *mi);
@@ -141,7 +140,6 @@ camel_mbox_summary_class_init (CamelMboxSummaryClass *class)
folder_summary_class->message_info_to_db = message_info_to_db;
folder_summary_class->message_info_new_from_header = message_info_new_from_header;
folder_summary_class->message_info_new_from_parser = message_info_new_from_parser;
- folder_summary_class->message_info_migrate = message_info_migrate;
folder_summary_class->info_set_user_flag = mbox_info_set_user_flag;
folder_summary_class->info_set_user_tag = mbox_info_set_user_tag;
#ifdef STATUS_PINE
@@ -419,31 +417,6 @@ message_info_from_db (CamelFolderSummary *s,
return mi;
}
-static CamelMessageInfo *
-message_info_migrate (CamelFolderSummary *s,
- FILE *in)
-{
- CamelMessageInfo *mi;
-
- io(printf("loading mbox message info\n"));
-
- mi = CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->message_info_migrate (s, in);
- if (mi) {
- off_t ot = -1;
- CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *) mi;
-
- if (camel_file_util_decode_off_t (in, &ot) == -1)
- goto error;
-
- mbi->frompos = (goffset) ot;
- }
-
- return mi;
-error:
- camel_message_info_free (mi);
- return NULL;
-}
-
static struct _CamelMIRecord *
message_info_to_db (CamelFolderSummary *s,
CamelMessageInfo *info)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]