aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-message.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-08-13 23:30:45 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-08-13 23:30:45 +0800
commitc232c3eeaaf85c3e92a1c6bf7a802f7ffee30451 (patch)
treeccc9a01d37252abf14639fc1f30cc1f8f900f080 /camel/camel-mime-message.c
parent0472611db8f67bb0c4fc09138e1131802d85b9c3 (diff)
downloadgsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.tar
gsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.tar.gz
gsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.tar.bz2
gsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.tar.lz
gsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.tar.xz
gsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.tar.zst
gsoc2013-evolution-c232c3eeaaf85c3e92a1c6bf7a802f7ffee30451.zip
new method, returns the list of permanent flags supported by the folder.
1999-08-13 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-folder.c (_get_parmanent_flag_list): (camel_folder_get_parmanent_flag_list): new method, returns the list of permanent flags supported by the folder. * camel/camel-mime-message.c (_get_flag_list): (camel_mime_message_get_flag_list): new method, return the list of flag name used by this message. svn path=/trunk/; revision=1111
Diffstat (limited to 'camel/camel-mime-message.c')
-rw-r--r--camel/camel-mime-message.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 019903d75a..417ccc9ff0 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -61,20 +61,16 @@ static void _set_subject (CamelMimeMessage *mime_message, gchar *subject);
static const gchar *_get_subject (CamelMimeMessage *mime_message);
static void _set_from (CamelMimeMessage *mime_message, gchar *from);
static const gchar *_get_from (CamelMimeMessage *mime_message);
-
static void _add_recipient (CamelMimeMessage *mime_message, gchar *recipient_type, gchar *recipient);
static void _remove_recipient (CamelMimeMessage *mime_message, const gchar *recipient_type, const gchar *recipient);
static const GList *_get_recipients (CamelMimeMessage *mime_message, const gchar *recipient_type);
-
static void _set_flag (CamelMimeMessage *mime_message, const gchar *flag, gboolean value);
static gboolean _get_flag (CamelMimeMessage *mime_message, const gchar *flag);
-
+static GList *_get_flag_list (CamelMimeMessage *mime_message);
static void _set_message_number (CamelMimeMessage *mime_message, guint number);
static guint _get_message_number (CamelMimeMessage *mime_message);
-
static void _write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream);
static gboolean _parse_header_pair (CamelMimePart *mime_part, gchar *header_name, gchar *header_value);
-
static void _finalize (GtkObject *object);
/* Returns the class for a CamelMimeMessage */
@@ -126,6 +122,7 @@ camel_mime_message_class_init (CamelMimeMessageClass *camel_mime_message_class)
camel_mime_message_class->get_recipients = _get_recipients;
camel_mime_message_class->set_flag = _set_flag;
camel_mime_message_class->get_flag = _get_flag;
+ camel_mime_message_class->get_flag_list = _get_flag_list;
camel_mime_message_class->set_message_number = _set_message_number;
camel_mime_message_class->get_message_number = _get_message_number;
@@ -503,6 +500,34 @@ camel_mime_message_get_flag (CamelMimeMessage *mime_message, const gchar *flag)
+static void
+_add_flag_to_list (gpointer key, gpointer value, gpointer user_data)
+{
+ GList **flag_list = (GList **)user_data;
+ gchar *flag_name = (gchar *)key;
+
+ if ((flag_name) && (flag_name[0] != '\0'))
+ *flag_list = g_list_append (*flag_list, flag_name);
+}
+
+static GList *
+_get_flag_list (CamelMimeMessage *mime_message)
+{
+ GList *flag_list = NULL;
+
+ if (mime_message->flags)
+ g_hash_table_foreach (mime_message->flags, _add_flag_to_list, &flag_list);
+ return flag_list;
+}
+
+
+GList *
+camel_mime_message_get_flag_list (CamelMimeMessage *mime_message)
+{
+ return CMM_CLASS (mime_message)->get_flag_list (mime_message);
+}
+
+
static void
_set_message_number (CamelMimeMessage *mime_message, guint number)