aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
authorNotZed <NotZed@HelixCode.com>2000-05-02 03:47:12 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-05-02 03:47:12 +0800
commitfed684880e2a47aaa0ee109bd8df0db1a5589c79 (patch)
tree548a551579178c78ea7f57a14e6f0d69ef57c1db /camel/camel-folder.c
parent0b889518d2fdfd0e296179bf581c7fbff4e5210e (diff)
downloadgsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.tar
gsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.tar.gz
gsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.tar.bz2
gsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.tar.lz
gsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.tar.xz
gsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.tar.zst
gsoc2013-evolution-fed684880e2a47aaa0ee109bd8df0db1a5589c79.zip
More message cleanup. Flags now work, are saved, and the delete
flag causes an expunge to expunge the deleted messages. 2000-05-01 NotZed <NotZed@HelixCode.com> * providers/mbox/camel-mbox-summary.c (camel_mbox_summary_set_flags_by_uid): New function to update the flags in the summary. (camel_mbox_summary_expunge): Expunge messages from a folder. (offset_content): Re-align offsets of summary when messages added/removed to an existing summary. (camel_mbox_summary_remove_uid): Remove a message summary entry by uid. (index_folder): Restore flags from X-Evolution header, if they are set. * providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Connect to the message_changed signal. (_init): Set permanent flags to something reasonable. No user flags yet ... (message_changed): If the flags of the message change, update the flags in the summary. (mbox_expunge): Implement the expunge. (camel_mbox_folder_class_init): Renamed all leading _'s to mbox_'s * camel-folder.c (_finalize): Uh, dont free permanent_flags anymore (this wouldn't failed anyway, it was a GList !!!) * camel-folder.h (struct _CamelFolder): Change permanent_flags to a bitfield. (list_permanent_flags): Renamed to get_permanent_flags, and returns a bitfield. (camel_folder_expunge): Changed expunge to a void type. The messages would no longer be useful after they have been removed ... * camel-mime-message.c (set_flag): Removed. (camel_mime_message_set_flag): Removed. (get_flag): Removed. (camel_mime_message_get_flag): Removed. (add_flag_to_list): Removed. (get_flag_list): Removed. (camel_mime_message_get_flag_list): Removed. (camel_mime_message_get_flags): New interface to get system flags. (camel_mime_message_set_flags): " to set ". (camel_mime_message_get_user_flag): To get a user flag. (camel_mime_message_set_user_flag): To set a user flag. (finalize): Hmm, the old one free'd the key and data, not good when the data is a boolean ... svn path=/trunk/; revision=2716
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 31141da5c9..c0d0e5fcb3 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -74,8 +74,8 @@ static gboolean _can_hold_folders (CamelFolder *folder);
static gboolean _can_hold_messages (CamelFolder *folder);
static gboolean _exists (CamelFolder *folder, CamelException *ex);
static gboolean _is_open (CamelFolder *folder);
-static const GList *_list_permanent_flags (CamelFolder *folder,
- CamelException *ex);
+static guint32 _get_permanent_flags (CamelFolder *folder,
+ CamelException *ex);
static CamelFolderOpenMode _get_mode (CamelFolder *folder,
CamelException *ex);
@@ -108,7 +108,7 @@ static gint _get_message_count (CamelFolder *folder,
static gboolean _delete_messages (CamelFolder *folder,
CamelException *ex);
-static GList * _expunge (CamelFolder *folder,
+static void _expunge (CamelFolder *folder,
CamelException *ex);
static void _append_message (CamelFolder *folder,
CamelMimeMessage *message,
@@ -172,7 +172,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class)
camel_folder_class->delete_message_by_number = _delete_message_by_number;
camel_folder_class->get_message_count = _get_message_count;
camel_folder_class->append_message = _append_message;
- camel_folder_class->list_permanent_flags = _list_permanent_flags;
+ camel_folder_class->get_permanent_flags = _get_permanent_flags;
camel_folder_class->copy_message_to = _copy_message_to;
camel_folder_class->get_message_uid = _get_message_uid;
camel_folder_class->get_message_by_uid = _get_message_by_uid;
@@ -224,7 +224,6 @@ _finalize (GtkObject *object)
g_free (camel_folder->name);
g_free (camel_folder->full_name);
- g_free (camel_folder->permanent_flags);
if (camel_folder->parent_store)
gtk_object_unref (GTK_OBJECT (camel_folder->parent_store));
@@ -974,12 +973,11 @@ camel_folder_list_subfolders (CamelFolder *folder, CamelException *ex)
-static GList *
+static void
_expunge (CamelFolder *folder, CamelException *ex)
{
g_warning ("CamelFolder::expunge not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
- return NULL;
}
@@ -991,7 +989,7 @@ _expunge (CamelFolder *folder, CamelException *ex)
*
* Return value: list of expunged messages
**/
-GList *
+void
camel_folder_expunge (CamelFolder *folder, CamelException *ex)
{
g_assert (folder != NULL);
@@ -1154,18 +1152,18 @@ camel_folder_append_message (CamelFolder *folder,
}
-static const GList *
-_list_permanent_flags (CamelFolder *folder, CamelException *ex)
+static guint32
+_get_permanent_flags (CamelFolder *folder, CamelException *ex)
{
return folder->permanent_flags;
}
-const GList *
-camel_folder_list_permanent_flags (CamelFolder *folder, CamelException *ex)
+guint32
+camel_folder_get_permanent_flags (CamelFolder *folder, CamelException *ex)
{
g_assert (folder != NULL);
- return CF_CLASS (folder)->list_permanent_flags (folder, ex);
+ return CF_CLASS (folder)->get_permanent_flags (folder, ex);
}