/[imapfilter]/imapfilter/imapfilter.h
ViewVC logotype

Annotation of /imapfilter/imapfilter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Thu Aug 23 19:13:15 2001 UTC (22 years, 8 months ago) by lefcha
Branch: MAIN
Changes since 1.3: +0 -1 lines
File MIME type: text/plain
Added support for more than one accounts

1 lefcha 1.1 #include <limits.h>
2    
3    
4     /* Return values of functions. */
5     #define FAILURE 1
6     #define SUCCESS 0
7    
8     /* Flags that control the program options that have been selected. */
9     #define OPTION_TEST_MODE 0x00000001
10     #define OPTION_DETAILS_QUITE 0x00000002
11     #define OPTION_DETAILS_NORMAL 0x00000004
12     #define OPTION_DETAILS_VERBOSE 0x00000008
13 lefcha 1.3 #define OPTION_SHOW_HEADERS 0x00000010
14 lefcha 1.1 #define OPTION_DETAILS_CLEAR 0xFFFFFFF1
15    
16     /* Lengths of strings to save account settings. */
17     #define SERVER_MAX 128
18     #define USERNAME_MAX 64
19     #define PASSWORD_MAX 32
20    
21     /* Lengths of strings that comprise the HEADER of a filter. */
22     #define FIELD_NAME_MAX 64
23     #define FIELD_BODY_MAX 512
24    
25 lefcha 1.2 /*
26     * Size of buffer that holds the results of the searching and matching
27     * of filters.
28     */
29 lefcha 1.1 #define SEARCH_RESULTS_MAX 512
30    
31 lefcha 1.2 /*
32     * Every how many filter entries found in the configuration file will
33     * be space in memory will be allocated.
34     */
35 lefcha 1.1 #define FILTER_ENTRIES_MAX 8
36    
37     #define min(A, B) ((A) < (B) ? (A) : (B))
38    
39    
40     /* Account settings. */
41     typedef struct {
42     char server[SERVER_MAX]; /* Hostname of mail server. */
43     unsigned short int port; /* Port to connect. */
44     char username[USERNAME_MAX];
45     char password[PASSWORD_MAX];
46     } account_data;
47    
48     /* A header filter entry. */
49     typedef struct {
50     char name[FIELD_NAME_MAX]; /* Header field name. */
51 lefcha 1.2 int custom; /* If field name one of FROM, TO,
52     CC, BCC, SUBJECT then zero. */
53 lefcha 1.1 char body[FIELD_BODY_MAX]; /* Header field body. */
54     } filter_entry;
55    
56    
57     void apply_filters(void);
58 lefcha 1.2 void usage(void);

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26