sync with 0.7.4cvs49
[claws.git] / src / mh.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2002 Hiroyuki Yamamoto
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __MH_H__
21 #define __MH_H__
22
23 #include <glib.h>
24
25 #include "folder.h"
26 #include "procmsg.h"
27
28 typedef struct _MHFolder        MHFolder;
29
30 #define MH_FOLDER(obj)          ((MHFolder *)obj)
31
32 struct _MHFolder
33 {
34         LocalFolder lfolder;
35 };
36
37 Folder  *mh_folder_new          (const gchar    *name,
38                                  const gchar    *path);
39 void     mh_folder_destroy      (MHFolder       *folder);
40
41 GSList  *mh_get_msg_list        (Folder         *folder,
42                                  FolderItem     *item,
43                                  gboolean        use_cache);
44 gchar   *mh_fetch_msg           (Folder         *folder,
45                                  FolderItem     *item,
46                                  gint            num);
47 gint     mh_add_msg             (Folder         *folder,
48                                  FolderItem     *dest,
49                                  const gchar    *file,
50                                  gboolean        remove_source);
51 gint     mh_move_msg            (Folder         *folder,
52                                  FolderItem     *dest,
53                                  MsgInfo        *msginfo);
54 gint     mh_move_msgs_with_dest (Folder         *folder,
55                                  FolderItem     *dest,
56                                  GSList         *msglist);
57 gint     mh_copy_msg            (Folder         *folder,
58                                  FolderItem     *dest,
59                                  MsgInfo        *msginfo);
60 gint     mh_copy_msgs_with_dest (Folder         *folder,
61                                  FolderItem     *dest,
62                                  GSList         *msglist);
63 gint     mh_remove_msg          (Folder         *folder,
64                                  FolderItem     *item,
65                                  gint            num);
66 gint     mh_remove_all_msg      (Folder         *folder,
67                                  FolderItem     *item);
68 gboolean mh_is_msg_changed      (Folder         *folder,
69                                  FolderItem     *item,
70                                  MsgInfo        *msginfo);
71
72 gint    mh_scan_folder          (Folder         *folder,
73                                  FolderItem     *item);
74 void    mh_scan_tree            (Folder         *folder);
75
76 gint    mh_create_tree          (Folder         *folder);
77 FolderItem *mh_create_folder    (Folder         *folder,
78                                  FolderItem     *parent,
79                                  const gchar    *name);
80 gint    mh_rename_folder        (Folder         *folder,
81                                  FolderItem     *item,
82                                  const gchar    *name);
83 gint    mh_remove_folder        (Folder         *folder,
84                                  FolderItem     *item);
85
86 #endif /* __MH_H__ */