aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-part.c
diff options
context:
space:
mode:
Diffstat (limited to 'em-format/e-mail-part.c')
-rw-r--r--em-format/e-mail-part.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/em-format/e-mail-part.c b/em-format/e-mail-part.c
index ba43e7e2f2..2339e0e3c1 100644
--- a/em-format/e-mail-part.c
+++ b/em-format/e-mail-part.c
@@ -371,3 +371,23 @@ e_mail_part_has_validity (EMailPart *part)
return !g_queue_is_empty (&part->validities);
}
+EMailPartValidityFlags
+e_mail_part_get_validity_flags (EMailPart *part)
+{
+ EMailPartValidityFlags flags = 0;
+ GList *head, *link;
+
+ g_return_val_if_fail (part != NULL, 0);
+
+ head = g_queue_peek_head_link (&part->validities);
+
+ for (link = head; link != NULL; link = g_list_next (link)) {
+ EMailPartValidityPair *pair = link->data;
+
+ if (pair != NULL)
+ flags |= pair->validity_type;
+ }
+
+ return flags;
+}
+