[evolution-data-server] Remove camel_folder_summary_add_from_header().



commit 63bacb1b90b06cd0e126f753556b8977a30ac777
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Sep 19 15:35:15 2013 -0400

    Remove camel_folder_summary_add_from_header().
    
    Trivial function, not worth the API bloat.  Do this instead:
    
      info = camel_folder_summary_info_new_from_header (summary, headers);
      camel_folder_summary_add (summary, info);

 camel/camel-folder-summary.c              |   28 ----------------------------
 camel/camel-folder-summary.h              |    4 ----
 camel/providers/nntp/camel-nntp-summary.c |   20 ++++++++++----------
 docs/reference/camel/camel-sections.txt   |    1 -
 4 files changed, 10 insertions(+), 43 deletions(-)
---
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 9bffabf..e7babf7 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -2994,34 +2994,6 @@ camel_folder_summary_insert (CamelFolderSummary *summary,
 }
 
 /**
- * camel_folder_summary_add_from_header:
- * @summary: a #CamelFolderSummary object
- * @headers: rfc822 headers
- *
- * Build a new info record based on a set of headers, and add it to
- * the summary.
- *
- * Note that this function should not be used if build_content_info
- * has been specified for this summary.
- *
- * Returns: the newly added record
- **/
-CamelMessageInfo *
-camel_folder_summary_add_from_header (CamelFolderSummary *summary,
-                                      struct _camel_header_raw *h)
-{
-       CamelMessageInfo *info;
-
-       g_return_val_if_fail (CAMEL_IS_FOLDER_SUMMARY (summary), NULL);
-
-       info = camel_folder_summary_info_new_from_header (summary, h);
-
-       camel_folder_summary_add (summary, info);
-
-       return info;
-}
-
-/**
  * camel_folder_summary_add_from_parser:
  * @summary: a #CamelFolderSummary object
  * @parser: a #CamelMimeParser object
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 941011c..19c3855 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -456,10 +456,6 @@ void               camel_folder_summary_add_preview
 
 /* build/add raw summary items */
 CamelMessageInfo *
-               camel_folder_summary_add_from_header
-                                               (CamelFolderSummary *summary,
-                                                struct _camel_header_raw *headers);
-CamelMessageInfo *
                camel_folder_summary_add_from_parser
                                                (CamelFolderSummary *summary,
                                                 CamelMimeParser *parser);
diff --git a/camel/providers/nntp/camel-nntp-summary.c b/camel/providers/nntp/camel-nntp-summary.c
index 63060d4..e85d415 100644
--- a/camel/providers/nntp/camel-nntp-summary.c
+++ b/camel/providers/nntp/camel-nntp-summary.c
@@ -173,7 +173,6 @@ add_range_xover (CamelNNTPSummary *cns,
        CamelSettings *settings;
        CamelService *service;
        CamelFolderSummary *s;
-       CamelMessageInfoBase *mi;
        struct _camel_header_raw *headers = NULL;
        gchar *line, *tab;
        gchar *host;
@@ -270,15 +269,16 @@ add_range_xover (CamelNNTPSummary *cns,
                /* truncated line? ignore? */
                if (xover == NULL) {
                        if (!camel_folder_summary_check_uid (s, cns->priv->uid)) {
-                               mi = (CamelMessageInfoBase *)
-                                       camel_folder_summary_add_from_header (s, headers);
-                               if (mi) {
-                                       mi->size = size;
-                                       cns->high = n;
-                                       camel_folder_change_info_add_uid (changes, camel_message_info_uid 
(mi));
-                                       if (folder_filter_recent)
-                                               camel_folder_change_info_recent_uid (changes, 
camel_message_info_uid (mi));
-                               }
+                               CamelMessageInfo *mi;
+
+                               mi = camel_folder_summary_info_new_from_header (s, headers);
+                               ((CamelMessageInfoBase *) mi)->size = size;
+                               camel_folder_summary_add (s, mi);
+
+                               cns->high = n;
+                               camel_folder_change_info_add_uid (changes, camel_message_info_uid (mi));
+                               if (folder_filter_recent)
+                                       camel_folder_change_info_recent_uid (changes, camel_message_info_uid 
(mi));
                        }
                }
 
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index e0b28d6..13070b8 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -607,7 +607,6 @@ camel_folder_summary_info_new_from_message
 camel_folder_summary_content_info_new
 camel_folder_summary_content_info_free
 camel_folder_summary_add_preview
-camel_folder_summary_add_from_header
 camel_folder_summary_add_from_parser
 camel_folder_summary_add_from_message
 camel_folder_summary_add


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]