masqmail-0.2

diff src/pop3_in.h @ 0:08114f7dcc23

this is masqmail-0.2.21 from oliver kurth
author meillo@marmaro.de
date Fri, 26 Sep 2008 17:05:23 +0200
parents
children 26e34ae9a3e3
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/pop3_in.h	Fri Sep 26 17:05:23 2008 +0200
     1.3 @@ -0,0 +1,87 @@
     1.4 +/* pop3_in.h, Copyright 2000 (C) Oliver Kurth,
     1.5 + *
     1.6 + * This program is free software; you can redistribute it and/or modify
     1.7 + * it under the terms of the GNU General Public License as published by
     1.8 + * the Free Software Foundation; either version 2 of the License, or
     1.9 + * (at your option) any later version.
    1.10 + * 
    1.11 + * This program is distributed in the hope that it will be useful,
    1.12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.14 + * GNU General Public License for more details.
    1.15 + *
    1.16 + * You should have received a copy of the GNU General Public License
    1.17 + * along with this program; if not, write to the Free Software
    1.18 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    1.19 + */
    1.20 +
    1.21 +#ifdef ENABLE_POP3
    1.22 +
    1.23 +#define POP3_BUF_LEN 1024
    1.24 +
    1.25 +#define POP3_INITIAL_TIMEOUT 5*60
    1.26 +#define POP3_CMD_TIMEOUT 5*60
    1.27 +#define POP3_DATA_TIMEOUT 5*60
    1.28 +#define POP3_FINAL_TIMEOUT 10*60
    1.29 +
    1.30 +#define POP3_FLAG_DELETE 0x01
    1.31 +#define POP3_FLAG_UIDL 0x02
    1.32 +#define POP3_FLAG_UIDL_DELE 0x04
    1.33 +#define POP3_FLAG_APOP 0x08
    1.34 +
    1.35 +#define POP3_MAX_CHILDREN 2
    1.36 +
    1.37 +typedef
    1.38 +enum _pop3_error{
    1.39 +  pop3_ok = 0,
    1.40 +  pop3_fail,
    1.41 +  pop3_eof,
    1.42 +  pop3_timeout,
    1.43 +  pop3_login_failure,
    1.44 +  pop3_syntax
    1.45 +} pop3_error;
    1.46 +
    1.47 +typedef struct pop3_base{
    1.48 +  FILE *in;
    1.49 +  FILE *out;
    1.50 +  gint sock;
    1.51 +  gint dup_sock;
    1.52 +
    1.53 +  gchar *remote_host;
    1.54 +  gchar *buffer;
    1.55 +
    1.56 +  gint next_id;
    1.57 +  gint msg_cnt;
    1.58 +  gint uidl_known_cnt;
    1.59 +  gint mbox_size;
    1.60 +
    1.61 +  GList *list_uid_old;
    1.62 +  GList *drop_list;
    1.63 +
    1.64 +  gchar* timestamp;
    1.65 +
    1.66 +  guint flags;
    1.67 +
    1.68 +  pop3_error error;
    1.69 +} pop3_base;
    1.70 +
    1.71 +typedef struct _msg_info{
    1.72 +  gint number;
    1.73 +  gint size;
    1.74 +  gchar *uid;
    1.75 +  gboolean is_fetched;
    1.76 +  gboolean is_in_uidl;
    1.77 +} msg_info;
    1.78 +
    1.79 +pop3_base *pop3_in_open(gchar *host, gint port, GList *resolve_list, guint flags);
    1.80 +pop3_base *pop3_in_open_child(gchar *cmd, guint flags);
    1.81 +void pop3_in_close(pop3_base *popb);
    1.82 +gboolean pop3_get(pop3_base *popb,
    1.83 +		  gchar *user, gchar *pass, address *rcpt, address *return_path,
    1.84 +		  gint max_count, gint max_size, gboolean max_size_delete);
    1.85 +gboolean pop3_login(gchar *host, gint port, GList *resolve_list,
    1.86 +		    gchar *user, gchar *pass, guint flags);
    1.87 +
    1.88 +
    1.89 +
    1.90 +#endif