aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
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/camel-folder.c
parent58752d028e6f7519e625a47827846a813e65e4e6 (diff)
downloadgsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar
gsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar.gz
gsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar.bz2
gsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar.lz
gsoc2013-evolution-0227bb16b26c2d59c4c2ed6495da1bcd8c3d525d.tar.xz
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/camel-folder.c')
-rw-r--r--camel/camel-folder.c58
1 files changed, 55 insertions, 3 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index cb0fa02ae8..e498680fab 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -58,11 +58,11 @@ static guint32 get_permanent_flags (CamelFolder *folder);
static guint32 get_message_flags (CamelFolder *folder, const char *uid);
static void set_message_flags (CamelFolder *folder, const char *uid,
guint32 flags, guint32 set);
-static gboolean get_message_user_flag (CamelFolder *folder, const char *uid,
- const char *name);
+static gboolean get_message_user_flag (CamelFolder *folder, const char *uid, const char *name);
static void set_message_user_flag (CamelFolder *folder, const char *uid,
const char *name, gboolean value);
-
+static const char *get_message_user_tag(CamelFolder *folder, const char *uid, const char *name);
+static void set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value);
static GPtrArray *get_subfolder_names (CamelFolder *folder);
static void free_subfolder_names (CamelFolder *folder,
@@ -152,6 +152,8 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class)
camel_folder_class->set_message_flags = set_message_flags;
camel_folder_class->get_message_user_flag = get_message_user_flag;
camel_folder_class->set_message_user_flag = set_message_user_flag;
+ camel_folder_class->get_message_user_tag = get_message_user_tag;
+ camel_folder_class->set_message_user_tag = set_message_user_tag;
camel_folder_class->get_message = get_message;
camel_folder_class->get_uids = get_uids;
camel_folder_class->free_uids = free_uids;
@@ -721,6 +723,56 @@ camel_folder_set_message_user_flag (CamelFolder *folder, const char *uid,
CF_CLASS (folder)->set_message_user_flag (folder, uid, name, value);
}
+static const char *get_message_user_tag(CamelFolder *folder, const char *uid, const char *name)
+{
+ g_warning ("CamelFolder::get_message_user_tag not implemented "
+ "for `%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
+ return NULL;
+}
+
+/**
+ * camel_folder_get_message_user_tag:
+ * @folder: a CamelFolder
+ * @uid: the UID of a message in @folder
+ * @name: the name of a user tag
+ *
+ * Return value: Returns the value of the user tag.
+ **/
+const char *
+camel_folder_get_message_user_tag (CamelFolder *folder, const char *uid, const char *name)
+{
+ g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
+
+ return CF_CLASS (folder)->get_message_user_tag (folder, uid, name);
+}
+
+
+static void
+set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value)
+{
+ g_warning ("CamelFolder::set_message_user_tag not implemented "
+ "for `%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder)));
+}
+
+/**
+ * camel_folder_set_message_user_tag:
+ * @folder: a CamelFolder
+ * @uid: the UID of a message in @folder
+ * @name: the name of the user tag to set
+ * @value: the value to set it to
+ *
+ * Sets the user tag specified by @name to the value specified by @value
+ * on the indicated message. (This may or may not persist after the
+ * folder or store is closed. See camel_folder_get_permanent_flags().)
+ **/
+void
+camel_folder_set_message_user_tag (CamelFolder *folder, const char *uid, const char *name, const char *value)
+{
+ g_return_if_fail (CAMEL_IS_FOLDER (folder));
+
+ CF_CLASS (folder)->set_message_user_tag (folder, uid, name, value);
+}
+
static const CamelMessageInfo *
get_message_info (CamelFolder *folder, const char *uid)