From 383f245d39b8b806a4b6ce4dea7b0ab7f1658450 Mon Sep 17 00:00:00 2001 From: NotZed Date: Thu, 20 Apr 2000 23:48:45 +0000 Subject: MERGE NEW_PARSER branch into HEAD, fixed conflicts. 2000-04-20 NotZed * MERGE NEW_PARSER branch into HEAD, fixed conflicts. * gmime-content-field.c (_print_parameter): Duh, removed again (@@#$@ cvs merge). * camel-mime-utils.c (header_content_type_is): Constify. (header_content_type_unref): Killed a couple warnings. * camel-folder.c (_init): Removed more log crap. * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for summary changes. * providers/mbox/camel-mbox-folder.c (_get_message_by_number): Fixed for new summary interface. Added a warning for using this broken api. (_get_message_by_uid): Fixed for message new with session vanishing. svn path=/trunk/; revision=2531 --- camel/camel-folder.h | 75 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 12 deletions(-) (limited to 'camel/camel-folder.h') diff --git a/camel/camel-folder.h b/camel/camel-folder.h index 9a717e3db6..b8b2db0da5 100644 --- a/camel/camel-folder.h +++ b/camel/camel-folder.h @@ -35,6 +35,7 @@ extern "C" { #endif /* __cplusplus }*/ #include +#include #include "camel-types.h" #define CAMEL_FOLDER_TYPE (camel_folder_get_type ()) @@ -58,12 +59,56 @@ typedef enum { typedef void (*CamelFolderAsyncCallback) (); typedef void (CamelSearchFunc)(CamelFolder *folder, int id, gboolean complete, GList *matches, void *data); +/* these structs from camel-folder-summary.h ... (remove comment after cleanup soon) */ +/* TODO: perhaps they should be full-block objects? */ +/* FIXME: rename this to something more suitable */ +typedef struct { + gchar *name; + gint nb_message; /* ick, these should be renamed to something better */ + gint nb_unread_message; + gint nb_deleted_message; +} CamelFolderInfo; + +/* A tree of message content info structures + describe the content structure of the message (if it has any) */ +typedef struct _CamelMessageContentInfo { + struct _CamelMessageContentInfo *next; + + struct _CamelMessageContentInfo *childs; + struct _CamelMessageContentInfo *parent; + + struct _header_content_type *type; + char *id; + char *description; + char *encoding; + + guint32 size; +} CamelMessageContentInfo; + +/* TODO: rename this?? */ +/* TODO: Make this an object, maybe? */ +typedef struct { + /* public fields */ + gchar *subject; + gchar *to; + gchar *from; + + gchar *uid; + guint32 flags; + + + time_t date_sent; + time_t date_received; + + /* tree of content description */ + CamelMessageContentInfo *content; +} CamelMessageInfo; + + struct _CamelFolder { GtkObject parent_object; - gboolean can_hold_folders; - gboolean can_hold_messages; CamelFolderOpenMode open_mode; CamelFolderState open_state; gchar *name; @@ -73,12 +118,11 @@ struct _CamelFolder CamelFolder *parent_folder; GList *permanent_flags; - gboolean has_summary_capability; - CamelFolderSummary *summary; - - gboolean has_uid_capability; - - gboolean has_search_capability; + gboolean can_hold_folders:1; + gboolean can_hold_messages:1; + gboolean has_summary_capability:1; + gboolean has_uid_capability:1; + gboolean has_search_capability:1; }; @@ -111,10 +155,6 @@ typedef struct { gpointer user_data, CamelException *ex); - void (*set_name) (CamelFolder *folder, - const gchar *name, - CamelException *ex); - const gchar * (*get_name) (CamelFolder *folder); const gchar * (*get_full_name) (CamelFolder *folder); @@ -206,6 +246,10 @@ typedef struct { gboolean (*search_complete)(CamelFolder *folder, int searchid, gboolean wait, CamelException *ex); void (*search_cancel) (CamelFolder *folder, int searchid, CamelException *ex); + /* moved the old summary stuff from camel-folder-summary.h here */ + GPtrArray * (*get_subfolder_info) (CamelFolder *, int first, int count); + GPtrArray * (*get_message_info) (CamelFolder *, int first, int count); + } CamelFolderClass; @@ -316,6 +360,13 @@ int camel_folder_search_by_expression(CamelFolder *folder, const char *expr gboolean camel_folder_search_complete(CamelFolder *folder, int searchid, gboolean wait, CamelException *ex); void camel_folder_search_cancel(CamelFolder *folder, int searchid, CamelException *ex); +/* summary info, from the old camel-folder-summary + FIXME: rename these slightly? */ +GPtrArray *camel_folder_summary_get_subfolder_info (CamelFolder *summary, + int first, int count); +GPtrArray *camel_folder_summary_get_message_info (CamelFolder *summary, + int first, int count); + #ifdef __cplusplus } #endif /* __cplusplus */ -- cgit v1.2.3