masqmail-0.2

annotate src/pop3_in.h @ 3:8c55886cacd8

man pages will be maintained in troff now
author meillo@marmaro.de
date Fri, 26 Sep 2008 21:40:10 +0200
parents
children 26e34ae9a3e3
rev   line source
meillo@0 1 /* pop3_in.h, Copyright 2000 (C) Oliver Kurth,
meillo@0 2 *
meillo@0 3 * This program is free software; you can redistribute it and/or modify
meillo@0 4 * it under the terms of the GNU General Public License as published by
meillo@0 5 * the Free Software Foundation; either version 2 of the License, or
meillo@0 6 * (at your option) any later version.
meillo@0 7 *
meillo@0 8 * This program is distributed in the hope that it will be useful,
meillo@0 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
meillo@0 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
meillo@0 11 * GNU General Public License for more details.
meillo@0 12 *
meillo@0 13 * You should have received a copy of the GNU General Public License
meillo@0 14 * along with this program; if not, write to the Free Software
meillo@0 15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
meillo@0 16 */
meillo@0 17
meillo@0 18 #ifdef ENABLE_POP3
meillo@0 19
meillo@0 20 #define POP3_BUF_LEN 1024
meillo@0 21
meillo@0 22 #define POP3_INITIAL_TIMEOUT 5*60
meillo@0 23 #define POP3_CMD_TIMEOUT 5*60
meillo@0 24 #define POP3_DATA_TIMEOUT 5*60
meillo@0 25 #define POP3_FINAL_TIMEOUT 10*60
meillo@0 26
meillo@0 27 #define POP3_FLAG_DELETE 0x01
meillo@0 28 #define POP3_FLAG_UIDL 0x02
meillo@0 29 #define POP3_FLAG_UIDL_DELE 0x04
meillo@0 30 #define POP3_FLAG_APOP 0x08
meillo@0 31
meillo@0 32 #define POP3_MAX_CHILDREN 2
meillo@0 33
meillo@0 34 typedef
meillo@0 35 enum _pop3_error{
meillo@0 36 pop3_ok = 0,
meillo@0 37 pop3_fail,
meillo@0 38 pop3_eof,
meillo@0 39 pop3_timeout,
meillo@0 40 pop3_login_failure,
meillo@0 41 pop3_syntax
meillo@0 42 } pop3_error;
meillo@0 43
meillo@0 44 typedef struct pop3_base{
meillo@0 45 FILE *in;
meillo@0 46 FILE *out;
meillo@0 47 gint sock;
meillo@0 48 gint dup_sock;
meillo@0 49
meillo@0 50 gchar *remote_host;
meillo@0 51 gchar *buffer;
meillo@0 52
meillo@0 53 gint next_id;
meillo@0 54 gint msg_cnt;
meillo@0 55 gint uidl_known_cnt;
meillo@0 56 gint mbox_size;
meillo@0 57
meillo@0 58 GList *list_uid_old;
meillo@0 59 GList *drop_list;
meillo@0 60
meillo@0 61 gchar* timestamp;
meillo@0 62
meillo@0 63 guint flags;
meillo@0 64
meillo@0 65 pop3_error error;
meillo@0 66 } pop3_base;
meillo@0 67
meillo@0 68 typedef struct _msg_info{
meillo@0 69 gint number;
meillo@0 70 gint size;
meillo@0 71 gchar *uid;
meillo@0 72 gboolean is_fetched;
meillo@0 73 gboolean is_in_uidl;
meillo@0 74 } msg_info;
meillo@0 75
meillo@0 76 pop3_base *pop3_in_open(gchar *host, gint port, GList *resolve_list, guint flags);
meillo@0 77 pop3_base *pop3_in_open_child(gchar *cmd, guint flags);
meillo@0 78 void pop3_in_close(pop3_base *popb);
meillo@0 79 gboolean pop3_get(pop3_base *popb,
meillo@0 80 gchar *user, gchar *pass, address *rcpt, address *return_path,
meillo@0 81 gint max_count, gint max_size, gboolean max_size_delete);
meillo@0 82 gboolean pop3_login(gchar *host, gint port, GList *resolve_list,
meillo@0 83 gchar *user, gchar *pass, guint flags);
meillo@0 84
meillo@0 85
meillo@0 86
meillo@0 87 #endif