1 /* $Id$ */
2 /* Copyright (c) 2011-2012 Pierre Pronchery <khorben@defora.org> */
3 /* This file is part of DeforaOS Desktop Mailer */
4 /* This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 3 of the License.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program.  If not, see <http://www.gnu.org/licenses/>. */
15 
16 
17 
18 #ifndef DESKTOP_MAILER_MESSAGE_H
19 # define DESKTOP_MAILER_MESSAGE_H
20 
21 # include "mailer.h"
22 
23 
24 /* Message */
25 /* types */
26 typedef struct _MailerMessage Message;
27 
28 typedef enum _MailerMessageFlag
29 {
30 	MMF_READ	= 0x1,
31 	MMF_ANSWERED	= 0x2,
32 	MMF_URGENT	= 0x4,
33 	MMF_DRAFT	= 0x8,
34 	MMF_DELETED	= 0x10
35 }
36 MailerMessageFlag;
37 
38 typedef struct _AccountMessage AccountMessage;
39 
40 
41 /* functions */
42 /* accessors */
43 /* flags */
44 int message_get_flags(MailerMessage * message);
45 void message_set_flag(MailerMessage * message, MailerMessageFlag flag);
46 void message_set_flags(MailerMessage * message, int flags);
47 
48 /* headers */
49 char const * message_get_header(MailerMessage * message, char const * header);
50 
51 /* useful */
52 int message_save(MailerMessage * message, char const * filename);
53 
54 #endif /* !DESKTOP_MAILER_MESSAGE_H */
55