Net: near complete merge to 1.4.2

This commit is contained in:
Marian Krivos
2011-09-14 18:20:11 +00:00
parent 56c6a4f758
commit b242f2c8d1
192 changed files with 15545 additions and 2277 deletions

View File

@@ -42,6 +42,7 @@
#include "Poco/Net/Net.h"
#include "Poco/Net/DialogSocket.h"
#include "Poco/DigestEngine.h"
#include "Poco/Timespan.h"
@@ -67,7 +68,9 @@ public:
{
AUTH_NONE,
AUTH_CRAM_MD5,
AUTH_LOGIN
AUTH_CRAM_SHA1,
AUTH_LOGIN,
AUTH_PLAIN
};
explicit SMTPClientSession(const StreamSocket& socket);
@@ -101,6 +104,10 @@ public:
void login();
/// Calls login(hostname) with the current host name.
void login(const std::string& hostname, LoginMethod loginMethod, const std::string& username, const std::string& password);
/// Logs in to the SMTP server using the given authentication method and the given
/// credentials.
void login(LoginMethod loginMethod, const std::string& username, const std::string& password);
/// Logs in to the SMTP server using the given authentication method and the given
/// credentials.
@@ -161,9 +168,12 @@ protected:
static bool isPermanentNegative(int status);
void login(const std::string& hostname, std::string& response);
void loginUsingCRAM_MD5(const std::string& username, const std::string& password);
void loginUsingCRAMMD5(const std::string& username, const std::string& password);
void loginUsingCRAMSHA1(const std::string& username, const std::string& password);
void loginUsingCRAM(const std::string& username, const std::string& method, Poco::DigestEngine& hmac);
void loginUsingLogin(const std::string& username, const std::string& password);
void loginUsingPlain(const std::string& username, const std::string& password);
DialogSocket& socket();
private:
DialogSocket _socket;
@@ -198,6 +208,12 @@ inline bool SMTPClientSession::isPermanentNegative(int status)
}
inline DialogSocket& SMTPClientSession::socket()
{
return _socket;
}
} } // namespace Poco::Net