diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-11-09 21:06:28 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-11-09 21:23:39 (GMT) |
commit | b23637e59839f5f28258f518ac234b2ff62b6da2 (patch) | |
tree | 260bb79caa0858d271959159a5913de121687a99 /Swiften/Elements | |
parent | f4d1b6494d5c537ba4a086d61ea86b1dd6843e4b (diff) | |
download | swift-b23637e59839f5f28258f518ac234b2ff62b6da2.zip swift-b23637e59839f5f28258f518ac234b2ff62b6da2.tar.bz2 |
Only request new MUC context when rejoining.
Resolves: #542
Release-Notes: On reconnects, existing MUC history now won't be replayed.
Diffstat (limited to 'Swiften/Elements')
-rw-r--r-- | Swiften/Elements/MUCPayload.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Swiften/Elements/MUCPayload.h b/Swiften/Elements/MUCPayload.h index 4b48b45..5d7c4f5 100644 --- a/Swiften/Elements/MUCPayload.h +++ b/Swiften/Elements/MUCPayload.h @@ -7,6 +7,7 @@ #pragma once #include <boost/optional.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> #include "Swiften/JID/JID.h" #include "Swiften/Base/String.h" @@ -14,6 +15,49 @@ namespace Swift { class MUCPayload : public Payload { + public: + MUCPayload() { + maxChars_ = -1; + maxStanzas_ = -1; + seconds_ = -1; + } + void setMaxChars(int maxChars) { + maxChars_ = maxChars; + } + + void setMaxStanzas(int maxStanzas) { + maxStanzas_ = maxStanzas; + } + + void setSeconds(int seconds) { + seconds_ = seconds; + } + + void setSince(boost::posix_time::ptime since) { + since_ = since; + } + + int getMaxChars() { + return maxChars_; + } + + int getMaxStanzas() { + return maxStanzas_; + } + + int getSeconds() { + return seconds_; + } + + boost::posix_time::ptime getSince() { + return since_; + } + + private: + int maxChars_; + int maxStanzas_; + int seconds_; + boost::posix_time::ptime since_; }; } |