Corrected the yellowness for bugs between the MagicDay and the bounce date.
[wvapps.git] / retchmail / wvpopclient.h
blobdcae72a79d1a4383b0d4ca61a5be66f504c5c21e
1 /*
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2003 Net Integration Technologies, Inc.
5 * Avery's insanely fast alternative to Fetchmail -- Pop3 Client
7 * This code is LGPL - see the file COPYING.LIB for a full copy of the
8 * license.
9 */
11 #include "wvsendmail.h"
12 #include "wvstreamclone.h"
13 #include "wvstring.h"
14 #include "wvhashtable.h"
15 #include "wvlog.h"
16 #include "wvvector.h"
18 #ifndef WVPOPCLIENT_H
19 #define WVPOPCLIENT_H 1
21 DeclareWvDict(WvSendmailProc, int, count);
23 class WvPopClient : public WvStreamClone
25 public:
26 WvSendmailProcDict sendprocs;
27 WvString username, password, deliverto, mda;
28 WvLog log;
29 long res1, res2;
30 int next_req, next_ack, sendmails;
31 bool flushing, apop_enable, apop_enable_fallback, explode;
32 WvStringList trace;
34 bool safemode;
35 int max_requests;
36 WvStringList safe_deletes;
38 bool ignorerp;
40 struct MsgInfo
42 int num; // message number
43 long len; // message length (bytes)
44 bool sent, // message _fully_ transferred to sendmail
45 deleted; // server acknowledged DELE command
46 WvString err; // error message
47 int deletes_after_this; // number of DELE messages following this RETR
49 MsgInfo()
50 : num(0), len(0), sent(false), deleted(false),
51 deletes_after_this(0)
55 DeclareWvVector(MsgInfo);
56 MsgInfoVector mess;
58 // note: we take possession of 'conn' and may delete it at any time!
59 WvPopClient(WvStream *conn,
60 WvStringParm acct, WvStringParm _password,
61 WvStringParm _deliverto, WvStringParm _mda,
62 bool _flushing, bool _apop_enable,
63 bool _apop_enable_fallback, bool _explode,
64 bool _safemode, bool _ignorerp);
65 virtual ~WvPopClient();
67 bool never_select;
68 virtual bool pre_select(SelectInfo &si);
69 virtual void execute();
71 void cmd(WvStringParm s);
72 void cmd(WVSTRING_FORMAT_DECL)
73 { return cmd(WvString(WVSTRING_FORMAT_CALL)); }
74 bool response();
76 void send_done(int count, bool success);
78 private:
79 WvString acctparse(WvStringParm acct);
80 bool not_found;
83 #endif // WVPOPCLIENT_H