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