1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */
6 #include "timed_thread.h"
9 /* forward declare to make gcc happy */
12 extern char *current_mail_spool;
14 struct mail_s { // for imap and pop3
16 unsigned long messages;
28 timed_thread *p_timed_thread;
37 int unseen_mail_count;
38 int flagged_mail_count;
39 int unflagged_mail_count;
40 int forwarded_mail_count;
41 int unforwarded_mail_count;
42 int replied_mail_count;
43 int unreplied_mail_count;
45 int trashed_mail_count;
51 void update_mail_count(struct local_mail_s *);
56 void parse_local_mail_args(struct text_object *, const char *);
58 #define PRINT_MAILS_PROTO_GENERATOR(x) \
59 void print_##x##mails(struct text_object *, char *, int);
61 PRINT_MAILS_PROTO_GENERATOR()
62 PRINT_MAILS_PROTO_GENERATOR(new_)
63 PRINT_MAILS_PROTO_GENERATOR(seen_)
64 PRINT_MAILS_PROTO_GENERATOR(unseen_)
65 PRINT_MAILS_PROTO_GENERATOR(flagged_)
66 PRINT_MAILS_PROTO_GENERATOR(unflagged_)
67 PRINT_MAILS_PROTO_GENERATOR(forwarded_)
68 PRINT_MAILS_PROTO_GENERATOR(unforwarded_)
69 PRINT_MAILS_PROTO_GENERATOR(replied_)
70 PRINT_MAILS_PROTO_GENERATOR(unreplied_)
71 PRINT_MAILS_PROTO_GENERATOR(draft_)
72 PRINT_MAILS_PROTO_GENERATOR(trashed_)
74 /* FIXME: this is here for the config leftovers only */
75 struct mail_s *parse_mail_args(char, const char *);
77 void parse_imap_mail_args(struct text_object *, const char *);
78 void parse_pop3_mail_args(struct text_object *, const char *);
79 void free_mail_obj(struct text_object *);
80 void print_imap_unseen(struct text_object *, char *, int);
81 void print_imap_messages(struct text_object *, char *, int);
82 void print_pop3_unseen(struct text_object *, char *, int);
83 void print_pop3_used(struct text_object *, char *, int);