Extra includes to fix compiling on FreeBSD
[monky] / src / mail.h
1 #ifndef _MAIL_H
2 #define _MAIL_H
3
4 #include "timed_thread.h"
5 #include <time.h>
6
7 extern char *current_mail_spool;
8
9 struct mail_s {                 // for imap and pop3
10         unsigned long unseen;
11         unsigned long messages;
12         unsigned long used;
13         unsigned long quota;
14         unsigned long port;
15         unsigned int retries;
16         float interval;
17         double last_update;
18         char host[128];
19         char user[128];
20         char pass[128];
21         char command[1024];
22         char folder[128];
23         timed_thread *p_timed_thread;
24         char secure;
25 };
26
27 struct local_mail_s {
28         char *box;
29         int mail_count;
30         int new_mail_count;
31         int seen_mail_count;
32         int unseen_mail_count;
33         int flagged_mail_count;
34         int unflagged_mail_count;
35         int forwarded_mail_count;
36         int unforwarded_mail_count;
37         int replied_mail_count;
38         int unreplied_mail_count;
39         int draft_mail_count;
40         int trashed_mail_count;
41         float interval;
42         time_t last_mtime;
43         double last_update;
44 };
45
46 void update_mail_count(struct local_mail_s *);
47
48 #define POP3_TYPE 1
49 #define IMAP_TYPE 2
50
51 struct mail_s *parse_mail_args(char type, const char *arg);
52 void *imap_thread(void *arg);
53 void *pop3_thread(void *arg);
54
55 #endif /* _MAIL_H */