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
11 #include "wvsendmail.h"
12 #include "wvstreamclone.h"
14 #include "wvhashtable.h"
19 #define WVPOPCLIENT_H 1
21 DeclareWvDict(WvSendmailProc
, int, count
);
23 class WvPopClient
: public WvStreamClone
26 WvSendmailProcDict sendprocs
;
27 WvString username
, password
, deliverto
, mda
;
30 int next_req
, next_ack
, sendmails
;
31 bool flushing
, apop_enable
, apop_enable_fallback
, explode
;
36 WvStringList safe_deletes
;
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
50 : num(0), len(0), sent(false), deleted(false),
55 DeclareWvVector(MsgInfo
);
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();
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
)); }
76 void send_done(int count
, bool success
);
79 WvString
acctparse(WvStringParm acct
);
83 #endif // WVPOPCLIENT_H