aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp/SMTPCommand.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
committerVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
commitf9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch)
tree2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /src/net/smtp/SMTPCommand.cpp
parentPer-protocol include files. (diff)
downloadvmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz
vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip
Boost/C++11 shared pointers.
Diffstat (limited to 'src/net/smtp/SMTPCommand.cpp')
-rw-r--r--src/net/smtp/SMTPCommand.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/net/smtp/SMTPCommand.cpp b/src/net/smtp/SMTPCommand.cpp
index e40797f2..6b3d1d79 100644
--- a/src/net/smtp/SMTPCommand.cpp
+++ b/src/net/smtp/SMTPCommand.cpp
@@ -47,7 +47,7 @@ SMTPCommand::SMTPCommand(const string& text)
// static
-ref <SMTPCommand> SMTPCommand::EHLO(const string& hostname)
+shared_ptr <SMTPCommand> SMTPCommand::EHLO(const string& hostname)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -58,7 +58,7 @@ ref <SMTPCommand> SMTPCommand::EHLO(const string& hostname)
// static
-ref <SMTPCommand> SMTPCommand::HELO(const string& hostname)
+shared_ptr <SMTPCommand> SMTPCommand::HELO(const string& hostname)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -69,7 +69,7 @@ ref <SMTPCommand> SMTPCommand::HELO(const string& hostname)
// static
-ref <SMTPCommand> SMTPCommand::AUTH(const string& mechName)
+shared_ptr <SMTPCommand> SMTPCommand::AUTH(const string& mechName)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -80,21 +80,21 @@ ref <SMTPCommand> SMTPCommand::AUTH(const string& mechName)
// static
-ref <SMTPCommand> SMTPCommand::STARTTLS()
+shared_ptr <SMTPCommand> SMTPCommand::STARTTLS()
{
return createCommand("STARTTLS");
}
// static
-ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8)
+shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8)
{
return MAIL(mbox, utf8, 0);
}
// static
-ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const unsigned long size)
+shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const unsigned long size)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -123,7 +123,7 @@ ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const
// static
-ref <SMTPCommand> SMTPCommand::RCPT(const mailbox& mbox, const bool utf8)
+shared_ptr <SMTPCommand> SMTPCommand::RCPT(const mailbox& mbox, const bool utf8)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -146,21 +146,21 @@ ref <SMTPCommand> SMTPCommand::RCPT(const mailbox& mbox, const bool utf8)
// static
-ref <SMTPCommand> SMTPCommand::RSET()
+shared_ptr <SMTPCommand> SMTPCommand::RSET()
{
return createCommand("RSET");
}
// static
-ref <SMTPCommand> SMTPCommand::DATA()
+shared_ptr <SMTPCommand> SMTPCommand::DATA()
{
return createCommand("DATA");
}
// static
-ref <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool last)
+shared_ptr <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool last)
{
std::ostringstream cmd;
cmd.imbue(std::locale::classic());
@@ -174,23 +174,23 @@ ref <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool la
// static
-ref <SMTPCommand> SMTPCommand::NOOP()
+shared_ptr <SMTPCommand> SMTPCommand::NOOP()
{
return createCommand("NOOP");
}
// static
-ref <SMTPCommand> SMTPCommand::QUIT()
+shared_ptr <SMTPCommand> SMTPCommand::QUIT()
{
return createCommand("QUIT");
}
// static
-ref <SMTPCommand> SMTPCommand::createCommand(const string& text)
+shared_ptr <SMTPCommand> SMTPCommand::createCommand(const string& text)
{
- return vmime::create <SMTPCommand>(text);
+ return shared_ptr <SMTPCommand>(new SMTPCommand(text));
}
@@ -200,7 +200,7 @@ const string SMTPCommand::getText() const
}
-void SMTPCommand::writeToSocket(ref <socket> sok)
+void SMTPCommand::writeToSocket(shared_ptr <socket> sok)
{
sok->send(m_text + "\r\n");
}