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-2007 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 2 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, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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
;
95 F_MOVE_FAILED_DEST_IS_PARENT
= -1,
96 F_MOVE_FAILED_DEST_IS_CHILD
= -2,
97 F_MOVE_FAILED_DEST_OUTSIDE_MAILBOX
= -3,
99 } FolderItemMoveResult
;
103 FOLDER_ADD_FOLDER
= 1 << 0,
104 FOLDER_REMOVE_FOLDER
= 1 << 1,
105 FOLDER_TREE_CHANGED
= 1 << 2,
106 FOLDER_ADD_FOLDERITEM
= 1 << 3,
107 FOLDER_REMOVE_FOLDERITEM
= 1 << 4,
108 FOLDER_RENAME_FOLDERITEM
= 1 << 5
113 F_ITEM_UPDATE_MSGCNT
= 1 << 0,
114 F_ITEM_UPDATE_CONTENT
= 1 << 1,
115 F_ITEM_UPDATE_ADDMSG
= 1 << 2,
116 F_ITEM_UPDATE_REMOVEMSG
= 1 << 3,
117 F_ITEM_UPDATE_NAME
= 1 << 4
118 } FolderItemUpdateFlags
;
120 typedef void (*FolderUIFunc
) (Folder
*folder
,
123 typedef void (*FolderDestroyNotify
) (Folder
*folder
,
126 typedef void (*FolderItemFunc
) (FolderItem
*item
,
130 #include "folder_item_prefs.h"
133 #include "msgcache.h"
135 #include "prefs_account.h"
142 PrefsAccount
*account
;
151 FolderUIFunc ui_func
;
152 gpointer ui_func_data
;
164 * A numeric identifier for the FolderClass. Will be removed in the future
168 * A string identifier for the FolderClass. Currently used in folderlist.xml.
169 * Should be lowercase.
173 * A string for the User Interface that identifies the FolderClass to the
174 * user. Can be upper and lowercase unlike the idstr.
178 /* virtual functions */
180 /* Folder funtions */
182 * Create a new \c Folder of this \c FolderClass.
184 * \param name The name of the new Folder
185 * \param path The path of the new Folder
186 * \return The new \c Folder, or \c NULL when creating the \c Folder
189 Folder
*(*new_folder
) (const gchar
*name
,
192 * Destroy a \c Folder of this \c FolderClass, frees all resources
193 * allocated by the Folder
195 * \param folder The \c Folder that should be destroyed.
197 void (*destroy_folder
) (Folder
*folder
);
199 * Set the Folder's internal attributes from an \c XMLTag. Also sets the
200 * parameters of the root-FolderItem of the \c Folder. If \c NULL
201 * the default function of the basic \ยข FolderClass is used, so it
202 * must not be \c NULL if one of the parent \c FolderClasses has a \c set_xml
203 * function. In that case the parent \c FolderClass' \c set_xml function
204 * can be used or it has to be called with the \c folder and \c tag by
205 * the implementation.
207 * \param folder The \c Folder which's attributes should be updated
208 * \param tag The \c XMLTag containing the \c XMLAttrs for the attributes
210 void (*set_xml
) (Folder
*folder
,
213 * Get an \c XMLTag for the attributes of the \c Folder and the root-FolderItem
214 * of the \c Folder. If \c NULL the default implementation for the basic
215 * FolderClass will be used, so it must not be \c NULL if one of the
216 * parent \c FolderClasses has it's own implementation for \c get_xml.
217 * In that case the parent FolderClass' \c get_xml function can be
218 * used or the \c XMLTag has to be fetched from the parent's \c get_xml
219 * function and then the \c FolderClass specific attributes can be
222 * \param Folder The \c Folder which's attributes should be set in the
223 * \c XMLTag's \c XMLAttrs
224 * \return XMLTag An \c XMLTag with \c XMLAttrs containing the \c Folder's
227 XMLTag
*(*get_xml
) (Folder
*folder
);
229 * Rebuild the folder tree from the folder's data
230 * \todo New implementations of MH and IMAP are actually syncronizing
231 * the tree with the folder by reusing the old \c FolderItems.
232 * Claws still destroys the old tree before calling this function.
234 * \param folder The folder which's tree should be rebuild
235 * \return 0 on success, a negative number otherwise
237 gint (*scan_tree
) (Folder
*folder
);
239 gint (*create_tree
) (Folder
*folder
);
241 /* FolderItem functions */
243 * Create a new \c FolderItem structure for the \c FolderClass.
244 * \c FolderClasses can have their own \c FolderItem structure with
247 * \param folder The \c Folder for that a \c FolderItem should be
249 * \return The new \c FolderItem or NULL in case of an error
251 FolderItem
*(*item_new
) (Folder
*folder
);
253 * Destroy a \c FolderItem from this \c FolderClass. The \c FolderClass
254 * has to free all private resources used by the \c FolderItem.
256 * \param folder The \c Folder of the \c FolderItem
257 * \param item The \c FolderItem that should be destroyed
259 void (*item_destroy
) (Folder
*folder
,
262 * Set the \c FolderItem's internal attributes from an \c XMLTag. If
263 * \c NULL the default function of the basic \c FolderClass is used, so it
264 * must not be \c NULL if one of the parent \c FolderClasses has a \c item_set_xml
265 * function. In that case the parent \c FolderClass' \c item_set_xml function
266 * can be used or it has to be called with the \c folder, \c item and \c tag by
267 * the implementation.
269 * \param folder The \c Folder of the \c FolderItem
270 * \param item The \c FolderItems which's attributes should be set
271 * \param tag The \c XMLTag with \c XMLAttrs for the \c FolderItem's
274 void (*item_set_xml
) (Folder
*folder
,
278 * Get an \c XMLTag for the attributes of the \c FolderItem If \c NULL
279 * the default implementation for the basic \c FolderClass will be used,
280 * so it must not be \c NULL if one of the parent \c FolderClasses has
281 * it's own implementation for \c item_get_xml. In that case the parent
282 * FolderClass' \c item_get_xml function can be used or the \c XMLTag
283 * has to be fetched from the parent's \c item_get_xml function and
284 * then the \c FolderClass specific attributes can be added to it.
286 * \param folder The \c Folder of the \c FolderItem
287 * \parem item The \c FolderItem which's attributes should be set in
288 * the \c XMLTag's \c XMLAttrs
289 * \return An \c XMLTag with \c XMLAttrs containing the \c FolderItem's
292 XMLTag
*(*item_get_xml
) (Folder
*folder
,
295 * Get a local path for the \c FolderItem where Sylpheed can save
296 * it's cache data. For local directory based folders this can be the
297 * real path. For other folders it can be the local cache directory.
299 * \param folder The \c Folder of the \c FolderItem
300 * \param item The \c FolderItem for that a path should be returned
301 * \return A path for the \c FolderItem
303 gchar
*(*item_get_path
) (Folder
*folder
,
306 * Create a new \c FolderItem. The function must use folder_item_append
307 * to add the new \c FolderItem to the folder tree
309 * \param folder The \c Folder in which a new \c FolderItem should be
311 * \param parent \c The parent \c FolderItem for the new \c FolderItem
312 * \parem name The name for the new \c FolderItem
313 * \return The new \c FolderItem
315 FolderItem
*(*create_folder
) (Folder
*folder
,
319 * Rename a \c FolderItem
321 * \param folder The \c Folder of the \c FolderItem that should be
323 * \param item The \c FolderItem that should be renamed
324 * \param name The new name of the \c FolderItem
325 * \return 0 on success, a negative number otherwise
327 gint (*rename_folder
) (Folder
*folder
,
331 * Remove a \c FolderItem from the \c Folder
333 * \param folder The \c Folder that contains the \c FolderItem
334 * \param item The \c FolderItem that should be removed
335 * \return 0 on sucess, a negative number otherwise
337 gint (*remove_folder
) (Folder
*folder
,
340 * Close a \c FolderItem. Called when the user deselects a
343 * \attention In Sylpheed-Main operations can only be done on the
344 * \c FolderItem that is opened in the SummaryView. This
345 * \c FolderItem will be closed when you select a new
346 * \c FolderItem in the FolderView. In Claws operations can
347 * be done any time on any folder and you should not expect
348 * that all \c FolderItems get closed after operations
350 * \param folder The \c Folder that contains the \c FolderItem
351 * \param item The \c FolderItem that should be closed
352 * \return 0 on success, a negative number otherwise
354 gint (*close
) (Folder
*folder
,
357 * Get the list of message numbers for the messages in the \c FolderItem
359 * \param folder The \c Folder that contains the \c FolderItem
360 * \param item The \c FolderItem for which the message numbers should
362 * \param list Pointer to a GSList where message numbers have to be
363 * added. Because of the implementation of the GSList that
364 * changes the pointer of the GSList itself when the first
365 * item is added this is a pointer to a pointer to a
366 * GSList structure. Use *item = g_slist_...(*item, ...)
367 * operations to modify the list.
368 * \param old_uids_valid In some \c Folders the old UIDs can be invalid.
369 * Set this pointer to a gboolean to TRUE if the
370 * old UIDs are still valid, otherwise set it to
371 * FALSE and the folder system will discard it's
372 * cache data of the previously know UIDs
373 * \return The number of message numbers add to the list on success,
374 * a negative number otherwise.
376 gint (*get_num_list
) (Folder
*folder
,
379 gboolean
*old_uids_valid
);
381 * Tell the folder system if a \c FolderItem should be scanned
382 * (cache data syncronized with the folder content) when it is required
383 * because the \c FolderItem's content changed. If NULL the folder
384 * system will not do automatic scanning of \c FolderItems
386 * \param folder The \c Folder that contains the \c FolderItem
387 * \param item The \c FolderItem which's content should be checked
388 * \return TRUE if the \c FolderItem should be scanned, FALSE otherwise
390 gboolean (*scan_required
) (Folder
*folder
,
393 /* Message functions */
395 * Get a MsgInfo for a message in a \c FolderItem
397 * \param folder The \c Folder containing the message
398 * \param item The \c FolderItem containing the message
399 * \param num The message number of the message
400 * \return A pointer to a \c MsgInfo decribing the message or \c
401 * NULL in case of an error
403 MsgInfo
*(*get_msginfo
) (Folder
*folder
,
407 * Get \c MsgInfos for a list of message numbers
409 * \param folder The \c Folder containing the message
410 * \param item The \c FolderItem containing the message
411 * \param msgnum_list A list of message numbers for which the
412 * \c MsgInfos should be fetched
413 * \return A list of \c MsgInfos for the messages in the \c msgnum_list
414 * that really exist. Messages that are not found can simply
417 MsgInfoList
*(*get_msginfos
) (Folder
*folder
,
419 MsgNumberList
*msgnum_list
);
421 * Get the filename for a message. This can either be the real message
422 * file for local folders or a temporary file for remote folders.
424 * \param folder The \c Folder containing the message
425 * \param item The \c FolderItem containing the message
426 * \param num The message number of the message
427 * \return A string with the filename of the message file. The returned
428 * string has to be freed with \c g_free(). If message is not
429 * available return NULL.
431 gchar
*(*fetch_msg
) (Folder
*folder
,
434 gchar
*(*fetch_msg_full
) (Folder
*folder
,
440 * Add a single message file to a folder with the given flags (if
441 * flag handling is supported by the folder)
443 * \param folder The target \c Folder for the message
444 * \param dest the target \c FolderItem for the message
445 * \param file The file that contains the message
446 * \param flags The flags the new message should have in the folder
447 * \return 0 on success, a negative number otherwise
449 gint (*add_msg
) (Folder
*folder
,
454 * Add multiple messages to a \c FolderItem. If NULL the folder
455 * system will add messages with \c add_msg one by one
457 * \param folder The target \c Folder for the messages
458 * \param dest the target \c FolderItem for the messages
459 * \param file_list A list of \c MsgFileInfos which contain the
460 * filenames and flags for the new messages
461 * \param relation Insert tuples of (MsgFileInfo, new message number) to
462 * provide feedback for the folder system which new
463 * message number a \c MsgFileInfo got in dest. Insert
464 * 0 if the new message number is unknown.
466 gint (*add_msgs
) (Folder
*folder
,
469 GRelation
*relation
);
471 * Copy a message to a FolderItem
473 * \param folder The \c Folder of the destination FolderItem
474 * \param dest The destination \c FolderItem for the message
475 * \param msginfo The message that should be copied
476 * \return The message number the copied message got, 0 if it is
477 * unknown because message numbers are assigned by an external
478 * system and not available after copying or a negative number
479 * if an error occuried
481 gint (*copy_msg
) (Folder
*folder
,
485 * Copy multiple messages to a \c FolderItem. If \c NULL the folder
486 * system will use \c copy_msg to copy messages one by one.
488 * \param folder The \c Folder of the destination FolderItem
489 * \param dest The destination \c FolderItem for the message
490 * \param msglist A list of \c MsgInfos which should be copied to dest
491 * \param relation Insert tuples of (MsgInfo, new message number) to
492 * provide feedback for the folder system which new
493 * message number a \c MsgInfo got in dest. Insert
494 * 0 if the new message number is unknown.
495 * \return 0 on success, a negative number otherwise
497 gint (*copy_msgs
) (Folder
*folder
,
499 MsgInfoList
*msglist
,
500 GRelation
*relation
);
502 * Remove a message from a \c FolderItem.
504 * \param folder The \c Folder of the message
505 * \param item The \c FolderItem containing the message
506 * \param num The message number of the message
507 * \return 0 on success, a negative number otherwise
509 gint (*remove_msg
) (Folder
*folder
,
512 gint (*remove_msgs
) (Folder
*folder
,
514 MsgInfoList
*msglist
,
515 GRelation
*relation
);
517 * Remove all messages in a \ c FolderItem
519 * \param folder The \c Folder of the \c FolderItem
520 * \param item The \FolderItem which's messages should be deleted
521 * \return 0 on succes, a negative number otherwise
523 gint (*remove_all_msg
) (Folder
*folder
,
526 * Check if a message has been modified by someone else
528 * \param folder The \c Folder of the message
529 * \param item The \c FolderItem containing the message
530 * \param msginfo The \c MsgInfo for the message that should be checked
531 * \return \c TRUE if the message was modified, \c FALSE otherwise
533 gboolean (*is_msg_changed
) (Folder
*folder
,
537 * Update a message's flags in the folder data. If NULL only the
538 * internal flag management will be used. The function has to set
539 * \c msginfo->flags.perm_flags. It does not have to set the flags
540 * that it got as \c newflags. If a flag can not be set in this
541 * \c FolderClass the function can refuse to set it. Flags that are not
542 * supported by the \c FolderClass should not be refused. They will be
543 * managed by the internal cache in this case.
545 * \param folder The \c Folder of the message
546 * \param item The \c FolderItem of the message
547 * \param msginfo The \c MsgInfo for the message which's flags should be
549 * \param newflags The flags the message should get
551 void (*change_flags
) (Folder
*folder
,
554 MsgPermFlags newflags
);
556 * Get the flags for a list of messages. Flags that are not supported
557 * by the folder should be preserved. They can be copied from
558 * \c msginfo->flags.perm_flags
560 * \param folder The \c Folder of the messages
561 * \param item The \c FolderItem of the messages
562 * \param msglist The list of \c MsgInfos for which the flags should
564 * \param msgflags A \c GRelation for tuples of (MsgInfo, new permanent
565 * flags for MsgInfo). Add tuples for the messages in msglist
566 * \return 0 on success, a negative number otherwise
568 gint (*get_flags
) (Folder
*folder
,
570 MsgInfoList
*msglist
,
571 GRelation
*msgflags
);
573 /* Sets batch mode for a FolderItem. It means that numerous flags updates
574 * could follow, and the FolderClass implementation can cache them in order
575 * to process them later when set_false will be called again with the
576 * batch parameter set to FALSE.
578 void (*set_batch
) (Folder
*folder
,
581 /* Called when switching offline or asking for synchronisation. the imple
582 * mentation should do what's necessary to be able to read mails present
583 * in the FolderItem at this time with no network connectivity.
585 void (*synchronise
) (FolderItem
*item
);
587 /* Passed from claws-mail --subscribe scheme://uri. Implementations
588 * should check if they handle this type of URI, and return TRUE in this
589 * case after having subscribed it.
591 gboolean (*subscribe
) (Folder
*folder
,
594 /* Gets the preferred sort key and type for a folderclass. */
595 void (*get_sort_type
) (Folder
*folder
,
596 FolderSortKey
*sort_key
,
597 FolderSortType
*sort_type
);
599 /* Copies internal FolderItem data from one folderItem to another. Used
600 * when moving folders (this move is in reality a folder creation, content
601 * move, folder delettion).
603 void (*copy_private_data
) (Folder
*folder
,
610 SpecialFolderItemType stype
;
612 gchar
*name
; /* UTF-8 */
613 gchar
*path
; /* UTF-8 */
620 gint unreadmarked_msgs
;
630 guint no_sub
: 1; /* no child allowed? */
631 guint no_select
: 1; /* not selectable? */
632 guint collapsed
: 1; /* collapsed item */
633 guint thread_collapsed
: 1; /* collapsed item */
634 guint threaded
: 1; /* threaded folder view */
635 guint hide_read_msgs
: 1; /* hide read messages */
636 guint ret_rcpt
: 1; /* return receipt */
637 guint search_match
: 1;
640 guint opened
: 1; /* opened by summary view */
641 FolderItemUpdateFlags update_flags
; /* folderview for this folder should be updated */
643 FolderSortKey sort_key
;
644 FolderSortType sort_type
;
650 PrefsAccount
*account
;
658 FolderItemPrefs
* prefs
;
660 /* for faster search of special parents */
661 SpecialFolderItemType parent_stype
;
662 gboolean processing_pending
;
669 FolderSortKey sort_key
;
670 FolderSortType sort_type
;
672 guint thread_collapsed
: 1;
674 guint hide_read_msgs
: 1; /* CLAWS */
675 guint ret_rcpt
: 1; /* CLAWS */
678 struct _FolderUpdateData
681 FolderUpdateFlags update_flags
;
685 struct _FolderItemUpdateData
688 FolderItemUpdateFlags update_flags
;
692 void folder_system_init (void);
693 void folder_register_class (FolderClass
*klass
);
694 void folder_unregister_class (FolderClass
*klass
);
695 Folder
*folder_new (FolderClass
*type
,
698 void folder_init (Folder
*folder
,
701 void folder_destroy (Folder
*folder
);
703 void folder_set_xml (Folder
*folder
,
705 XMLTag
*folder_get_xml (Folder
*folder
);
707 FolderItem
*folder_item_new (Folder
*folder
,
710 void folder_item_append (FolderItem
*parent
,
712 void folder_item_remove (FolderItem
*item
);
713 void folder_item_remove_children (FolderItem
*item
);
714 void folder_item_destroy (FolderItem
*item
);
715 FolderItem
*folder_item_parent (FolderItem
*item
);
717 void folder_item_set_xml (Folder
*folder
,
720 XMLTag
*folder_item_get_xml (Folder
*folder
,
723 void folder_set_ui_func (Folder
*folder
,
726 void folder_set_name (Folder
*folder
,
728 void folder_set_sort (Folder
*folder
,
730 void folder_tree_destroy (Folder
*folder
);
732 void folder_add (Folder
*folder
);
733 void folder_remove (Folder
*folder
);
735 GList
*folder_get_list (void);
736 gint
folder_read_list (void);
737 void folder_write_list (void);
738 void folder_scan_tree (Folder
*folder
, gboolean rebuild
);
739 void folder_fast_scan_tree (Folder
*folder
);
740 FolderItem
*folder_create_folder(FolderItem
*parent
, const gchar
*name
);
741 gint
folder_item_rename (FolderItem
*item
, gchar
*newname
);
742 void folder_update_op_count (void);
743 void folder_func_to_all_folders (FolderItemFunc function
,
745 void folder_count_total_msgs(guint
*new_msgs
, guint
*unread_msgs
,
746 guint
*unreadmarked_msgs
, guint
*marked_msgs
,
748 gchar
*folder_get_status (GPtrArray
*folders
,
751 Folder
*folder_find_from_path (const gchar
*path
);
752 Folder
*folder_find_from_name (const gchar
*name
,
754 FolderItem
*folder_find_item_from_path (const gchar
*path
);
755 FolderClass
*folder_get_class_from_string (const gchar
*str
);
756 FolderItem
*folder_find_child_item_by_name (FolderItem
*item
,
758 gchar
*folder_item_get_identifier (FolderItem
*item
);
759 FolderItem
*folder_find_item_from_identifier (const gchar
*identifier
);
760 gchar
*folder_item_get_name (FolderItem
*item
);
762 FolderItem
*folder_get_default_inbox (void);
763 FolderItem
*folder_get_default_inbox_for_class(FolderType type
);
764 FolderItem
*folder_get_default_outbox (void);
765 FolderItem
*folder_get_default_draft (void);
766 FolderItem
*folder_get_default_queue (void);
767 FolderItem
*folder_get_default_trash (void);
768 FolderItem
*folder_get_default_processing (void);
769 void folder_set_missing_folders (void);
770 void folder_unref_account_all (PrefsAccount
*account
);
772 /* return value is locale encoded file name */
773 gchar
*folder_item_get_path (FolderItem
*item
);
775 gint
folder_item_open (FolderItem
*item
);
776 gint
folder_item_close (FolderItem
*item
);
777 gint
folder_item_scan (FolderItem
*item
);
778 gint
folder_item_scan_full (FolderItem
*item
,
780 gint
folder_item_syncronize_flags (FolderItem
*item
);
781 void folder_item_scan_foreach (GHashTable
*table
);
782 MsgInfo
*folder_item_get_msginfo (FolderItem
*item
,
784 MsgInfo
*folder_item_get_msginfo_by_msgid(FolderItem
*item
,
786 GSList
*folder_item_get_msg_list (FolderItem
*item
);
787 /* return value is locale charset */
788 gchar
*folder_item_fetch_msg (FolderItem
*item
,
790 gchar
*folder_item_fetch_msg_full (FolderItem
*item
,
792 gboolean get_headers
,
794 gint
folder_item_fetch_all_msg (FolderItem
*item
);
795 gint
folder_item_add_msg (FolderItem
*dest
,
798 gboolean remove_source
);
799 gint
folder_item_add_msgs (FolderItem
*dest
,
801 gboolean remove_source
);
802 gint
folder_item_move_to (FolderItem
*src
,
804 FolderItem
**new_item
,
806 gint
folder_item_move_msg (FolderItem
*dest
,
808 gint
folder_item_move_msgs (FolderItem
*dest
,
810 gint
folder_item_copy_msg (FolderItem
*dest
,
812 gint
folder_item_copy_msgs (FolderItem
*dest
,
814 gint
folder_item_remove_msg (FolderItem
*item
,
816 gint
folder_item_remove_msgs (FolderItem
*item
,
818 gint
folder_item_remove_all_msg (FolderItem
*item
);
819 void folder_item_change_msg_flags (FolderItem
*item
,
821 MsgPermFlags newflags
);
822 gboolean
folder_item_is_msg_changed (FolderItem
*item
,
824 /* return value is locale chaset */
825 gchar
* folder_item_get_identifier (FolderItem
* item
);
827 void folder_clean_cache_memory (FolderItem
*protected_item
);
828 void folder_clean_cache_memory_force (void);
829 void folder_item_write_cache (FolderItem
*item
);
830 void folder_item_set_default_flags (FolderItem
*dest
, MsgFlags
*flags
);
832 void folder_item_apply_processing (FolderItem
*item
);
834 void folder_item_update (FolderItem
*item
,
835 FolderItemUpdateFlags update_flags
);
836 void folder_item_update_recursive (FolderItem
*item
,
837 FolderItemUpdateFlags update_flags
);
838 void folder_item_update_freeze (void);
839 void folder_item_update_thaw (void);
840 void folder_item_set_batch (FolderItem
*item
, gboolean batch
);
841 gboolean
folder_has_parent_of_type (FolderItem
*item
, SpecialFolderItemType type
);
842 void folder_synchronise (Folder
*folder
);
843 gboolean
folder_want_synchronise (Folder
*folder
);
844 void folder_item_process_open (FolderItem
*item
,
845 void (*before_proc_func
)(gpointer data
),
846 void (*after_proc_func
)(gpointer data
),
848 gboolean
folder_subscribe (const gchar
*uri
);
849 gboolean
folder_have_mailbox (void);
850 gboolean
folder_item_free_cache (FolderItem
*item
, gboolean force
);
851 void folder_item_change_type (FolderItem
*item
,
852 SpecialFolderItemType newtype
);
853 gboolean
folder_get_sort_type (Folder
*folder
,
854 FolderSortKey
*sort_key
,
855 FolderSortType
*sort_type
);
856 void folder_item_synchronise (FolderItem
*item
);
857 #endif /* __FOLDER_H__ */