[evolution-data-server] Remove CamelFolderSummaryClass.summary_header_load().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove CamelFolderSummaryClass.summary_header_load().
- Date: Sun, 13 Nov 2011 06:05:07 +0000 (UTC)
commit a6d37485160116e8b0c0fdd8e07783e78ed9b094
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Nov 12 22:41:56 2011 -0500
Remove CamelFolderSummaryClass.summary_header_load().
No longer needed.
camel/camel-folder-summary.c | 48 ------------------------
camel/camel-folder-summary.h | 1 -
camel/providers/imap/camel-imap-summary.c | 39 --------------------
camel/providers/imapx/camel-imapx-summary.c | 52 ---------------------------
camel/providers/local/camel-local-summary.c | 21 -----------
camel/providers/local/camel-mbox-summary.c | 23 ------------
camel/providers/nntp/camel-nntp-summary.c | 33 -----------------
7 files changed, 0 insertions(+), 217 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 8afa7e9..623593a 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -129,7 +129,6 @@ static void cfs_schedule_info_release_timer (CamelFolderSummary *summary);
static struct _node *my_list_append (struct _node **list, struct _node *n);
static gint my_list_size (struct _node **list);
-static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
@@ -1141,7 +1140,6 @@ camel_folder_summary_class_init (CamelFolderSummaryClass *class)
class->message_info_size = sizeof (CamelMessageInfoBase);
class->content_info_size = sizeof (CamelMessageContentInfo);
- class->summary_header_load = summary_header_load;
class->summary_header_save = summary_header_save;
class->summary_header_from_db = summary_header_from_db;
@@ -3488,52 +3486,6 @@ my_list_size (struct _node **list)
return len;
}
-static gint
-summary_header_load (CamelFolderSummary *summary,
- FILE *in)
-{
- if (!summary->priv->summary_path)
- return -1;
-
- fseek (in, 0, SEEK_SET);
-
- io(printf("Loading header\n"));
-
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->version) == -1)
- return -1;
-
- /* Legacy version check, before version 12 we have no upgrade knowledge */
- if ((summary->version > 0xff) && (summary->version & 0xff) < 12) {
- io(printf ("Summary header version mismatch"));
- errno = EINVAL;
- return -1;
- }
-
- if (!(summary->version < 0x100 && summary->version >= 13)) {
- io(printf("Loading legacy summary\n"));
- } else {
- io(printf("loading new-format summary\n"));
- }
-
- /* legacy version */
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->flags) == -1
- || camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->priv->nextuid) == -1
- || camel_file_util_decode_time_t (in, &summary->time) == -1
- || camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->priv->saved_count) == -1) {
- return -1;
- }
-
- /* version 13 */
- if (summary->version < 0x100 && summary->version >= 13
- && (camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->priv->unread_count) == -1
- || camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->priv->deleted_count) == -1
- || camel_file_util_decode_fixed_int32 (in, (gint32 *) &summary->priv->junk_count) == -1)) {
- return -1;
- }
-
- return 0;
-}
-
/* are these even useful for anything??? */
static CamelMessageInfo *
message_info_new_from_parser (CamelFolderSummary *summary,
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 88fdfb1..8877126 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -258,7 +258,6 @@ struct _CamelFolderSummaryClass {
gsize content_info_size;
/* load/save the global info */
- gint (*summary_header_load)(CamelFolderSummary *, FILE *);
gint (*summary_header_save)(CamelFolderSummary *, FILE *);
/* Load/Save folder summary from DB*/
diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c
index d0a54c4..6ea0de5 100644
--- a/camel/providers/imap/camel-imap-summary.c
+++ b/camel/providers/imap/camel-imap-summary.c
@@ -36,7 +36,6 @@
#define CAMEL_IMAP_SUMMARY_VERSION (3)
-static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
static gboolean info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state);
@@ -75,7 +74,6 @@ camel_imap_summary_class_init (CamelImapSummaryClass *class)
folder_summary_class->message_info_size = sizeof (CamelImapMessageInfo);
folder_summary_class->content_info_size = sizeof (CamelImapMessageContentInfo);
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->summary_header_to_db = summary_header_to_db;
folder_summary_class->summary_header_from_db = summary_header_from_db;
@@ -186,43 +184,6 @@ summary_header_from_db (CamelFolderSummary *s,
return TRUE;
}
-static gint
-summary_header_load (CamelFolderSummary *s,
- FILE *in)
-{
- CamelImapSummary *ims = CAMEL_IMAP_SUMMARY (s);
-
- if (CAMEL_FOLDER_SUMMARY_CLASS (camel_imap_summary_parent_class)->summary_header_load (s, in) == -1)
- return -1;
-
- /* Legacy version */
- if (s->version == 0x30c)
- return camel_file_util_decode_uint32 (in, &ims->validity);
-
- /* Version 1 */
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &ims->version) == -1)
- return -1;
-
- if (ims->version == 2) {
- /* Version 2: for compat with version 2 of the imap4 summary files */
- gint have_mlist;
-
- if (camel_file_util_decode_fixed_int32 (in, &have_mlist) == -1)
- return -1;
- }
-
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &ims->validity) == -1)
- return -1;
-
- if (ims->version > CAMEL_IMAP_SUMMARY_VERSION) {
- g_warning("Unkown summary version\n");
- errno = EINVAL;
- return -1;
- }
-
- return 0;
-}
-
static CamelFIRecord *
summary_header_to_db (CamelFolderSummary *s,
GError **error)
diff --git a/camel/providers/imapx/camel-imapx-summary.c b/camel/providers/imapx/camel-imapx-summary.c
index de09449..c6e98d7 100644
--- a/camel/providers/imapx/camel-imapx-summary.c
+++ b/camel/providers/imapx/camel-imapx-summary.c
@@ -35,7 +35,6 @@
#define CAMEL_IMAPX_SUMMARY_VERSION (4)
-static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
static gboolean info_set_user_flag (CamelMessageInfo *info, const gchar *id, gboolean state);
@@ -79,7 +78,6 @@ camel_imapx_summary_class_init (CamelIMAPXSummaryClass *class)
folder_summary_class->message_info_size = sizeof (CamelIMAPXMessageInfo);
folder_summary_class->content_info_size = sizeof (CamelIMAPXMessageContentInfo);
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->summary_header_to_db = summary_header_to_db;
folder_summary_class->summary_header_from_db = summary_header_from_db;
@@ -200,56 +198,6 @@ summary_header_from_db (CamelFolderSummary *s,
return TRUE;
}
-static gint
-summary_header_load (CamelFolderSummary *s,
- FILE *in)
-{
- CamelIMAPXSummary *ims = CAMEL_IMAPX_SUMMARY (s);
- CamelFolderSummaryClass *folder_summary_class;
- guint32 validity;
- gint ret;
-
- folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (
- camel_imapx_summary_parent_class);
-
- if (folder_summary_class->summary_header_load (s, in) == -1)
- return -1;
-
- /* Legacy version */
- if (s->version == 0x30c) {
- ret = camel_file_util_decode_uint32 (in, &validity);
- if (!ret)
- ims->validity = validity;
- return ret;
- }
-
- /* Version 1 */
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &ims->version) == -1)
- return -1;
-
- if (ims->version == 2) {
- /* Version 2: for compat with version 2 of the imap4 summary files */
- gint have_mlist;
-
- if (camel_file_util_decode_fixed_int32 (in, &have_mlist) == -1)
- return -1;
- }
-
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &validity) == -1)
- return -1;
- ims->validity = validity;
-
- /* This is only used for migration; will never be asked to load newer
- * versions of the store format */
- if (ims->version > 3) {
- g_warning("Unknown summary version\n");
- errno = EINVAL;
- return -1;
- }
-
- return 0;
-}
-
static CamelFIRecord *
summary_header_to_db (CamelFolderSummary *s,
GError **error)
diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c
index 2575cbb..2440ae0 100644
--- a/camel/providers/local/camel-local-summary.c
+++ b/camel/providers/local/camel-local-summary.c
@@ -46,7 +46,6 @@
static CamelFIRecord * summary_header_to_db (CamelFolderSummary *, GError **error);
static gboolean summary_header_from_db (CamelFolderSummary *, CamelFIRecord *);
-static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
@@ -104,7 +103,6 @@ camel_local_summary_class_init (CamelLocalSummaryClass *class)
folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (class);
folder_summary_class->message_info_size = sizeof (CamelLocalMessageInfo);
folder_summary_class->content_info_size = sizeof (CamelMessageContentInfo);
- folder_summary_class->summary_header_load = summary_header_load;
folder_summary_class->summary_header_save = summary_header_save;
folder_summary_class->summary_header_from_db = summary_header_from_db;
folder_summary_class->summary_header_to_db = summary_header_to_db;
@@ -683,25 +681,6 @@ summary_header_from_db (CamelFolderSummary *s,
return TRUE;
}
-static gint
-summary_header_load (CamelFolderSummary *s,
- FILE *in)
-{
- CamelLocalSummary *cls = (CamelLocalSummary *) s;
-
- /* We dont actually add our own headers, but version that we don't anyway */
-
- if (CAMEL_FOLDER_SUMMARY_CLASS (camel_local_summary_parent_class)->summary_header_load (s, in) == -1)
- return -1;
-
- /* Legacy version, version is in summary only */
- if ((s->version & 0xfff) == 0x20c)
- return 0;
-
- /* otherwise load the version number */
- return camel_file_util_decode_fixed_int32 (in, (gint32 *) &cls->version);
-}
-
static struct _CamelFIRecord *
summary_header_to_db (CamelFolderSummary *s,
GError **error)
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index ad28c14..7744bfd 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -48,7 +48,6 @@ static gboolean summary_header_from_db (CamelFolderSummary *, CamelFIRecord *);
static CamelMessageInfo * message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record);
static CamelMIRecord * message_info_to_db (CamelFolderSummary *s, CamelMessageInfo *info);
-static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
@@ -132,7 +131,6 @@ camel_mbox_summary_class_init (CamelMboxSummaryClass *class)
folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (class);
folder_summary_class->message_info_size = sizeof (CamelMboxMessageInfo);
folder_summary_class->content_info_size = sizeof (CamelMboxMessageContentInfo);
- folder_summary_class->summary_header_load = summary_header_load;
folder_summary_class->summary_header_save = summary_header_save;
folder_summary_class->summary_header_from_db = summary_header_from_db;
folder_summary_class->summary_header_to_db = summary_header_to_db;
@@ -244,27 +242,6 @@ summary_header_from_db (CamelFolderSummary *s,
return TRUE;
}
-static gint
-summary_header_load (CamelFolderSummary *s,
- FILE *in)
-{
- CamelMboxSummary *mbs = CAMEL_MBOX_SUMMARY (s);
-
- if (CAMEL_FOLDER_SUMMARY_CLASS (camel_mbox_summary_parent_class)->summary_header_load (s, in) == -1)
- return -1;
-
- /* legacy version */
- if (s->version == 0x120c)
- return camel_file_util_decode_uint32 (in, (guint32 *) &mbs->folder_size);
-
- /* version 1 */
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &mbs->version) == -1
- || camel_file_util_decode_gsize (in, &mbs->folder_size) == -1)
- return -1;
-
- return 0;
-}
-
static CamelFIRecord *
summary_header_to_db (CamelFolderSummary *s,
GError **error)
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index d1d4e9f..c55d45f 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -54,7 +54,6 @@ struct _CamelNNTPSummaryPrivate {
#define _PRIVATE(o) (((CamelNNTPSummary *)(o))->priv)
static CamelMessageInfo * message_info_new_from_header (CamelFolderSummary *, struct _camel_header_raw *);
-static gint summary_header_load (CamelFolderSummary *, FILE *);
static gint summary_header_save (CamelFolderSummary *, FILE *);
static gboolean summary_header_from_db (CamelFolderSummary *s, CamelFIRecord *mir);
static CamelFIRecord * summary_header_to_db (CamelFolderSummary *s, GError **error);
@@ -72,7 +71,6 @@ camel_nntp_summary_class_init (CamelNNTPSummaryClass *class)
folder_summary_class->message_info_size = sizeof (CamelMessageInfoBase);
folder_summary_class->content_info_size = sizeof (CamelMessageContentInfo);
folder_summary_class->message_info_new_from_header = message_info_new_from_header;
- folder_summary_class->summary_header_load = summary_header_load;
folder_summary_class->summary_header_save = summary_header_save;
folder_summary_class->summary_header_from_db = summary_header_from_db;
folder_summary_class->summary_header_to_db = summary_header_to_db;
@@ -146,37 +144,6 @@ summary_header_from_db (CamelFolderSummary *s,
return TRUE;
}
-static gint
-summary_header_load (CamelFolderSummary *s,
- FILE *in)
-{
- CamelNNTPSummary *cns = CAMEL_NNTP_SUMMARY (s);
-
- if (CAMEL_FOLDER_SUMMARY_CLASS (camel_nntp_summary_parent_class)->summary_header_load (s, in) == -1)
- return -1;
-
- /* Legacy version */
- if (s->version == 0x20c) {
- camel_file_util_decode_fixed_int32 (in, (gint32 *) &cns->high);
- return camel_file_util_decode_fixed_int32 (in, (gint32 *) &cns->low);
- }
-
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &cns->version) == -1)
- return -1;
-
- if (cns->version > CAMEL_NNTP_SUMMARY_VERSION) {
- g_warning ("Unknown NNTP summary version");
- errno = EINVAL;
- return -1;
- }
-
- if (camel_file_util_decode_fixed_int32 (in, (gint32 *) &cns->high) == -1
- || camel_file_util_decode_fixed_int32 (in, (gint32 *) &cns->low) == -1)
- return -1;
-
- return 0;
-}
-
static CamelFIRecord *
summary_header_to_db (CamelFolderSummary *s,
GError **error)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]