From f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 21 Nov 2013 22:16:57 +0100 Subject: Boost/C++11 shared pointers. --- src/net/pop3/POP3Command.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/net/pop3/POP3Command.cpp') diff --git a/src/net/pop3/POP3Command.cpp b/src/net/pop3/POP3Command.cpp index 6c178891..6fe301ce 100644 --- a/src/net/pop3/POP3Command.cpp +++ b/src/net/pop3/POP3Command.cpp @@ -49,21 +49,21 @@ POP3Command::POP3Command(const string& text) // static -ref POP3Command::CAPA() +shared_ptr POP3Command::CAPA() { return createCommand("CAPA"); } // static -ref POP3Command::NOOP() +shared_ptr POP3Command::NOOP() { return createCommand("NOOP"); } // static -ref POP3Command::AUTH(const string& mechName) +shared_ptr POP3Command::AUTH(const string& mechName) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -74,14 +74,14 @@ ref POP3Command::AUTH(const string& mechName) // static -ref POP3Command::STLS() +shared_ptr POP3Command::STLS() { return createCommand("STLS"); } // static -ref POP3Command::APOP(const string& username, const string& digest) +shared_ptr POP3Command::APOP(const string& username, const string& digest) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -92,7 +92,7 @@ ref POP3Command::APOP(const string& username, const string& digest // static -ref POP3Command::USER(const string& username) +shared_ptr POP3Command::USER(const string& username) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -103,7 +103,7 @@ ref POP3Command::USER(const string& username) // static -ref POP3Command::PASS(const string& password) +shared_ptr POP3Command::PASS(const string& password) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -114,21 +114,21 @@ ref POP3Command::PASS(const string& password) // static -ref POP3Command::STAT() +shared_ptr POP3Command::STAT() { return createCommand("STAT"); } // static -ref POP3Command::LIST() +shared_ptr POP3Command::LIST() { return createCommand("LIST"); } // static -ref POP3Command::LIST(const unsigned long msg) +shared_ptr POP3Command::LIST(const unsigned long msg) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -139,14 +139,14 @@ ref POP3Command::LIST(const unsigned long msg) // static -ref POP3Command::UIDL() +shared_ptr POP3Command::UIDL() { return createCommand("UIDL"); } // static -ref POP3Command::UIDL(const unsigned long msg) +shared_ptr POP3Command::UIDL(const unsigned long msg) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -157,7 +157,7 @@ ref POP3Command::UIDL(const unsigned long msg) // static -ref POP3Command::DELE(const unsigned long msg) +shared_ptr POP3Command::DELE(const unsigned long msg) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -168,7 +168,7 @@ ref POP3Command::DELE(const unsigned long msg) // static -ref POP3Command::RETR(const unsigned long msg) +shared_ptr POP3Command::RETR(const unsigned long msg) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -179,7 +179,7 @@ ref POP3Command::RETR(const unsigned long msg) // static -ref POP3Command::TOP(const unsigned long msg, const unsigned long lines) +shared_ptr POP3Command::TOP(const unsigned long msg, const unsigned long lines) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -190,23 +190,23 @@ ref POP3Command::TOP(const unsigned long msg, const unsigned long // static -ref POP3Command::RSET() +shared_ptr POP3Command::RSET() { return createCommand("RSET"); } // static -ref POP3Command::QUIT() +shared_ptr POP3Command::QUIT() { return createCommand("QUIT"); } // static -ref POP3Command::createCommand(const string& text) +shared_ptr POP3Command::createCommand(const string& text) { - return vmime::create (text); + return shared_ptr (new POP3Command(text)); } @@ -216,7 +216,7 @@ const string POP3Command::getText() const } -void POP3Command::send(ref conn) +void POP3Command::send(shared_ptr conn) { conn->getSocket()->send(m_text + "\r\n"); } -- cgit v1.2.3