aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/mbox
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-08-11 15:43:50 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-08-11 15:43:50 +0800
commit0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d (patch)
treea5bb59031f5757fcd315f79d16fd245486bb776a /camel/providers/mbox
parent58752d028e6f7519e625a47827846a813e65e4e6 (diff)
downloadgsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar.gz
gsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar.zst
gsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.zip
Implement. (mh_get_message_user_tag): Implement.
2000-08-11 Not Zed <NotZed@HelixCode.com> * providers/mh/camel-mh-folder.c (mh_set_message_user_tag): Implement. (mh_get_message_user_tag): Implement. * providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag): (mbox_set_message_user_tag): Implement. * camel-folder.c (camel_folder_set_message_user_tag): Routine to set message tags. (camel_folder_get_message_user_tag): And accessor. svn path=/trunk/; revision=4729
Diffstat (limited to 'camel/providers/mbox')
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c
index 00921637eb..d533b675b9 100644
--- a/camel/providers/mbox/camel-mbox-folder.c
+++ b/camel/providers/mbox/camel-mbox-folder.c
@@ -83,6 +83,8 @@ static guint32 mbox_get_message_flags(CamelFolder *folder, const char *uid);
static void mbox_set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 set);
static gboolean mbox_get_message_user_flag(CamelFolder *folder, const char *uid, const char *name);
static void mbox_set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gboolean value);
+static const char *mbox_get_message_user_tag(CamelFolder *folder, const char *uid, const char *name);
+static void mbox_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
static void mbox_finalize(CamelObject * object);
@@ -121,6 +123,8 @@ camel_mbox_folder_class_init(CamelMboxFolderClass * camel_mbox_folder_class)
camel_folder_class->set_message_flags = mbox_set_message_flags;
camel_folder_class->get_message_user_flag = mbox_get_message_user_flag;
camel_folder_class->set_message_user_flag = mbox_set_message_user_flag;
+ camel_folder_class->get_message_user_tag = mbox_get_message_user_tag;
+ camel_folder_class->set_message_user_tag = mbox_set_message_user_tag;
}
static void
@@ -592,3 +596,30 @@ mbox_set_message_user_flag(CamelFolder *folder, const char *uid, const char *nam
camel_folder_summary_touch(CAMEL_FOLDER_SUMMARY(mf->summary));
camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
}
+
+static const char *mbox_get_message_user_tag(CamelFolder *folder, const char *uid, const char *name)
+{
+ CamelMessageInfo *info;
+ CamelMboxFolder *mf = CAMEL_MBOX_FOLDER(folder);
+
+ info = camel_folder_summary_uid(CAMEL_FOLDER_SUMMARY(mf->summary), uid);
+ g_return_val_if_fail(info != NULL, FALSE);
+
+ return camel_tag_get(&info->user_tags, name);
+}
+
+static void mbox_set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
+{
+ CamelMessageInfo *info;
+ CamelMboxFolder *mf = CAMEL_MBOX_FOLDER(folder);
+
+ info = camel_folder_summary_uid(CAMEL_FOLDER_SUMMARY(mf->summary), uid);
+ g_return_if_fail(info != NULL);
+
+ camel_tag_set(&info->user_tags, name, value);
+ info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
+ camel_folder_summary_touch(CAMEL_FOLDER_SUMMARY(mf->summary));
+ camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
+}
+
+