diff options
Diffstat (limited to 'Swiften/Elements/MUCUserPayload.h')
-rw-r--r-- | Swiften/Elements/MUCUserPayload.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Swiften/Elements/MUCUserPayload.h b/Swiften/Elements/MUCUserPayload.h new file mode 100644 index 0000000..3032b9f --- /dev/null +++ b/Swiften/Elements/MUCUserPayload.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2010 Kevin Smith + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <boost/optional.hpp> + +#include "Swiften/JID/JID.h" +#include "Swiften/Base/String.h" +#include "Swiften/Elements/Payload.h" +#include "Swiften/MUC/MUCOccupant.h" + +namespace Swift { + class MUCUserPayload : public Payload { + public: + struct Item { + Item() : affiliation(MUCOccupant::NoAffiliation), role(MUCOccupant::NoRole) {} + boost::optional<JID> realJID; + boost::optional<String> nick; + MUCOccupant::Affiliation affiliation; + MUCOccupant::Role role; + }; + + struct StatusCode { + StatusCode() {} + int code; + }; + + // struct Password { + + // } + + // struct History { + + // } + + // struct Invite { + + // } + + MUCUserPayload() { + } + + void addItem(Item item) {items_.push_back(item);} + + void addStatusCode(StatusCode code) {statusCodes_.push_back(code);} + + const std::vector<Item> getItems() const {return items_;} + + const std::vector<StatusCode> getStatusCodes() const {return statusCodes_;} + + private: + std::vector<Item> items_; + std::vector<StatusCode> statusCodes_; + }; +} |