diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-06-03 18:11:02 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-06-03 18:11:02 (GMT) |
commit | c3fa606c7ac060c4929e7082e0e24531b093112f (patch) | |
tree | 394cf72c0b43fa706319592dfdb1438335b6116a /Swiften/Elements/AuthResponse.h | |
parent | 8406d818fcb2a511b1e4264a10fd9069ec020d72 (diff) | |
download | swift-c3fa606c7ac060c4929e7082e0e24531b093112f.zip swift-c3fa606c7ac060c4929e7082e0e24531b093112f.tar.bz2 |
Distinguish an empty SASL message from no SASL message.
Diffstat (limited to 'Swiften/Elements/AuthResponse.h')
-rw-r--r-- | Swiften/Elements/AuthResponse.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Swiften/Elements/AuthResponse.h b/Swiften/Elements/AuthResponse.h index baea83a..96d1b13 100644 --- a/Swiften/Elements/AuthResponse.h +++ b/Swiften/Elements/AuthResponse.h @@ -6,24 +6,32 @@ #pragma once +#include <boost/optional.hpp> + #include "Swiften/Base/ByteArray.h" #include "Swiften/Elements/Element.h" namespace Swift { class AuthResponse : public Element { public: - AuthResponse(const ByteArray& value = "") : value(value) { + AuthResponse() { + } + + AuthResponse(const ByteArray& value) : value(value) { + } + + AuthResponse(const boost::optional<ByteArray>& value) : value(value) { } - const ByteArray& getValue() const { + const boost::optional<ByteArray>& getValue() const { return value; } void setValue(const ByteArray& value) { - this->value = value; + this->value = boost::optional<ByteArray>(value); } private: - ByteArray value; + boost::optional<ByteArray> value; }; } |