aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-message.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-17 07:09:43 +0800
committerDan Winship <danw@src.gnome.org>2000-06-17 07:09:43 +0800
commit174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f (patch)
treeedcbfcf1e6244d1f30e28e7dca2c14c7715ace38 /camel/camel-mime-message.h
parentf0600c2ccbfbd5378cdf980e2d53210c0101639d (diff)
downloadgsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.tar
gsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.tar.gz
gsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.tar.bz2
gsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.tar.lz
gsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.tar.xz
gsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.tar.zst
gsoc2013-evolution-174d7c38d1ff4d1511301b1aa2effa87f7b6bc7f.zip
Move flag handling from CamelMimeMessage to CamelFolder. This
simplifies several flag-handling pieces of code in the mailer, and lets you change a message's flags without having to fetch the message body. It also means that fully-constructed CamelMimeMessages are now essentially constant, which will help simplify locking issues later since it means two threads interested in the same message can just work with separate copies of it. * camel-mime-message.h (struct _CamelMimeMessage): Removed flags and user_flags (moved to summary). Removed expunged and message_number which were unused. Removed message_uid and folder which are no longer needed in the new scheme. (struct CamelMimeMessageClass): Removed message_changed signal and get/set_message_number methods. * camel-mime-message.c: Updates for CamelMimeMessage changes. (camel_mime_message_get/set_flags, camel_mime_message_get/set_user_flag): Replaced with methods in CamelFolder. (camel_flag_get, camel_flag_set, camel_flag_list_size, camel_flag_list_free): Moved verbatim to camel-folder-summary.c * camel-folder.c (camel_folder_get/set_message_flags, camel_folder_get/set_message_user_flag): New methods (and corresponding useless default implementations) (camel_folder_class_init): add a message_changed signal * camel-folder-summary.c (camel_flag_get, camel_flag_set, camel_flag_list_size, camel_flag_list_free): Moved here from camel-mime-message.c * providers/mbox/camel-mbox-folder.c (message_changed): Removed. (mbox_get_message_flags, mbox_set_message_flags, mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak summary bits as appropriate. (Functionality moved here from message_changed.) (mbox_get_message_by_uid): Update for CamelMimeMessage changes (less stuff to initialize). * providers/imap/camel-imap-folder.c (message_changed): Remove this. It was just copied from the mbox provider and doesn't deal with the real IMAP flag stuff anyway. (So there's currently no flag support in the IMAP provider.) (imap_get_message_by_uid): Update for CamelMimeMessage changes. * providers/vee/camel-vee-folder.c: (message_changed): Remove old one. Add a new one to listen for message_changed on each folder and re-emit message_changed signals that correspond to messages in the vfolder. (vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy flag setting to the underlying real messages. (vee_append_message): Removed for now; there's no way to translate this into the new CamelMimeMessage/CamelFolder scheme, but (a) there's also no code which would ever call it and (b) we're probably going want a better interface than append_message for message drag and drop to work anyway. To be revisited. svn path=/trunk/; revision=3598
Diffstat (limited to 'camel/camel-mime-message.h')
-rw-r--r--camel/camel-mime-message.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h
index 40a170e244..b52da923a9 100644
--- a/camel/camel-mime-message.h
+++ b/camel/camel-mime-message.h
@@ -50,23 +50,6 @@ extern "C" {
/* specify local time */
#define CAMEL_MESSAGE_DATE_CURRENT (~0)
-/* system flag bits */
-enum _CamelMessageFlags {
- CAMEL_MESSAGE_ANSWERED = 1<<0,
- CAMEL_MESSAGE_DELETED = 1<<1,
- CAMEL_MESSAGE_DRAFT = 1<<2,
- CAMEL_MESSAGE_FLAGGED = 1<<3,
- CAMEL_MESSAGE_SEEN = 1<<4,
- /* following flags are for the folder, and are not really permanent flags */
- CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<16, /* for use by the folder implementation */
- CAMEL_MESSAGE_USER = 1<<31 /* supports user flags */
-};
-
-typedef struct _CamelFlag {
- struct _CamelFlag *next;
- char name[1];
-} CamelFlag;
-
struct _CamelMimeMessage
{
CamelMimePart parent_object;
@@ -82,33 +65,12 @@ struct _CamelMimeMessage
gchar *from;
GHashTable *recipients; /* hash table of CamelInternetAddress's */
-
- /* other fields */
- guint32 flags; /* system flags */
- struct _CamelFlag *user_flags;
- gboolean expunged;
-
- guint message_number; /* set by folder object when retrieving message */
- gchar *message_uid;
-
- CamelFolder *folder;
-};
-
-enum _MessageChangeType {
- MESSAGE_FLAGS_CHANGED,
- MESSAGE_ENVELOPE_CHANGED,
};
typedef struct {
CamelMimePartClass parent_class;
- /* signals */
- void (*message_changed) (CamelMimeMessage *, enum _MessageChangeType type);
-
/* Virtual methods */
- void (*set_message_number) (CamelMimeMessage *mime_message,
- guint number);
- guint (*get_message_number) (CamelMimeMessage *mime_message);
} CamelMimeMessageClass;
@@ -149,19 +111,6 @@ void camel_mime_message_remove_recipient_name (CamelMimeMessage *mime_message,
const CamelInternetAddress *camel_mime_message_get_recipients (CamelMimeMessage *mime_message,
const char *type);
-guint32 camel_mime_message_get_flags (CamelMimeMessage *m);
-void camel_mime_message_set_flags (CamelMimeMessage *m, guint32 flags, guint32 set);
-gboolean camel_mime_message_get_user_flag (CamelMimeMessage *m, const char *name);
-void camel_mime_message_set_user_flag (CamelMimeMessage *m, const char *name, gboolean value);
-
-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 */