2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999,2000 Hiroyuki Yamamoto
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.
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.
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.
28 typedef struct _IMAPSession IMAPSession;
30 #include "prefs_account.h"
32 #define IMAP_SESSION(obj) ((IMAPSession *)obj)
41 #define IMAP_SUCCESS 0
43 #define IMAP_AUTHFAIL 3
44 #define IMAP_PROTOCOL 4
49 #define IMAPBUFSIZE 8192
53 IMAP_FLAG_SEEN = 1 << 0,
54 IMAP_FLAG_ANSWERED = 1 << 1,
55 IMAP_FLAG_FLAGGED = 1 << 2,
56 IMAP_FLAG_DELETED = 1 << 3,
57 IMAP_FLAG_DRAFT = 1 << 4
60 #define IMAP_IS_SEEN(flags) ((flags & IMAP_FLAG_SEEN) != 0)
61 #define IMAP_IS_ANSWERED(flags) ((flags & IMAP_FLAG_ANSWERED) != 0)
62 #define IMAP_IS_FLAGGED(flags) ((flags & IMAP_FLAG_FLAGGED) != 0)
63 #define IMAP_IS_DELETED(flags) ((flags & IMAP_FLAG_DELETED) != 0)
64 #define IMAP_IS_DRAFT(flags) ((flags & IMAP_FLAG_DRAFT) != 0)
66 Session *imap_session_new (const gchar *server,
70 void imap_session_destroy (IMAPSession *session);
71 void imap_session_destroy_all (void);
73 GSList *imap_get_msg_list (Folder *folder,
76 gchar *imap_fetch_msg (Folder *folder,
80 gint imap_move_msg (Folder *folder,
84 gint imap_move_msgs_with_dest (Folder *folder,
87 gint imap_remove_msg (Folder *folder,
90 gint imap_remove_all_msg (Folder *folder,
93 void imap_scan_folder (Folder *folder,
96 FolderItem *imap_create_folder (Folder *folder,
99 gint imap_remove_folder (Folder *folder,
102 #endif /* __IMAP_H__ */