summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/MUCPayload.h9
-rw-r--r--Swiften/Elements/Storage.h5
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 {