diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-07-10 15:30:59 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-07-10 15:30:59 +0800 |
commit | 3e2188235f0cde226477d268aa4928ebb83af831 (patch) | |
tree | 5daf1b2bc32a1b4d766c089692fa4f9a80a38292 /camel/camel-folder.c | |
parent | cccc6d3b5b40488dfdf8354ce78b8ad65b50e74a (diff) | |
download | gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.tar gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.tar.gz gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.tar.bz2 gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.tar.lz gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.tar.xz gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.tar.zst gsoc2013-evolution-3e2188235f0cde226477d268aa4928ebb83af831.zip |
Implemented.
2000-07-10 Jeffrey Stedfast <fejj@helixcode.com>
* providers/mbox/camel-mbox-folder.c (mbox_get_unread_message_count):
* providers/vee/camel-vee-folder.c (vee_get_unread_message_count):
* providers/imap/camel-imap-folder.c (imap_get_unread_message_count):
Implemented.
* camel-folder.c (camel_folder_get_unread_message_count): New
convenience function to allow the mailer to query the number
of unread messages in a folder (for displaying message stats
in a folder tree?).
svn path=/trunk/; revision=4028
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r-- | camel/camel-folder.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 8420bd75cf..454db69773 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -89,6 +89,7 @@ static CamelStore *get_parent_store (CamelFolder *folder, static gint get_message_count (CamelFolder *folder, CamelException *ex); +static gint get_unread_message_count (CamelFolder *folder, CamelException *ex); static void expunge (CamelFolder *folder, CamelException *ex); @@ -164,6 +165,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class) camel_folder_class->free_subfolder_names = free_uids; camel_folder_class->expunge = expunge; camel_folder_class->get_message_count = get_message_count; + camel_folder_class->get_unread_message_count = get_unread_message_count; camel_folder_class->append_message = append_message; camel_folder_class->get_permanent_flags = get_permanent_flags; camel_folder_class->get_message_flags = get_message_flags; @@ -593,6 +595,29 @@ camel_folder_get_message_count (CamelFolder *folder, CamelException *ex) return CF_CLASS (folder)->get_message_count (folder, ex); } +static gint +get_unread_message_count (CamelFolder *folder, CamelException *ex) +{ + g_warning ("CamelFolder::get_unread_message_count not implemented " + "for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder))); + return -1; +} + +/** + * camel_folder_unread_get_message_count: + * @folder: A CamelFolder object + * @ex: a CamelException + * + * Return value: the number of unread messages in the folder, or -1 if unknown. + **/ +gint +camel_folder_get_unread_message_count (CamelFolder *folder, CamelException *ex) +{ + g_return_val_if_fail (CAMEL_IS_FOLDER (folder), -1); + + return CF_CLASS (folder)->get_message_count (folder, ex); +} + static void append_message (CamelFolder *folder, CamelMimeMessage *message, |