diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-10-05 07:34:05 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-10-05 07:34:05 (GMT) |
commit | 3e972565e51f5b2fa7e9768d5d84a7d4b6dfc09b (patch) | |
tree | b5b464804d169396f0cdd7348f4ae600ee2efe33 /Swiften/Elements | |
parent | 1f4be30a480818458fd841809585681597be831e (diff) | |
download | swift-3e972565e51f5b2fa7e9768d5d84a7d4b6dfc09b.zip swift-3e972565e51f5b2fa7e9768d5d84a7d4b6dfc09b.tar.bz2 |
Allow joining passworded MUCs.
Resolves: #991
Diffstat (limited to 'Swiften/Elements')
-rw-r--r-- | Swiften/Elements/MUCPayload.h | 9 | ||||
-rw-r--r-- | Swiften/Elements/Storage.h | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/Swiften/Elements/MUCPayload.h b/Swiften/Elements/MUCPayload.h index 3b99111..29cab8d 100644 --- a/Swiften/Elements/MUCPayload.h +++ b/Swiften/Elements/MUCPayload.h @@ -40,6 +40,10 @@ namespace Swift { since_ = since; } + void setPassword(const std::string& password) { + password_ = password; + } + int getMaxChars() const{ return maxChars_; } @@ -52,6 +56,10 @@ namespace Swift { return seconds_; } + const boost::optional<std::string>& getPassword() const { + return password_; + } + const boost::posix_time::ptime& getSince() const { return since_; } @@ -61,5 +69,6 @@ namespace Swift { int maxStanzas_; int seconds_; boost::posix_time::ptime since_; + boost::optional<std::string> password_; }; } diff --git a/Swiften/Elements/Storage.h b/Swiften/Elements/Storage.h index 8118b3b..03c958c 100644 --- a/Swiften/Elements/Storage.h +++ b/Swiften/Elements/Storage.h @@ -8,9 +8,12 @@ #include <vector> +#include <boost/optional.hpp> + #include <Swiften/Elements/Payload.h> #include <string> #include <Swiften/JID/JID.h> +#include <Swiften/Base/SafeString.h> namespace Swift { class Storage : public Payload { @@ -22,7 +25,7 @@ namespace Swift { JID jid; bool autoJoin; std::string nick; - std::string password; + boost::optional<std::string> password; }; struct URL { |