2007-08-24 [paul] 2.10.0cvs168
[claws.git] / src / folder.h
index 1ab437e61e32038521ccbf54fa4302b8dde79d92..075e9e2ed55dc484eb632e9f2264fbb9f03ee9ab 100644 (file)
@@ -6,7 +6,7 @@
  *
  * 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -15,8 +15,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifndef __FOLDER_H__
@@ -80,7 +80,9 @@ typedef enum
        SORT_BY_STATUS,
        SORT_BY_MIME,
        SORT_BY_TO,
-       SORT_BY_LOCKED
+       SORT_BY_LOCKED,
+       SORT_BY_TAGS,
+       SORT_BY_THREAD_DATE
 } FolderSortKey;
 
 typedef enum
@@ -581,8 +583,10 @@ struct _FolderClass
        /* 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. 
+        * Days: max number of days of mail to fetch.
         */
-       void            (*synchronise)          (FolderItem     *item);
+       void            (*synchronise)          (FolderItem     *item,
+                                                gint            days);
        
        /* Passed from claws-mail --subscribe scheme://uri. Implementations
         * should check if they handle this type of URI, and return TRUE in this
@@ -603,6 +607,10 @@ struct _FolderClass
        void            (*copy_private_data)    (Folder         *folder,
                                                 FolderItem     *src,
                                                 FolderItem     *dest);
+
+       void            (*remove_cached_msg)    (Folder         *folder,
+                                                FolderItem     *item,
+                                                MsgInfo        *msginfo);
 };
 
 struct _FolderItem
@@ -620,6 +628,8 @@ struct _FolderItem
        gint unreadmarked_msgs;
        gint marked_msgs;
 
+       gint order;
+
        gint last_num;
 
        MsgCache *cache;
@@ -659,6 +669,7 @@ struct _FolderItem
        SpecialFolderItemType parent_stype;
        gboolean processing_pending;
        gboolean scanning;
+       guint last_seen;
 };
 
 struct _PersistPrefs
@@ -757,10 +768,15 @@ FolderItem *folder_find_item_from_identifier      (const gchar    *identifier);
 gchar     *folder_item_get_name                (FolderItem     *item);
 
 FolderItem *folder_get_default_inbox   (void);
+FolderItem *folder_get_default_inbox_for_class(FolderType type);
 FolderItem *folder_get_default_outbox  (void);
+FolderItem *folder_get_default_outbox_for_class(FolderType type);
 FolderItem *folder_get_default_draft   (void);
+FolderItem *folder_get_default_draft_for_class(FolderType type);
 FolderItem *folder_get_default_queue   (void);
+FolderItem *folder_get_default_queue_for_class(FolderType type);
 FolderItem *folder_get_default_trash   (void);
+FolderItem *folder_get_default_trash_for_class(FolderType type);
 FolderItem *folder_get_default_processing (void);
 void folder_set_missing_folders                (void);
 void folder_unref_account_all          (PrefsAccount   *account);
@@ -849,5 +865,5 @@ void folder_item_change_type                (FolderItem *item,
 gboolean folder_get_sort_type          (Folder         *folder,
                                         FolderSortKey  *sort_key,
                                         FolderSortType *sort_type);
-
+void folder_item_synchronise           (FolderItem *item);
 #endif /* __FOLDER_H__ */