aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-03-17 12:51:21 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-03-17 12:51:21 +0800
commita570bb037f3fd6b15e1e3d16a04827b6243ff85f (patch)
treebbc51d5b8fd9ad004dd88d9864702f2182cbf715 /camel/camel-folder.c
parent7367bd18e7ef0423550bddaca039f4810c267848 (diff)
downloadgsoc2013-evolution-a570bb037f3fd6b15e1e3d16a04827b6243ff85f.tar.gz
gsoc2013-evolution-a570bb037f3fd6b15e1e3d16a04827b6243ff85f.tar.zst
gsoc2013-evolution-a570bb037f3fd6b15e1e3d16a04827b6243ff85f.zip
Implemented. (ref_message_info): And default implementation.
2001-03-17 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_ref_message_info): Implemented. (ref_message_info): And default implementation. * camel-folder.h: Added ref_message_info virtual method. 2001-03-16 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new_summary): New function to create a thread tree from a supplied summary array. (camel_folder_thread_messages_destroy): Handle thread trees generated by the above function properly. svn path=/trunk/; revision=8774
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index b3d50e893d..b3a86c0f4f 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -35,7 +35,7 @@
#include "camel-private.h"
-#define d(x) x
+#define d(x)
static CamelObjectClass *parent_class = NULL;
@@ -87,6 +87,7 @@ static CamelMimeMessage *get_message (CamelFolder *folder,
static CamelMessageInfo *get_message_info (CamelFolder *folder, const char *uid);
static void free_message_info (CamelFolder *folder, CamelMessageInfo *info);
+static void ref_message_info (CamelFolder *folder, CamelMessageInfo *info);
static GPtrArray *search_by_expression (CamelFolder *folder,
const char *exp,
@@ -145,6 +146,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class)
camel_folder_class->search_by_expression = search_by_expression;
camel_folder_class->search_free = search_free;
camel_folder_class->get_message_info = get_message_info;
+ camel_folder_class->ref_message_info = ref_message_info;
camel_folder_class->free_message_info = free_message_info;
camel_folder_class->copy_message_to = copy_message_to;
camel_folder_class->move_message_to = move_message_to;
@@ -801,6 +803,30 @@ camel_folder_free_message_info(CamelFolder *folder, CamelMessageInfo *info)
CF_CLASS (folder)->free_message_info(folder, info);
}
+static void
+ref_message_info (CamelFolder *folder, CamelMessageInfo *info)
+{
+ g_return_if_fail(folder->summary != NULL);
+
+ camel_folder_summary_info_ref(folder->summary, info);
+}
+
+/**
+ * camel_folder_ref_message_info:
+ * @folder:
+ * @info:
+ *
+ * Ref a CamelMessageInfo, previously obtained with get_message_info().
+ **/
+void
+camel_folder_ref_message_info(CamelFolder *folder, CamelMessageInfo *info)
+{
+ g_return_if_fail(CAMEL_IS_FOLDER (folder));
+ g_return_if_fail(info != NULL);
+
+ CF_CLASS (folder)->ref_message_info(folder, info);
+}
+
/* TODO: is this function required anyway? */
gboolean
camel_folder_has_summary_capability (CamelFolder *folder)