00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <boost/optional.hpp>
00010 #include <boost/date_time/posix_time/posix_time_types.hpp>
00011
00012 #include <Swiften/JID/JID.h>
00013 #include <string>
00014 #include <Swiften/Elements/Payload.h>
00015
00016 namespace Swift {
00017 class MUCPayload : public Payload {
00018 public:
00019 typedef boost::shared_ptr<MUCPayload> ref;
00020
00021 MUCPayload() {
00022 maxChars_ = -1;
00023 maxStanzas_ = -1;
00024 seconds_ = -1;
00025 }
00026
00027 void setMaxChars(int maxChars) {
00028 maxChars_ = maxChars;
00029 }
00030
00031 void setMaxStanzas(int maxStanzas) {
00032 maxStanzas_ = maxStanzas;
00033 }
00034
00035 void setSeconds(int seconds) {
00036 seconds_ = seconds;
00037 }
00038
00039 void setSince(boost::posix_time::ptime since) {
00040 since_ = since;
00041 }
00042
00043 void setPassword(const std::string& password) {
00044 password_ = password;
00045 }
00046
00047 int getMaxChars() const{
00048 return maxChars_;
00049 }
00050
00051 int getMaxStanzas() const{
00052 return maxStanzas_;
00053 }
00054
00055 int getSeconds() const {
00056 return seconds_;
00057 }
00058
00059 const boost::optional<std::string>& getPassword() const {
00060 return password_;
00061 }
00062
00063 const boost::posix_time::ptime& getSince() const {
00064 return since_;
00065 }
00066
00067 private:
00068 int maxChars_;
00069 int maxStanzas_;
00070 int seconds_;
00071 boost::posix_time::ptime since_;
00072 boost::optional<std::string> password_;
00073 };
00074 }