diff options
author | Dan Winship <danw@src.gnome.org> | 2000-10-03 03:08:20 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-10-03 03:08:20 +0800 |
commit | e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2 (patch) | |
tree | e70ca64851c0167f959a9e6c0c38179cd0de102b /camel/camel-folder.c | |
parent | 46d07e9e465e336a5c39d8c27c846cb380fbc6fb (diff) | |
download | gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.gz gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.tar.zst gsoc2013-evolution-e9dc30dbf0c018bbc845f253bfe0b26baddbeaf2.zip |
Remove camel_folder_{get,free}_subfolder_info, as we want to be able to
* camel-folder.[ch]: Remove
camel_folder_{get,free}_subfolder_info, as we want to be able to
scan the whole subfolder tree without having to open any folders,
so this needs to be in CamelStore. Remove can_hold_folders and
can_hold_messages flags; things that don't hold messages are no
longer considered CamelFolders.
* camel-folder-summary.[ch]: Remove CamelFolderInfo stuff.
* camel-store.[ch]: Add camel_store_{get,free}_folder_info, as
well as camel_store_free_folder_info_full and ..._nop for default
implementations, and camel_folder_info_free and
camel_folder_info_build as convenience functions. Turn
CamelFolderInfo into a tree structure and also add an "url"
member.
* providers/*/camel-*-folder.c: Remove subfolder_info and can_hold
stuff.
* providers/*/camel-*-store.c: Add folder_info stuff.
* providers/imap/camel-imap-folder.c (imap_summary_free): Free the
summary elements with camel_message_info_free, not
camel_folder_info_free. Oops.
* providers/imap/camel-imap-utils.c: const poison
svn path=/trunk/; revision=5663
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r-- | camel/camel-folder.c | 86 |
1 files changed, 7 insertions, 79 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c index 2904ac26d9..9b38f79e53 100644 --- a/camel/camel-folder.c +++ b/camel/camel-folder.c @@ -47,8 +47,6 @@ static const gchar *get_name (CamelFolder *folder); static const gchar *get_full_name (CamelFolder *folder); static CamelStore *get_parent_store (CamelFolder *folder); -static gboolean can_hold_folders (CamelFolder *folder); -static gboolean can_hold_messages (CamelFolder *folder); static guint32 get_permanent_flags (CamelFolder *folder); static guint32 get_message_flags (CamelFolder *folder, const char *uid); static void set_message_flags (CamelFolder *folder, const char *uid, @@ -59,10 +57,6 @@ static void set_message_user_flag (CamelFolder *folder, const char *uid, static const char *get_message_user_tag(CamelFolder *folder, const char *uid, const char *name); static void set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, const char *value); -static GPtrArray *get_subfolder_info (CamelFolder *folder); -static void free_subfolder_info (CamelFolder *folder, - GPtrArray *array); - static gint get_message_count (CamelFolder *folder); static gint get_unread_message_count (CamelFolder *folder); @@ -126,10 +120,6 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class) camel_folder_class->get_name = get_name; camel_folder_class->get_full_name = get_full_name; camel_folder_class->get_parent_store = get_parent_store; - camel_folder_class->can_hold_folders = can_hold_folders; - camel_folder_class->can_hold_messages = can_hold_messages; - camel_folder_class->get_subfolder_info = get_subfolder_info; - camel_folder_class->free_subfolder_info = free_subfolder_info; 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; @@ -330,67 +320,6 @@ camel_folder_get_full_name (CamelFolder *folder) } -static gboolean -can_hold_folders (CamelFolder * folder) -{ - return folder->can_hold_folders; -} - -static gboolean -can_hold_messages (CamelFolder * folder) -{ - return folder->can_hold_messages; -} - - -static GPtrArray * -get_subfolder_info (CamelFolder *folder) -{ - g_warning ("CamelFolder::get_subfolder_info not implemented for `%s'", - camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))); - return NULL; -} - -/** - * camel_folder_get_subfolder_info: - * @folder: the folder - * - * Return value: an array containing a CamelFolderInfo for each of - * @folder's subfolders. The array should not be modified and must be - * freed with camel_folder_free_subfolder_info(). - **/ -GPtrArray * -camel_folder_get_subfolder_info (CamelFolder *folder) -{ - g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL); - - return CF_CLASS (folder)->get_subfolder_info (folder); -} - - -static void -free_subfolder_info (CamelFolder *folder, GPtrArray *array) -{ - g_warning ("CamelFolder::free_subfolder_info not implemented " - "for `%s'", camel_type_to_name (CAMEL_OBJECT_GET_TYPE (folder))); -} - -/** - * camel_folder_free_subfolder_info: - * @folder: folder object - * @array: the array of subfolder info to free - * - * Frees the array of info returned by camel_folder_get_subfolder_info(). - **/ -void -camel_folder_free_subfolder_info (CamelFolder *folder, GPtrArray *array) -{ - g_return_if_fail (CAMEL_IS_FOLDER (folder)); - - CF_CLASS (folder)->free_subfolder_info (folder, array); -} - - static CamelStore * get_parent_store (CamelFolder * folder) { @@ -1152,12 +1081,11 @@ message_changed (CamelObject *obj, /*const char *uid*/gpointer event_data) /** * camel_folder_free_nop: * @folder: a folder - * @array: an array of uids, CamelFolderInfo, or CamelMessageInfo + * @array: an array of uids or CamelMessageInfo * * "Frees" the provided array by doing nothing. Used by CamelFolder - * subclasses as an implementation for free_uids, free_summary, - * or free_subfolder_info when the returned array is "static" - * information and should not be freed. + * subclasses as an implementation for free_uids, or free_summary when + * the returned array is "static" information and should not be freed. **/ void camel_folder_free_nop (CamelFolder *folder, GPtrArray *array) @@ -1168,12 +1096,12 @@ camel_folder_free_nop (CamelFolder *folder, GPtrArray *array) /** * camel_folder_free_shallow: * @folder: a folder - * @array: an array of uids, CamelFolderInfo, or CamelMessageInfo + * @array: an array of uids or CamelMessageInfo * * Frees the provided array but not its contents. Used by CamelFolder - * subclasses as an implementation for free_uids, free_summary, or - * free_subfolder_info when the returned array needs to be freed - * but its contents come from "static" information. + * subclasses as an implementation for free_uids or free_summary when + * the returned array needs to be freed but its contents come from + * "static" information. **/ void camel_folder_free_shallow (CamelFolder *folder, GPtrArray *array) |