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



commit 57942e2d09cd79c8491807071ea7eb0b6f3a6e19
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Sep 23 11:27:42 2013 -0400

    Remove camel_store_free_folder_info().
    
    Use camel_folder_info_free() instead.

 camel/camel-store.c                         |   45 +++-----------------------
 camel/camel-store.h                         |    4 --
 camel/providers/local/camel-maildir-store.c |    4 +-
 camel/providers/local/camel-spool-store.c   |   12 -------
 docs/reference/camel/camel-sections.txt     |    1 -
 5 files changed, 8 insertions(+), 58 deletions(-)
---
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 03b86b0..6cd0a73 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -383,13 +383,6 @@ store_can_refresh_folder (CamelStore *store,
        return ((info->flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX);
 }
 
-static void
-store_free_folder_info (CamelStore *store,
-                        CamelFolderInfo *fi)
-{
-       camel_folder_info_free (fi);
-}
-
 static CamelFolder *
 store_get_inbox_folder_sync (CamelStore *store,
                              GCancellable *cancellable,
@@ -1237,7 +1230,6 @@ camel_store_class_init (CamelStoreClass *class)
        class->hash_folder_name = g_str_hash;
        class->equal_folder_name = g_str_equal;
        class->can_refresh_folder = store_can_refresh_folder;
-       class->free_folder_info = store_free_folder_info;
 
        class->get_inbox_folder_sync = store_get_inbox_folder_sync;
        class->get_junk_folder_sync = store_get_junk_folder_sync;
@@ -1635,31 +1627,6 @@ dump_fi (CamelFolderInfo *fi,
 }
 
 /**
- * camel_store_free_folder_info:
- * @store: a #CamelStore
- * @fi: a #CamelFolderInfo as gotten via camel_store_get_folder_info()
- *
- * Frees the data returned by camel_store_get_folder_info(). If @fi is %NULL,
- * nothing is done, the routine simply returns.
- **/
-void
-camel_store_free_folder_info (CamelStore *store,
-                              CamelFolderInfo *fi)
-{
-       CamelStoreClass *class;
-
-       g_return_if_fail (CAMEL_IS_STORE (store));
-
-       if (fi == NULL)
-               return;
-
-       class = CAMEL_STORE_GET_CLASS (store);
-       g_return_if_fail (class->free_folder_info != NULL);
-
-       class->free_folder_info (store, fi);
-}
-
-/**
  * camel_folder_info_free:
  * @fi: a #CamelFolderInfo
  *
@@ -2157,7 +2124,7 @@ camel_store_get_folder_finish (CamelStore *store,
  * folders (such as vTrash or vJunk).
  *
  * The returned #CamelFolderInfo tree should be freed with
- * camel_store_free_folder_info().
+ * camel_folder_info_free().
  *
  * The CAMEL_STORE_FOLDER_INFO_FAST flag should be considered
  * deprecated; most backends will behave the same whether it is
@@ -2294,7 +2261,7 @@ camel_store_get_folder_info_sync (CamelStore *store,
                        info->next = NULL;
                        info->parent = NULL;
 
-                       camel_store_free_folder_info (store, root_info);
+                       camel_folder_info_free (root_info);
                }
        }
 
@@ -2363,7 +2330,7 @@ camel_store_get_folder_info (CamelStore *store,
  *
  * Finishes the operation started with camel_store_get_folder_info().
  * The returned #CamelFolderInfo tree should be freed with
- * camel_store_free_folder_info().
+ * camel_folder_info_free().
  *
  * Returns: a #CamelFolderInfo tree, or %NULL on error
  *
@@ -2705,7 +2672,7 @@ camel_store_get_trash_folder_finish (CamelStore *store,
  * Creates a new folder as a child of an existing folder.
  * @parent_name can be %NULL to create a new top-level folder.
  * The returned #CamelFolderInfo struct should be freed with
- * camel_store_free_folder_info().
+ * camel_folder_info_free().
  *
  * Returns: info about the created folder, or %NULL on error
  *
@@ -2808,7 +2775,7 @@ camel_store_create_folder (CamelStore *store,
  *
  * Finishes the operation started with camel_store_create_folder().
  * The returned #CamelFolderInfo struct should be freed with
- * camel_store_free_folder_info().
+ * camel_folder_info_free().
  *
  * Returns: info about the created folder, or %NULL on error
  *
@@ -3088,7 +3055,7 @@ camel_store_rename_folder_sync (CamelStore *store,
 
                        if (folder_info != NULL) {
                                camel_store_folder_renamed (store, old_name, folder_info);
-                               class->free_folder_info (store, folder_info);
+                               camel_folder_info_free (folder_info);
                        }
                } else {
                        /* Failed, just unlock our folders for re-use */
diff --git a/camel/camel-store.h b/camel/camel-store.h
index 2feb06b..c013453 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -140,8 +140,6 @@ struct _CamelStoreClass {
        gboolean        (*can_refresh_folder)   (CamelStore *store,
                                                 CamelFolderInfo *info,
                                                 GError **error);
-       void            (*free_folder_info)     (CamelStore *store,
-                                                CamelFolderInfo *fi);
 
        /* Synchronous I/O Methods */
        CamelFolder *   (*get_folder_sync)      (CamelStore *store,
@@ -312,8 +310,6 @@ void                camel_store_folder_renamed      (CamelStore *store,
                                                 const gchar *old_name,
                                                 CamelFolderInfo *folder_info);
 void           camel_store_folder_info_stale   (CamelStore *store);
-void           camel_store_free_folder_info    (CamelStore *store,
-                                                CamelFolderInfo *fi);
 CamelFolderInfo *
                camel_folder_info_new           (void);
 void           camel_folder_info_free          (CamelFolderInfo *fi);
diff --git a/camel/providers/local/camel-maildir-store.c b/camel/providers/local/camel-maildir-store.c
index fb4c2de..50c6e0e 100644
--- a/camel/providers/local/camel-maildir-store.c
+++ b/camel/providers/local/camel-maildir-store.c
@@ -710,7 +710,7 @@ scan_dirs (CamelStore *store,
                        CamelFolderInfo *old_topfi = *topfi;
 
                        *topfi = camel_folder_info_build (folders, (*topfi)->full_name, '/', TRUE);
-                       camel_store_free_folder_info (store, old_topfi);
+                       camel_folder_info_free (old_topfi);
                }
 
                res = 0;
@@ -872,7 +872,7 @@ maildir_store_rename_folder_sync (CamelStore *store,
                                old, new,
                                cancellable, error);
 
-               camel_store_free_folder_info (store, subfolders);
+               camel_folder_info_free (subfolders);
        }
 
        g_free (old_dir);
diff --git a/camel/providers/local/camel-spool-store.c b/camel/providers/local/camel-spool-store.c
index 9231eba..f434745 100644
--- a/camel/providers/local/camel-spool-store.c
+++ b/camel/providers/local/camel-spool-store.c
@@ -438,17 +438,6 @@ spool_store_get_name (CamelService *service,
        return name;
 }
 
-static void
-spool_store_free_folder_info (CamelStore *store,
-                              CamelFolderInfo *fi)
-{
-       if (fi) {
-               g_free (fi->full_name);
-               g_free (fi->display_name);
-               g_slice_free (CamelFolderInfo, fi);
-       }
-}
-
 static CamelFolder *
 spool_store_get_folder_sync (CamelStore *store,
                              const gchar *folder_name,
@@ -706,7 +695,6 @@ camel_spool_store_class_init (CamelSpoolStoreClass *class)
        service_class->get_name = spool_store_get_name;
 
        store_class = CAMEL_STORE_CLASS (class);
-       store_class->free_folder_info = spool_store_free_folder_info;
        store_class->get_folder_sync = spool_store_get_folder_sync;
        store_class->get_folder_info_sync = spool_store_get_folder_info_sync;
        store_class->get_inbox_folder_sync = spool_store_get_inbox_folder_sync;
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 3129512..2db6dd4 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -2468,7 +2468,6 @@ camel_store_folder_deleted
 camel_store_folder_opened
 camel_store_folder_renamed
 camel_store_folder_info_stale
-camel_store_free_folder_info
 camel_folder_info_new
 camel_folder_info_free
 camel_folder_info_build


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