summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-08-04 08:17:28 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-08-04 08:17:28 +0000
commita66f3018b4eb999921a5ac99e3bc1b7b727e8fbb (patch)
treee3145ab5fc9d1973cedb0cafa9f271df9dcfb698 /include
parent8b0b30ef386794ebb06e40beffc24c59949ad46e (diff)
downloadmailutils-a66f3018b4eb999921a5ac99e3bc1b7b727e8fbb.tar.gz
mailutils-a66f3018b4eb999921a5ac99e3bc1b7b727e8fbb.tar.bz2
(MU_ATTRIBUTE_IS_UNSEEN,MU_ATTRIBUTE_IS_UNREAD) New macros.
Diffstat (limited to 'include')
-rw-r--r--include/mailutils/attribute.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/mailutils/attribute.h b/include/mailutils/attribute.h
index b195da505..69376ae43 100644
--- a/include/mailutils/attribute.h
+++ b/include/mailutils/attribute.h
@@ -31,7 +31,18 @@ extern "C" {
#define MU_ATTRIBUTE_SEEN 0x10
#define MU_ATTRIBUTE_READ 0x20
#define MU_ATTRIBUTE_MODIFIED 0x40
-#define MU_ATTRIBUTE_RECENT 0x00
+
+/* A message is recent if the current session is the first session
+ to have been notified about it. Practically, a message is considered
+ "recent" if it does not have MU_ATTRIBUTE_SEEN set. For consistency
+ a pseudo-attribute is provided: */
+#define MU_ATTRIBUTE_RECENT 0
+
+#define MU_ATTRIBUTE_IS_UNSEEN(f) \
+ ((f) == 0 || ! ((f) & MU_ATTRIBUTE_SEEN))
+
+#define MU_ATTRIBUTE_IS_UNREAD(f) \
+ ((f) == 0 || ! ((f) & MU_ATTRIBUTE_READ))
extern int attribute_create __P ((attribute_t *, void *));
extern void attribute_destroy __P ((attribute_t *, void *));

Return to:

Send suggestions and report system problems to the System administrator.