diff options
author | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
commit | f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch) | |
tree | 2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /src/security/sasl/defaultSASLAuthenticator.cpp | |
parent | Per-protocol include files. (diff) | |
download | vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip |
Boost/C++11 shared pointers.
Diffstat (limited to 'src/security/sasl/defaultSASLAuthenticator.cpp')
-rw-r--r-- | src/security/sasl/defaultSASLAuthenticator.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/security/sasl/defaultSASLAuthenticator.cpp b/src/security/sasl/defaultSASLAuthenticator.cpp index bb72e56f..7fe9b3eb 100644 --- a/src/security/sasl/defaultSASLAuthenticator.cpp +++ b/src/security/sasl/defaultSASLAuthenticator.cpp @@ -51,14 +51,14 @@ defaultSASLAuthenticator::~defaultSASLAuthenticator() } -const std::vector <ref <SASLMechanism> > +const std::vector <shared_ptr <SASLMechanism> > defaultSASLAuthenticator::getAcceptableMechanisms - (const std::vector <ref <SASLMechanism> >& available, - ref <SASLMechanism> suggested) const + (const std::vector <shared_ptr <SASLMechanism> >& available, + shared_ptr <SASLMechanism> suggested) const { if (suggested) { - std::vector <ref <SASLMechanism> > res; + std::vector <shared_ptr <SASLMechanism> > res; res.push_back(suggested); @@ -103,42 +103,42 @@ const string defaultSASLAuthenticator::getAnonymousToken() const const string defaultSASLAuthenticator::getServiceName() const { - return m_saslSession.acquire()->getServiceName(); + return m_saslSession.lock()->getServiceName(); } -void defaultSASLAuthenticator::setService(ref <net::service> serv) +void defaultSASLAuthenticator::setService(shared_ptr <net::service> serv) { m_service = serv; m_default.setService(serv); } -weak_ref <net::service> defaultSASLAuthenticator::getService() const +weak_ptr <net::service> defaultSASLAuthenticator::getService() const { return m_service; } -void defaultSASLAuthenticator::setSASLSession(ref <SASLSession> sess) +void defaultSASLAuthenticator::setSASLSession(shared_ptr <SASLSession> sess) { m_saslSession = sess; } -ref <SASLSession> defaultSASLAuthenticator::getSASLSession() const +shared_ptr <SASLSession> defaultSASLAuthenticator::getSASLSession() const { - return m_saslSession.acquire().constCast <SASLSession>(); + return constCast <SASLSession>(m_saslSession.lock()); } -void defaultSASLAuthenticator::setSASLMechanism(ref <SASLMechanism> mech) +void defaultSASLAuthenticator::setSASLMechanism(shared_ptr <SASLMechanism> mech) { m_saslMech = mech; } -ref <SASLMechanism> defaultSASLAuthenticator::getSASLMechanism() const +shared_ptr <SASLMechanism> defaultSASLAuthenticator::getSASLMechanism() const { return m_saslMech; } |