POP3: HTTP CONNECT proxy support

git-svn-id: svn://ultimatepp.org/upp/trunk@7372 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-05-14 09:22:30 +00:00
parent fbdb92100b
commit 390b93bfb8
6 changed files with 77 additions and 12 deletions

View file

@ -7,6 +7,11 @@ using namespace Upp;
class Pop3 : public TcpSocket
{
String proxy_host;
int proxy_port;
String proxy_username;
String proxy_password;
String host;
String user;
String pass;
@ -16,16 +21,20 @@ class Pop3 : public TcpSocket
bool ssl;
bool online;
bool GetListItems(ValueMap& list, dword type1, dword type2);
String GetTimeStamp();
bool GetListItems(ValueMap& list, dword type1, dword type2);
String GetTimeStamp();
bool Authenticate();
bool PutGet(const String& s, bool multiline = false, bool nolog = false);
bool PutGet(const String& s, bool multiline = false, bool nolog = false);
public:
Pop3& Host(const String& h) { host = h; return *this; }
Pop3& Port(int p) { port = p; return *this; }
Pop3& User(const String& u, const String& p) { user = u; pass = p; return *this; }
Pop3& SSL(bool b = true) { ssl = b; return *this; }
Pop3& Proxy(const String& host, int port) { proxy_host = host; proxy_port = port; return *this; }
Pop3& Proxy(const char *p);
Pop3& ProxyAuth(const String& u, const String& p) { proxy_username = u; proxy_password = p; return *this; }
int GetMessageCount();
String GetMessage(int index);