aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-message.h
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-18 03:24:24 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-18 03:24:24 +0800
commit14bc1cbfc8a8c492e4a280655238159e004c53b3 (patch)
treea7c0f3dd3a277667989ca4f2d5f17a7a0d3a4b42 /camel/camel-mime-message.h
parentda0a13df5e4c8fdbf524a1a9f1ee9e593f5f0100 (diff)
downloadgsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.tar
gsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.tar.gz
gsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.tar.bz2
gsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.tar.lz
gsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.tar.xz
gsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.tar.zst
gsoc2013-evolution-14bc1cbfc8a8c492e4a280655238159e004c53b3.zip
All this basically to support user flags in the summary. They are not yet
All this basically to support user flags in the summary. They are not yet saved to the message headers (complicates things a bit). 2000-05-17 NotZed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-folder.c (message_changed): Snoop changes to user flags on the message into the summary as well. * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_init): Changed version init to include the parent class version info (i.e. add it not overwrite it). * camel-folder-summary.c (message_info_new): Initialise user_flags to empty. (message_info_load): And load user flags. (message_info_save): And save user flags. (message_info_free): And free them. (CAMEL_FOLDER_SUMMARY_VERSION): Bumped file revision. * camel-folder-summary.h: Added user-flags to summary. * camel-mime-message.c (camel_mime_message_set_user_flag): Dont use a hashtable for user flags. (camel_mime_message_get_user_flag): And changed here too. (camel_flag_get): New interface to get a flag from a flag list. Flag lists are easier to work with than hash tables, and save memory too. (camel_flag_set): And set. (camel_flag_list_free): And free. (free_key_only): Discard. (finalize): Remove the flag list. svn path=/trunk/; revision=3107
Diffstat (limited to 'camel/camel-mime-message.h')
-rw-r--r--camel/camel-mime-message.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
index f1e254da51..40a170e244 100644
--- a/camel/camel-mime-message.h
+++ b/camel/camel-mime-message.h
@@ -62,6 +62,11 @@ enum _CamelMessageFlags {
CAMEL_MESSAGE_USER = 1<<31 /* supports user flags */
};
+typedef struct _CamelFlag {
+ struct _CamelFlag *next;
+ char name[1];
+} CamelFlag;
+
struct _CamelMimeMessage
{
CamelMimePart parent_object;
@@ -80,7 +85,7 @@ struct _CamelMimeMessage
/* other fields */
guint32 flags; /* system flags */
- GHashTable *user_flags; /* if present, then true */
+ struct _CamelFlag *user_flags;
gboolean expunged;
guint message_number; /* set by folder object when retrieving message */
@@ -151,6 +156,12 @@ void camel_mime_message_set_user_flag (CamelMimeMessage *m, const char *name,
guint camel_mime_message_get_message_number (CamelMimeMessage *mime_message);
+/* message flag operations */
+gboolean camel_flag_get(CamelFlag **list, const char *name);
+void camel_flag_set(CamelFlag **list, const char *name, gboolean state);
+int camel_flag_list_size(CamelFlag **list);
+void camel_flag_list_free(CamelFlag **list);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */