mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 20:59:45 +01:00
Net: near complete merge to 1.4.2
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user