2007-01-17 [colin] 2.7.1cvs16
[claws.git] / src / folder.h
index a349e9a16864375ced6f99026138e0a0ae7cd7c1..57acfee4b79e579a30272425d53a2edb5b75579a 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -570,15 +570,39 @@ struct _FolderClass
                                                 MsgInfoList    *msglist,
                                                 GRelation      *msgflags);
        
+       /* Sets batch mode for a FolderItem. It means that numerous flags updates
+        * could follow, and the FolderClass implementation can cache them in order
+        * to process them later when set_false will be called again with the
+        * batch parameter set to FALSE. 
+        */
        void            (*set_batch)            (Folder         *folder,
                                                 FolderItem     *item,
                                                 gboolean        batch);
+       /* Called when switching offline or asking for synchronisation. the imple
+        * mentation should do what's necessary to be able to read mails present
+        * in the FolderItem at this time with no network connectivity. 
+        */
        void            (*synchronise)          (FolderItem     *item);
+       
+       /* Passed from claws-mail --subscribe scheme://uri. Implementations
+        * should check if they handle this type of URI, and return TRUE in this
+        * case after having subscribed it.
+        */
        gboolean        (*subscribe)            (Folder         *folder,
                                                 const gchar    *uri);
+       
+       /* Gets the preferred sort key and type for a folderclass. */
        void            (*get_sort_type)        (Folder         *folder,
                                                 FolderSortKey  *sort_key,
                                                 FolderSortType *sort_type);
+       
+       /* Copies internal FolderItem data from one folderItem to another. Used
+        * when moving folders (this move is in reality a folder creation, content
+        * move, folder delettion).
+        */
+       void            (*copy_private_data)    (Folder         *folder,
+                                                FolderItem     *src,
+                                                FolderItem     *dest);
 };
 
 struct _FolderItem
@@ -709,6 +733,7 @@ GList *folder_get_list              (void);
 gint   folder_read_list                (void);
 void   folder_write_list       (void);
 void   folder_scan_tree                (Folder *folder, gboolean rebuild);
+void   folder_fast_scan_tree   (Folder *folder);
 FolderItem *folder_create_folder(FolderItem    *parent, const gchar *name);
 gint   folder_item_rename      (FolderItem *item, gchar *newname);
 void   folder_update_op_count          (void);
@@ -774,7 +799,8 @@ gint   folder_item_add_msgs             (FolderItem     *dest,
                                          gboolean        remove_source);
 gint   folder_item_move_to             (FolderItem     *src,
                                         FolderItem     *dest,
-                                        FolderItem    **new_item);
+                                        FolderItem    **new_item,
+                                        gboolean        copy);
 gint   folder_item_move_msg            (FolderItem     *dest,
                                         MsgInfo        *msginfo);
 gint   folder_item_move_msgs           (FolderItem     *dest,