dee594cf4a4bb96451eec7df9fbb15002a35a9d9
[citadel.git] / citadel / modules / pop3 / serv_pop3.h
1 /*
2  * Copyright (c) 1998-2009 by the citadel.org team
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 struct pop3msg {
20         long msgnum;
21         size_t rfc822_length;
22         int deleted;
23 };
24
25 struct citpop3 {                /* Information about the current session */
26         struct pop3msg *msgs;   /* Array of message pointers */
27         int num_msgs;           /* Number of messages in array */
28         int lastseen;           /* Offset of last-read message in array */
29 };
30                                 /* Note: the "lastseen" is represented as the
31                                  * offset in this array (zero-based), so when
32                                  * displaying it to a POP3 client, it must be
33                                  * incremented by one.
34                                  */
35
36 #define POP3 ((struct citpop3 *)CC->session_specific_data)
37
38 void pop3_cleanup_function(void);
39 void pop3_greeting(void);
40 void pop3_user(char *argbuf);
41 void pop3_pass(char *argbuf);
42 void pop3_list(char *argbuf);
43 void pop3_command_loop(void);
44 void pop3_login(void);
45