aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-09-18 01:13:57 +0800
committerDan Winship <danw@src.gnome.org>2000-09-18 01:13:57 +0800
commit0d2998b1a1f8af2b6938d4dd40873ef80095844d (patch)
treeab44014e7b9687a82c07482212addc3f447d4c58
parent7912355008d54df720894d1334313801f594c8f2 (diff)
downloadgsoc2013-evolution-0d2998b1a1f8af2b6938d4dd40873ef80095844d.tar.gz
gsoc2013-evolution-0d2998b1a1f8af2b6938d4dd40873ef80095844d.tar.zst
gsoc2013-evolution-0d2998b1a1f8af2b6938d4dd40873ef80095844d.zip
update CamelFolderInfo New function to free the contents of a
* camel-folder-summary.h: update CamelFolderInfo * camel-folder-summary.c (camel_folder_info_free): New function to free the contents of a CamelFolderInfo svn path=/trunk/; revision=5476
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-folder-summary.c14
-rw-r--r--camel/camel-folder-summary.h12
3 files changed, 25 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index ec864600e8..5d3ebaa519 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2000-09-17 Dan Winship <danw@helixcode.com>
+
+ * camel-folder-summary.h: update CamelFolderInfo
+ * camel-folder-summary.c (camel_folder_info_free): New function to
+ free the contents of a CamelFolderInfo
+
2000-09-15 Dan Winship <danw@helixcode.com>
* camel.c (camel_init): Set camel_verbose_debug to TRUE if
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index a990d87a9c..888bdcfceb 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -1500,6 +1500,20 @@ camel_message_info_free(CamelMessageInfo *mi)
g_free(mi);
}
+/**
+ * camel_folder_info_free:
+ * @fi: the folder info
+ *
+ * Frees a CamelFolderInfo and its contents.
+ **/
+void
+camel_folder_info_free(CamelFolderInfo *fi)
+{
+ g_free(fi->name);
+ g_free(fi->full_name);
+ g_free(fi);
+}
+
#if 0
static void
content_info_dump(CamelMessageContentInfo *ci, int depth)
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index 22a108192a..cd7f46a8dd 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -35,14 +35,9 @@
/*typedef struct _CamelFolderSummary CamelFolderSummary;*/
typedef struct _CamelFolderSummaryClass CamelFolderSummaryClass;
-/* these structs from camel-folder-summary.h ... (remove comment after cleanup soon) */
-/* TODO: perhaps they should be full-block objects? */
-/* FIXME: rename this to something more suitable */
typedef struct {
- gchar *name;
- gint nb_message; /* ick, these should be renamed to something better */
- gint nb_unread_message;
- gint nb_deleted_message;
+ char *full_name, *name;
+ int message_count, unread_message_count;
} CamelFolderInfo;
/* A tree of message content info structures
@@ -235,4 +230,7 @@ void camel_tag_list_free(CamelTag **list);
void camel_message_info_dup_to(const CamelMessageInfo *from, CamelMessageInfo *to);
void camel_message_info_free(CamelMessageInfo *mi);
+/* folder info utils */
+void camel_folder_info_free(CamelFolderInfo *fi);
+
#endif /* ! _CAMEL_FOLDER_SUMMARY_H */