From 5de5ccdbae6e7a1a12d8ad3579cfa599eaaa903b Mon Sep 17 00:00:00 2001 From: bertrand Date: Thu, 5 Aug 1999 16:42:14 +0000 Subject: new method. (camel_folder_get_message): corresponding public call 1999-08-05 bertrand * camel/camel-folder.c (_get_message): new method. (camel_folder_get_message): corresponding public call svn path=/trunk/; revision=1082 --- camel/camel-folder.c | 28 ++++++++++++++++++++++++++++ camel/camel-folder.h | 5 +++++ camel/camel-mime-message.c | 4 ++-- camel/camel-mime-message.h | 6 ++++-- 4 files changed, 39 insertions(+), 4 deletions(-) (limited to 'camel') diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 2f103283d4..6753789bd6 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -49,6 +49,7 @@ static CamelStore *_get_parent_store (CamelFolder *folder); 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 void camel_folder_class_init (CamelFolderClass *camel_folder_class) @@ -74,6 +75,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class) camel_folder_class->get_mode = _get_mode; camel_folder_class->list_subfolders = _list_subfolders; camel_folder_class->expunge = _expunge; + camel_folder_class->get_message = _get_message; /* virtual method overload */ } @@ -722,3 +724,29 @@ camel_folder_expunge (CamelFolder *folder) return CF_CLASS (folder)->expunge (folder); } + + + +static CamelMimeMessage * +_get_message (CamelFolder *folder, gint number) +{ + return NULL; +} + + + + +/** + * _get_message: return the message corresponding to that number in the folder + * @folder: a CamelFolder object + * @number: the number of the message within the folder. + * + * Return the message corresponding to that number within the folder. + * + * Return value: A pointer on the corresponding message or NULL if no corresponding message exists + **/ +CamelMimeMessage * +camel_folder_get_message (CamelFolder *folder, gint number) +{ + return CF_CLASS (folder)->get_message (folder, number); +} diff --git a/camel/camel-folder.h b/camel/camel-folder.h index 53ff89e70d..eea6bcd36e 100644 --- a/camel/camel-folder.h +++ b/camel/camel-folder.h @@ -36,6 +36,7 @@ extern "C" { typedef struct _CamelFolder CamelFolder; #include "camel-store.h" +#include "camel-mime-message.h" #define CAMEL_FOLDER_TYPE (camel_folder_get_type ()) #define CAMEL_FOLDER(obj) (GTK_CHECK_CAST((obj), CAMEL_FOLDER_TYPE, CamelFolder)) @@ -97,6 +98,7 @@ typedef struct { CamelFolderOpenMode (*get_mode) (CamelFolder *folder); GList * (*list_subfolders) (CamelFolder *folder); GList * (*expunge) (CamelFolder *folder); + CamelMimeMessage * (*get_message) (CamelFolder *folder, gint number); } CamelFolderClass; @@ -119,6 +121,9 @@ void camel_folder_set_name (CamelFolder *folder, const gchar *name); const gchar *camel_folder_get_name (CamelFolder *folder); /* void camel_folder_set_full_name (CamelFolder *folder, const gchar *name); */ const gchar *camel_folder_get_full_name (CamelFolder *folder); +CamelMimeMessage *camel_folder_get_message (CamelFolder *folder, gint number); + + #ifdef __cplusplus diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c index 5b608a6076..a6ff2482a6 100644 --- a/camel/camel-mime-message.c +++ b/camel/camel-mime-message.c @@ -139,8 +139,8 @@ camel_mime_message_init (gpointer object, gpointer klass) { CamelMimeMessage *camel_mime_message = CAMEL_MIME_MESSAGE (object); - camel_mime_message->recipients = g_hash_table_new(g_str_hash, g_str_equal); - camel_mime_message->flags = g_hash_table_new(g_str_hash, g_str_equal); + camel_mime_message->recipients = g_hash_table_new (g_str_hash, g_str_equal); + camel_mime_message->flags = g_hash_table_new (g_str_hash, g_str_equal); } GtkType diff --git a/camel/camel-mime-message.h b/camel/camel-mime-message.h index 617286b0c1..17fa510987 100644 --- a/camel/camel-mime-message.h +++ b/camel/camel-mime-message.h @@ -31,6 +31,8 @@ extern "C" { #pragma } #endif /* __cplusplus }*/ +typedef struct _CamelMimeMessage CamelMimeMessage; + #include #include "camel-mime-part.h" #include "camel-folder.h" @@ -49,7 +51,7 @@ extern "C" { -typedef struct +struct _CamelMimeMessage { CamelMimePart parent_object; @@ -73,7 +75,7 @@ typedef struct CamelFolder *folder; CamelSession *session; -} CamelMimeMessage; +} ; -- cgit v1.2.3