1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
5 * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 typedef struct _Folder Folder;
29 typedef struct _FolderClass FolderClass;
31 typedef struct _FolderItem FolderItem;
32 typedef struct _FolderUpdateData FolderUpdateData;
33 typedef struct _FolderItemUpdateData FolderItemUpdateData;
34 typedef struct _PersistPrefs PersistPrefs;
36 #define FOLDER(obj) ((Folder *)obj)
37 #define FOLDER_CLASS(obj) (FOLDER(obj)->klass)
38 #define FOLDER_TYPE(obj) (FOLDER(obj)->klass->type)
40 #define FOLDER_IS_LOCAL(obj) (FOLDER_TYPE(obj) == F_MH || \
41 FOLDER_TYPE(obj) == F_MBOX || \
42 FOLDER_TYPE(obj) == F_MAILDIR)
44 #define FOLDER_ITEM(obj) ((FolderItem *)obj)
46 #define FOLDER_UPDATE_HOOKLIST "folder_update"
47 #define FOLDER_ITEM_UPDATE_HOOKLIST "folder_item_update"
67 } SpecialFolderItemType;
97 F_MOVE_FAILED_DEST_IS_PARENT = -1,
98 F_MOVE_FAILED_DEST_IS_CHILD = -2,
99 F_MOVE_FAILED_DEST_OUTSIDE_MAILBOX = -3,
101 } FolderItemMoveResult;
105 FOLDER_ADD_FOLDER = 1 << 0,
106 FOLDER_REMOVE_FOLDER = 1 << 1,
107 FOLDER_TREE_CHANGED = 1 << 2,
108 FOLDER_ADD_FOLDERITEM = 1 << 3,
109 FOLDER_REMOVE_FOLDERITEM = 1 << 4,
110 FOLDER_RENAME_FOLDERITEM = 1 << 5
115 F_ITEM_UPDATE_MSGCNT = 1 << 0,
116 F_ITEM_UPDATE_CONTENT = 1 << 1,
117 F_ITEM_UPDATE_ADDMSG = 1 << 2,
118 F_ITEM_UPDATE_REMOVEMSG = 1 << 3,
119 F_ITEM_UPDATE_NAME = 1 << 4
120 } FolderItemUpdateFlags;
122 typedef void (*FolderUIFunc) (Folder *folder,
125 typedef void (*FolderDestroyNotify) (Folder *folder,
128 typedef void (*FolderItemFunc) (FolderItem *item,
132 #include "folder_item_prefs.h"
135 #include "msgcache.h"
137 #include "prefs_account.h"
144 PrefsAccount *account;
153 FolderUIFunc ui_func;
154 gpointer ui_func_data;
166 * A numeric identifier for the FolderClass. Will be removed in the future
170 * A string identifier for the FolderClass. Currently used in folderlist.xml.
171 * Should be lowercase.
175 * A string for the User Interface that identifies the FolderClass to the
176 * user. Can be upper and lowercase unlike the idstr.
180 /* virtual functions */
182 /* Folder funtions */
184 * Create a new \c Folder of this \c FolderClass.
186 * \param name The name of the new Folder
187 * \param path The path of the new Folder
188 * \return The new \c Folder, or \c NULL when creating the \c Folder
191 Folder *(*new_folder) (const gchar *name,
194 * Destroy a \c Folder of this \c FolderClass, frees all resources
195 * allocated by the Folder
197 * \param folder The \c Folder that should be destroyed.
199 void (*destroy_folder) (Folder *folder);
201 * Set the Folder's internal attributes from an \c XMLTag. Also sets the
202 * parameters of the root-FolderItem of the \c Folder. If \c NULL
203 * the default function of the basic \ยข FolderClass is used, so it
204 * must not be \c NULL if one of the parent \c FolderClasses has a \c set_xml
205 * function. In that case the parent \c FolderClass' \c set_xml function
206 * can be used or it has to be called with the \c folder and \c tag by
207 * the implementation.
209 * \param folder The \c Folder which's attributes should be updated
210 * \param tag The \c XMLTag containing the \c XMLAttrs for the attributes
212 void (*set_xml) (Folder *folder,
215 * Get an \c XMLTag for the attributes of the \c Folder and the root-FolderItem
216 * of the \c Folder. If \c NULL the default implementation for the basic
217 * FolderClass will be used, so it must not be \c NULL if one of the
218 * parent \c FolderClasses has it's own implementation for \c get_xml.
219 * In that case the parent FolderClass' \c get_xml function can be
220 * used or the \c XMLTag has to be fetched from the parent's \c get_xml
221 * function and then the \c FolderClass specific attributes can be
224 * \param Folder The \c Folder which's attributes should be set in the
225 * \c XMLTag's \c XMLAttrs
226 * \return XMLTag An \c XMLTag with \c XMLAttrs containing the \c Folder's
229 XMLTag *(*get_xml) (Folder *folder);
231 * Rebuild the folder tree from the folder's data
232 * \todo New implementations of MH and IMAP are actually syncronizing
233 * the tree with the folder by reusing the old \c FolderItems.
234 * Claws still destroys the old tree before calling this function.
236 * \param folder The folder which's tree should be rebuild
237 * \return 0 on success, a negative number otherwise
239 gint (*scan_tree) (Folder *folder);
241 gint (*create_tree) (Folder *folder);
243 /* FolderItem functions */
245 * Create a new \c FolderItem structure for the \c FolderClass.
246 * \c FolderClasses can have their own \c FolderItem structure with
249 * \param folder The \c Folder for that a \c FolderItem should be
251 * \return The new \c FolderItem or NULL in case of an error
253 FolderItem *(*item_new) (Folder *folder);
255 * Destroy a \c FolderItem from this \c FolderClass. The \c FolderClass
256 * has to free all private resources used by the \c FolderItem.
258 * \param folder The \c Folder of the \c FolderItem
259 * \param item The \c FolderItem that should be destroyed
261 void (*item_destroy) (Folder *folder,
264 * Set the \c FolderItem's internal attributes from an \c XMLTag. If
265 * \c NULL the default function of the basic \c FolderClass is used, so it
266 * must not be \c NULL if one of the parent \c FolderClasses has a \c item_set_xml
267 * function. In that case the parent \c FolderClass' \c item_set_xml function
268 * can be used or it has to be called with the \c folder, \c item and \c tag by
269 * the implementation.
271 * \param folder The \c Folder of the \c FolderItem
272 * \param item The \c FolderItems which's attributes should be set
273 * \param tag The \c XMLTag with \c XMLAttrs for the \c FolderItem's
276 void (*item_set_xml) (Folder *folder,
280 * Get an \c XMLTag for the attributes of the \c FolderItem If \c NULL
281 * the default implementation for the basic \c FolderClass will be used,
282 * so it must not be \c NULL if one of the parent \c FolderClasses has
283 * it's own implementation for \c item_get_xml. In that case the parent
284 * FolderClass' \c item_get_xml function can be used or the \c XMLTag
285 * has to be fetched from the parent's \c item_get_xml function and
286 * then the \c FolderClass specific attributes can be added to it.
288 * \param folder The \c Folder of the \c FolderItem
289 * \parem item The \c FolderItem which's attributes should be set in
290 * the \c XMLTag's \c XMLAttrs
291 * \return An \c XMLTag with \c XMLAttrs containing the \c FolderItem's
294 XMLTag *(*item_get_xml) (Folder *folder,
297 * Get a local path for the \c FolderItem where Sylpheed can save
298 * it's cache data. For local directory based folders this can be the
299 * real path. For other folders it can be the local cache directory.
301 * \param folder The \c Folder of the \c FolderItem
302 * \param item The \c FolderItem for that a path should be returned
303 * \return A path for the \c FolderItem
305 gchar *(*item_get_path) (Folder *folder,
308 * Create a new \c FolderItem. The function must use folder_item_append
309 * to add the new \c FolderItem to the folder tree
311 * \param folder The \c Folder in which a new \c FolderItem should be
313 * \param parent \c The parent \c FolderItem for the new \c FolderItem
314 * \parem name The name for the new \c FolderItem
315 * \return The new \c FolderItem
317 FolderItem *(*create_folder) (Folder *folder,
321 * Rename a \c FolderItem
323 * \param folder The \c Folder of the \c FolderItem that should be
325 * \param item The \c FolderItem that should be renamed
326 * \param name The new name of the \c FolderItem
327 * \return 0 on success, a negative number otherwise
329 gint (*rename_folder) (Folder *folder,
333 * Remove a \c FolderItem from the \c Folder
335 * \param folder The \c Folder that contains the \c FolderItem
336 * \param item The \c FolderItem that should be removed
337 * \return 0 on sucess, a negative number otherwise
339 gint (*remove_folder) (Folder *folder,
342 * Close a \c FolderItem. Called when the user deselects a
345 * \attention In Sylpheed-Main operations can only be done on the
346 * \c FolderItem that is opened in the SummaryView. This
347 * \c FolderItem will be closed when you select a new
348 * \c FolderItem in the FolderView. In Claws operations can
349 * be done any time on any folder and you should not expect
350 * that all \c FolderItems get closed after operations
352 * \param folder The \c Folder that contains the \c FolderItem
353 * \param item The \c FolderItem that should be closed
354 * \return 0 on success, a negative number otherwise
356 gint (*close) (Folder *folder,
359 * Get the list of message numbers for the messages in the \c FolderItem
361 * \param folder The \c Folder that contains the \c FolderItem
362 * \param item The \c FolderItem for which the message numbers should
364 * \param list Pointer to a GSList where message numbers have to be
365 * added. Because of the implementation of the GSList that
366 * changes the pointer of the GSList itself when the first
367 * item is added this is a pointer to a pointer to a
368 * GSList structure. Use *item = g_slist_...(*item, ...)
369 * operations to modify the list.
370 * \param old_uids_valid In some \c Folders the old UIDs can be invalid.
371 * Set this pointer to a gboolean to TRUE if the
372 * old UIDs are still valid, otherwise set it to
373 * FALSE and the folder system will discard it's
374 * cache data of the previously know UIDs
375 * \return The number of message numbers add to the list on success,
376 * a negative number otherwise.
378 gint (*get_num_list) (Folder *folder,
381 gboolean *old_uids_valid);
383 * Tell the folder system if a \c FolderItem should be scanned
384 * (cache data syncronized with the folder content) when it is required
385 * because the \c FolderItem's content changed. If NULL the folder
386 * system will not do automatic scanning of \c FolderItems
388 * \param folder The \c Folder that contains the \c FolderItem
389 * \param item The \c FolderItem which's content should be checked
390 * \return TRUE if the \c FolderItem should be scanned, FALSE otherwise
392 gboolean (*scan_required) (Folder *folder,
396 * Updates the known mtime of a folder
398 void (*set_mtime) (Folder *folder,
401 /* Message functions */
403 * Get a MsgInfo for a message in a \c FolderItem
405 * \param folder The \c Folder containing the message
406 * \param item The \c FolderItem containing the message
407 * \param num The message number of the message
408 * \return A pointer to a \c MsgInfo decribing the message or \c
409 * NULL in case of an error
411 MsgInfo *(*get_msginfo) (Folder *folder,
415 * Get \c MsgInfos for a list of message numbers
417 * \param folder The \c Folder containing the message
418 * \param item The \c FolderItem containing the message
419 * \param msgnum_list A list of message numbers for which the
420 * \c MsgInfos should be fetched
421 * \return A list of \c MsgInfos for the messages in the \c msgnum_list
422 * that really exist. Messages that are not found can simply
425 MsgInfoList *(*get_msginfos) (Folder *folder,
427 MsgNumberList *msgnum_list);
429 * Get the filename for a message. This can either be the real message
430 * file for local folders or a temporary file for remote folders.
432 * \param folder The \c Folder containing the message
433 * \param item The \c FolderItem containing the message
434 * \param num The message number of the message
435 * \return A string with the filename of the message file. The returned
436 * string has to be freed with \c g_free(). If message is not
437 * available return NULL.
439 gchar *(*fetch_msg) (Folder *folder,
442 gchar *(*fetch_msg_full) (Folder *folder,
448 * Add a single message file to a folder with the given flags (if
449 * flag handling is supported by the folder)
451 * \param folder The target \c Folder for the message
452 * \param dest the target \c FolderItem for the message
453 * \param file The file that contains the message
454 * \param flags The flags the new message should have in the folder
455 * \return 0 on success, a negative number otherwise
457 gint (*add_msg) (Folder *folder,
462 * Add multiple messages to a \c FolderItem. If NULL the folder
463 * system will add messages with \c add_msg one by one
465 * \param folder The target \c Folder for the messages
466 * \param dest the target \c FolderItem for the messages
467 * \param file_list A list of \c MsgFileInfos which contain the
468 * filenames and flags for the new messages
469 * \param relation Insert tuples of (MsgFileInfo, new message number) to
470 * provide feedback for the folder system which new
471 * message number a \c MsgFileInfo got in dest. Insert
472 * 0 if the new message number is unknown.
474 gint (*add_msgs) (Folder *folder,
477 GHashTable *relation);
479 * Copy a message to a FolderItem
481 * \param folder The \c Folder of the destination FolderItem
482 * \param dest The destination \c FolderItem for the message
483 * \param msginfo The message that should be copied
484 * \return The message number the copied message got, 0 if it is
485 * unknown because message numbers are assigned by an external
486 * system and not available after copying or a negative number
487 * if an error occuried
489 gint (*copy_msg) (Folder *folder,
493 * Copy multiple messages to a \c FolderItem. If \c NULL the folder
494 * system will use \c copy_msg to copy messages one by one.
496 * \param folder The \c Folder of the destination FolderItem
497 * \param dest The destination \c FolderItem for the message
498 * \param msglist A list of \c MsgInfos which should be copied to dest
499 * \param relation Insert tuples of (MsgInfo, new message number) to
500 * provide feedback for the folder system which new
501 * message number a \c MsgInfo got in dest. Insert
502 * 0 if the new message number is unknown.
503 * \return 0 on success, a negative number otherwise
505 gint (*copy_msgs) (Folder *folder,
507 MsgInfoList *msglist,
508 GHashTable *relation);
510 * Remove a message from a \c FolderItem.
512 * \param folder The \c Folder of the message
513 * \param item The \c FolderItem containing the message
514 * \param num The message number of the message
515 * \return 0 on success, a negative number otherwise
517 gint (*remove_msg) (Folder *folder,
520 gint (*remove_msgs) (Folder *folder,
522 MsgInfoList *msglist,
523 GHashTable *relation);
524 gint (*expunge) (Folder *folder,
527 * Remove all messages in a \ c FolderItem
529 * \param folder The \c Folder of the \c FolderItem
530 * \param item The \FolderItem which's messages should be deleted
531 * \return 0 on succes, a negative number otherwise
533 gint (*remove_all_msg) (Folder *folder,
536 * Check if a message has been modified by someone else
538 * \param folder The \c Folder of the message
539 * \param item The \c FolderItem containing the message
540 * \param msginfo The \c MsgInfo for the message that should be checked
541 * \return \c TRUE if the message was modified, \c FALSE otherwise
543 gboolean (*is_msg_changed) (Folder *folder,
547 * Update a message's flags in the folder data. If NULL only the
548 * internal flag management will be used. The function has to set
549 * \c msginfo->flags.perm_flags. It does not have to set the flags
550 * that it got as \c newflags. If a flag can not be set in this
551 * \c FolderClass the function can refuse to set it. Flags that are not
552 * supported by the \c FolderClass should not be refused. They will be
553 * managed by the internal cache in this case.
555 * \param folder The \c Folder of the message
556 * \param item The \c FolderItem of the message
557 * \param msginfo The \c MsgInfo for the message which's flags should be
559 * \param newflags The flags the message should get
561 void (*change_flags) (Folder *folder,
564 MsgPermFlags newflags);
566 * Get the flags for a list of messages. Flags that are not supported
567 * by the folder should be preserved. They can be copied from
568 * \c msginfo->flags.perm_flags
570 * \param folder The \c Folder of the messages
571 * \param item The \c FolderItem of the messages
572 * \param msglist The list of \c MsgInfos for which the flags should
574 * \param msgflags A \c GRelation for tuples of (MsgInfo, new permanent
575 * flags for MsgInfo). Add tuples for the messages in msglist
576 * \return 0 on success, a negative number otherwise
578 gint (*get_flags) (Folder *folder,
580 MsgInfoList *msglist,
581 GHashTable *msgflags);
583 /* Sets batch mode for a FolderItem. It means that numerous flags updates
584 * could follow, and the FolderClass implementation can cache them in order
585 * to process them later when set_false will be called again with the
586 * batch parameter set to FALSE.
588 void (*set_batch) (Folder *folder,
591 /* Called when switching offline or asking for synchronisation. the imple
592 * mentation should do what's necessary to be able to read mails present
593 * in the FolderItem at this time with no network connectivity.
594 * Days: max number of days of mail to fetch.
596 void (*synchronise) (FolderItem *item,
599 /* Passed from claws-mail --subscribe scheme://uri. Implementations
600 * should check if they handle this type of URI, and return TRUE in this
601 * case after having subscribed it.
603 gboolean (*subscribe) (Folder *folder,
606 /* Gets the preferred sort key and type for a folderclass. */
607 void (*get_sort_type) (Folder *folder,
608 FolderSortKey *sort_key,
609 FolderSortType *sort_type);
611 /* Copies internal FolderItem data from one folderItem to another. Used
612 * when moving folders (this move is in reality a folder creation, content
613 * move, folder delettion).
615 void (*copy_private_data) (Folder *folder,
619 void (*remove_cached_msg) (Folder *folder,
622 void (*commit_tags) (FolderItem *item,
626 void (*item_opened) (FolderItem *item);
627 void (*item_closed) (FolderItem *item);
632 ITEM_SCANNING_WITH_FLAGS,
638 SpecialFolderItemType stype;
640 gchar *name; /* UTF-8 */
641 gchar *path; /* UTF-8 */
648 gint unreadmarked_msgs;
661 gboolean cache_dirty;
666 guint no_sub : 1; /* no child allowed? */
667 guint no_select : 1; /* not selectable? */
668 guint collapsed : 1; /* collapsed item */
669 guint thread_collapsed : 1; /* collapsed item */
670 guint threaded : 1; /* threaded folder view */
671 guint hide_read_msgs : 1; /* hide read messages */
672 guint ret_rcpt : 1; /* return receipt */
673 guint search_match : 1;
674 guint hide_del_msgs : 1; /* hide deleted messages */
675 guint hide_read_threads : 1; /* hide threads with only read messages */
678 guint opened : 1; /* opened by summary view */
679 FolderItemUpdateFlags update_flags; /* folderview for this folder should be updated */
681 FolderSortKey sort_key;
682 FolderSortType sort_type;
688 PrefsAccount *account;
696 FolderItemPrefs * prefs;
698 /* for faster search of special parents */
699 SpecialFolderItemType parent_stype;
700 gboolean processing_pending;
707 FolderSortKey sort_key;
708 FolderSortType sort_type;
710 guint thread_collapsed : 1;
712 guint hide_read_msgs : 1; /* CLAWS */
713 guint ret_rcpt : 1; /* CLAWS */
714 guint hide_del_msgs : 1; /* CLAWS */
715 guint hide_read_threads : 1;
718 struct _FolderUpdateData
721 FolderUpdateFlags update_flags;
725 struct _FolderItemUpdateData
728 FolderItemUpdateFlags update_flags;
732 void folder_system_init (void);
733 void folder_register_class (FolderClass *klass);
734 void folder_unregister_class (FolderClass *klass);
735 Folder *folder_new (FolderClass *type,
738 void folder_init (Folder *folder,
741 void folder_destroy (Folder *folder);
743 void folder_set_xml (Folder *folder,
745 XMLTag *folder_get_xml (Folder *folder);
747 FolderItem *folder_item_new (Folder *folder,
750 void folder_item_append (FolderItem *parent,
752 void folder_item_remove (FolderItem *item);
753 void folder_item_remove_children (FolderItem *item);
754 void folder_item_destroy (FolderItem *item);
755 FolderItem *folder_item_parent (FolderItem *item);
757 void folder_item_set_xml (Folder *folder,
760 XMLTag *folder_item_get_xml (Folder *folder,
763 void folder_set_ui_func (Folder *folder,
766 void folder_set_name (Folder *folder,
768 void folder_set_sort (Folder *folder,
770 void folder_tree_destroy (Folder *folder);
772 void folder_add (Folder *folder);
773 void folder_remove (Folder *folder);
775 GList *folder_get_list (void);
776 gint folder_read_list (void);
777 void folder_write_list (void);
778 void folder_scan_tree (Folder *folder, gboolean rebuild);
779 void folder_fast_scan_tree (Folder *folder);
780 FolderItem *folder_create_folder(FolderItem *parent, const gchar *name);
781 gint folder_item_rename (FolderItem *item, gchar *newname);
782 void folder_update_op_count (void);
783 void folder_func_to_all_folders (FolderItemFunc function,
785 void folder_count_total_msgs(guint *new_msgs, guint *unread_msgs,
786 guint *unreadmarked_msgs, guint *marked_msgs,
787 guint *total_msgs, guint *replied_msgs,
788 guint *forwarded_msgs, guint *locked_msgs,
789 guint *ignored_msgs, guint *watched_msgs);
790 gchar *folder_get_status (GPtrArray *folders,
793 Folder *folder_find_from_identifier (const gchar *identifier);
794 Folder *folder_find_from_path (const gchar *path);
795 Folder *folder_find_from_name (const gchar *name,
797 FolderItem *folder_find_item_from_path (const gchar *path);
798 FolderItem *folder_find_item_from_real_path (const gchar *path);
799 FolderClass *folder_get_class_from_string (const gchar *str);
800 FolderItem *folder_find_child_item_by_name (FolderItem *item,
802 /* return value is locale charset */
803 gchar *folder_get_identifier (Folder *folder);
804 /* return value is locale charset */
805 gchar *folder_item_get_identifier (FolderItem *item);
806 FolderItem *folder_find_item_from_identifier (const gchar *identifier);
807 FolderItem *folder_get_item_from_identifier (const gchar *identifier);
808 gchar *folder_item_get_name (FolderItem *item);
810 FolderItem *folder_get_default_inbox (void);
811 FolderItem *folder_get_default_inbox_for_class(FolderType type);
812 FolderItem *folder_get_default_outbox (void);
813 FolderItem *folder_get_default_outbox_for_class(FolderType type);
814 FolderItem *folder_get_default_draft (void);
815 FolderItem *folder_get_default_draft_for_class(FolderType type);
816 FolderItem *folder_get_default_queue (void);
817 FolderItem *folder_get_default_queue_for_class(FolderType type);
818 FolderItem *folder_get_default_trash (void);
819 FolderItem *folder_get_default_trash_for_class(FolderType type);
820 FolderItem *folder_get_default_processing (void);
821 void folder_set_missing_folders (void);
822 void folder_unref_account_all (PrefsAccount *account);
824 /* return value is locale encoded file name */
825 gchar *folder_item_get_path (FolderItem *item);
827 gint folder_item_open (FolderItem *item);
828 gint folder_item_close (FolderItem *item);
829 gint folder_item_scan (FolderItem *item);
830 gint folder_item_scan_full (FolderItem *item,
832 MsgInfo *folder_item_get_msginfo (FolderItem *item,
834 MsgInfo *folder_item_get_msginfo_by_msgid(FolderItem *item,
836 GSList *folder_item_get_msg_list (FolderItem *item);
837 /* return value is locale charset */
838 gchar *folder_item_fetch_msg (FolderItem *item,
840 gchar *folder_item_fetch_msg_full (FolderItem *item,
842 gboolean get_headers,
844 gint folder_item_add_msg (FolderItem *dest,
847 gboolean remove_source);
848 gint folder_item_add_msgs (FolderItem *dest,
850 gboolean remove_source);
851 gint folder_item_move_to (FolderItem *src,
853 FolderItem **new_item,
855 gint folder_item_move_msg (FolderItem *dest,
857 gint folder_item_move_msgs (FolderItem *dest,
859 gint folder_item_copy_msg (FolderItem *dest,
861 gint folder_item_copy_msgs (FolderItem *dest,
863 gint folder_item_remove_msg (FolderItem *item,
865 gint folder_item_remove_msgs (FolderItem *item,
867 gint folder_item_expunge (FolderItem *item);
868 gint folder_item_remove_all_msg (FolderItem *item);
869 void folder_item_change_msg_flags (FolderItem *item,
871 MsgPermFlags newflags);
872 gboolean folder_item_is_msg_changed (FolderItem *item,
875 void folder_clean_cache_memory (FolderItem *protected_item);
876 void folder_clean_cache_memory_force (void);
877 void folder_item_write_cache (FolderItem *item);
879 void folder_item_apply_processing (FolderItem *item);
881 void folder_item_update (FolderItem *item,
882 FolderItemUpdateFlags update_flags);
883 void folder_item_update_recursive (FolderItem *item,
884 FolderItemUpdateFlags update_flags);
885 void folder_item_update_freeze (void);
886 void folder_item_update_thaw (void);
887 void folder_item_set_batch (FolderItem *item, gboolean batch);
888 gboolean folder_has_parent_of_type (FolderItem *item, SpecialFolderItemType type);
889 void folder_synchronise (Folder *folder);
890 gboolean folder_want_synchronise (Folder *folder);
891 gboolean folder_subscribe (const gchar *uri);
892 gboolean folder_have_mailbox (void);
893 gboolean folder_item_free_cache (FolderItem *item, gboolean force);
894 void folder_item_change_type (FolderItem *item,
895 SpecialFolderItemType newtype);
896 gboolean folder_get_sort_type (Folder *folder,
897 FolderSortKey *sort_key,
898 FolderSortType *sort_type);
899 void folder_item_synchronise (FolderItem *item);
900 void folder_item_discard_cache (FolderItem *item);
901 void folder_item_commit_tags(FolderItem *item, MsgInfo *msginfo, GSList *tags_set, GSList *tags_unset);
903 #endif /* __FOLDER_H__ */