char *filename;
notmuch_message_file_t *message_file;
notmuch_message_list_t *replies;
+ unsigned long flags;
Xapian::Document doc;
};
message->doc_id = doc_id;
message->frozen = 0;
+ message->flags = 0;
/* Each of these will be lazily created as needed. */
message->message_id = NULL;
return message->filename;
}
+notmuch_bool_t
+notmuch_message_get_flag (notmuch_message_t *message,
+ notmuch_message_flag_t flag)
+{
+ return message->flags & (1 << flag);
+}
+
+void
+notmuch_message_set_flag (notmuch_message_t *message,
+ notmuch_message_flag_t flag, notmuch_bool_t enable)
+{
+ if (enable)
+ message->flags |= (1 << flag);
+ else
+ message->flags &= ~(1 << flag);
+}
+
time_t
notmuch_message_get_date (notmuch_message_t *message)
{
const char *
notmuch_message_get_filename (notmuch_message_t *message);
+/* Message flags */
+typedef enum _notmuch_message_flag {
+} notmuch_message_flag_t;
+
+/* Get a value of a flag for the email corresponding to 'message'. */
+notmuch_bool_t
+notmuch_message_get_flag (notmuch_message_t *message,
+ notmuch_message_flag_t flag);
+
+/* Set a value of a flag for the email corresponding to 'message'. */
+void
+notmuch_message_set_flag (notmuch_message_t *message,
+ notmuch_message_flag_t flag, notmuch_bool_t value);
+
/* Get the date of 'message' as a time_t value.
*
* For the original textual representation of the Date header from the