2 * $Id: newmail.h 807 2007-11-09 01:21:33Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006 University of Washington
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * ========================================================================
16 #ifndef PITH_NEWMAIL_INCLUDED
17 #define PITH_NEWMAIL_INCLUDED
20 typedef enum {GoodTime
= 0, BadTime
, VeryBadTime
, DoItNow
} CheckPointTime
;
24 * Macro to help with new mail check timing...
26 #define NM_TIMING(X) (((X)==NO_OP_IDLE) ? GoodTime : \
27 (((X)==NO_OP_COMMAND) ? BadTime : VeryBadTime))
29 #define NM_STATUS_MSG 0x01
30 #define NM_DEFER_SORT 0x02
31 #define NM_FROM_COMPOSER 0x04
35 * Icon text types, to tell which icon to use
41 /* exported protoypes */
42 long new_mail(int, CheckPointTime
, int);
43 void format_new_mail_msg(char *, long, ENVELOPE
*, char *, char *, char *, char *, size_t);
44 void check_point_change(MAILSTREAM
*);
45 void reset_check_point(MAILSTREAM
*);
46 int changes_to_checkpoint(MAILSTREAM
*);
47 void zero_new_mail_count(void);
48 void init_newmailfifo(char *);
49 void close_newmailfifo(void);
52 /* mandatory to implement prototypes */
53 void newmail_check_cue(int);
54 void newmail_check_point_cue(int);
55 void icon_text(char *, int);
56 time_t time_of_last_input(void);
59 #endif /* PITH_NEWMAIL_INCLUDED */