Patch: add header flag "calendar"



	Hi,

	This patch adds a flag to TnyHeaderFlags (and camel message
counterpart) named calendar. This will be used in the future to store in
summary if a message contains a calendar appointment.


-- 
José Dapena Paz <jdapena igalia com>
Igalia
diff --git a/libtinymail-camel/camel-lite/camel/camel-folder-summary.c b/libtinymail-camel/camel-lite/camel/camel-folder-summary.c
index 228c768..cc8e21f 100644
--- a/libtinymail-camel/camel-lite/camel/camel-folder-summary.c
+++ b/libtinymail-camel/camel-lite/camel/camel-folder-summary.c
@@ -163,6 +163,7 @@ camel_message_info_clear_normal_flags (CamelMessageInfo *min)
 	mi->flags &= ~CAMEL_MESSAGE_HIGH_PRIORITY;
 	mi->flags &= ~CAMEL_MESSAGE_NORMAL_PRIORITY;
 	mi->flags &= ~CAMEL_MESSAGE_LOW_PRIORITY;
+	mi->flags &= ~CAMEL_MESSAGE_CALENDAR;
 
 	mi->flags &= ~CAMEL_MESSAGE_FOLDER_FLAGGED;
 }
diff --git a/libtinymail-camel/camel-lite/camel/camel-folder-summary.h b/libtinymail-camel/camel-lite/camel/camel-folder-summary.h
index 1ae0211..85c8f57 100644
--- a/libtinymail-camel/camel-lite/camel/camel-folder-summary.h
+++ b/libtinymail-camel/camel-lite/camel/camel-folder-summary.h
@@ -90,7 +90,8 @@ typedef enum _CamelMessageFlags {
 	CAMEL_MESSAGE_USER = 1<<16,  /* free slot */
 	CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<17, /* internally used */
 
-	CAMEL_MESSAGE_JUNK = 1<<18
+	CAMEL_MESSAGE_JUNK = 1<<18,
+	CAMEL_MESSAGE_CALENDAR = 1<<19 /* calendar appointment */
 
 } CamelMessageFlags;
 
diff --git a/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-summary.c b/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-summary.c
index 4d39232..e9083b1 100644
--- a/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-summary.c
+++ b/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-summary.c
@@ -197,7 +197,8 @@ static struct {
 	/* Non-standard priority flags */
 /* 8 */ { 'H', CAMEL_MESSAGE_HIGH_PRIORITY },
 /* 9 */ { 'N', CAMEL_MESSAGE_NORMAL_PRIORITY },
-/* 10*/ { 'L', CAMEL_MESSAGE_LOW_PRIORITY }
+/* 10*/ { 'L', CAMEL_MESSAGE_LOW_PRIORITY },
+/* 11*/ { 'C', CAMEL_MESSAGE_CALENDAR },
 };
 
 /* convert the uid + flags into a unique:info maildir format */
diff --git a/libtinymail/tny-enums.h b/libtinymail/tny-enums.h
index c7f3409..0bfebcc 100644
--- a/libtinymail/tny-enums.h
+++ b/libtinymail/tny-enums.h
@@ -174,6 +174,7 @@ typedef enum {
 	TNY_HEADER_FLAG_PARTIAL = 1<<7,
 	TNY_HEADER_FLAG_EXPUNGED = 1<<8,
 	TNY_HEADER_FLAG_PRIORITY = 1<<9|1<<10
+	TNY_HEADER_FLAG_CALENDAR = 1<<19
 } TnyHeaderFlags;
 
 
diff --git a/libtinymail/tny-header.h b/libtinymail/tny-header.h
index ddd73a3..2e875cd 100644
--- a/libtinymail/tny-header.h
+++ b/libtinymail/tny-header.h
@@ -65,7 +65,8 @@ typedef enum
 	TNY_HEADER_FLAG_HIGH_PRIORITY = 0<<9|1<<10,
 	TNY_HEADER_FLAG_NORMAL_PRIORITY = 0<<9|0<<10,
 	TNY_HEADER_FLAG_LOW_PRIORITY = 1<<9|0<<10,
-	TNY_HEADER_FLAG_SUSPENDED = 1<<11
+	TNY_HEADER_FLAG_SUSPENDED = 1<<11,
+	TNY_HEADER_FLAG_CALENDAR = 1<<19
 } TnyHeaderFlags;
 
 #define TNY_HEADER_FLAG_PRIORITY_MASK (1<<9|1<<10)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]