From db89b1a62fb0fa1ed57a9cdd275c0a977630a56a Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 6 Aug 1999 17:28:26 +0000 Subject: updated some autogen doc stuff. Still don't understand warnings :( 1999-08-06 bertrand * devel-docs/camel/: updated some autogen doc stuff. Still don't understand warnings :( * camel/camel-data-wrapper.c: * camel/providers/MH/camel-mh-store.c: * camel/url-util.c: * camel/gmime-content-field.c: * camel/camel-store.c: various inline doc corrections. * camel/camel-folder.c (get_message_count): new method. Returns the number of message in the folder. svn path=/trunk/; revision=1092 --- camel/camel-folder.c | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'camel/camel-folder.c') diff --git a/camel/camel-folder.c b/camel/camel-folder.c index bdd1a75a17..5fa22a5b72 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -50,6 +50,7 @@ static CamelFolderOpenMode _get_mode (CamelFolder *folder); static GList *_list_subfolders (CamelFolder *folder); static GList *_expunge (CamelFolder *folder); static CamelMimeMessage *_get_message (CamelFolder *folder, gint number); +static gint _get_message_count (CamelFolder *folder); static void camel_folder_class_init (CamelFolderClass *camel_folder_class) @@ -76,6 +77,8 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class) camel_folder_class->list_subfolders = _list_subfolders; camel_folder_class->expunge = _expunge; camel_folder_class->get_message = _get_message; + camel_folder_class->get_message_count = _get_message_count; + /* virtual method overload */ } @@ -383,19 +386,19 @@ _get_folder (CamelFolder *folder, const gchar *folder_name) return new_folder; } -/** - * camel_folder_get_folder: return the (sub)folder object that is specified. - * - * @folder : the folder - * @folder_name: subfolder path. - * + + +/** + * camel_folder_get_folder: return the (sub)folder object that is specified + * @folder: the folder + * @folder_name: subfolder path + * * This method returns a folder objects. This folder * is necessarily a subfolder of the current folder. * It is an error to ask a folder begining with the * folder separator character. * - * Return value: Required folder. NULL if the subfolder object - * could not be obtained + * Return value: Required folder. NULL if the subfolder object could not be obtained **/ CamelFolder * camel_folder_get_folder (CamelFolder *folder, gchar *folder_name) @@ -758,3 +761,26 @@ camel_folder_get_message (CamelFolder *folder, gint number) return CF_CLASS (folder)->get_message (folder, number); } + +static gint +_get_message_count (CamelFolder *folder) +{ + return -1; +} + + + +/** + * camel_folder_get_message_count: get the number of messages in the folder + * @folder: A CamelFolder object + * + * Returns the number of messages in the folder. + * + * Return value: the number of messages or -1 if unknown. + **/ +gint +camel_folder_get_message_count (CamelFolder *folder) +{ + return CF_CLASS (folder)->get_message_count (folder); +} + -- cgit