diff options
author | Tarun Gupta <tarun1995gupta@gmail.com> | 2017-06-24 16:09:39 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-07-03 19:02:35 (GMT) |
commit | 4f61e116c83be5e38a8406ac3285a07b84712ec1 (patch) | |
tree | 1e7b2c908b1bc8e59b675ff940c32f2b505ccb55 /Swiften/Elements | |
parent | e142d11c3fa6ae2bdfc95ee9cea54bb0000917c9 (diff) | |
download | swift-4f61e116c83be5e38a8406ac3285a07b84712ec1.zip swift-4f61e116c83be5e38a8406ac3285a07b84712ec1.tar.bz2 |
Adds MIX Create Element, its Parser and Serializer
License:
This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Test-Information:
Added tests for MIX Create Parser and Serializer based on
examples in XEP 0369, which passes.
Change-Id: I33b85c8243d55cd293c886f2607bdd9dec6c7bdb
Diffstat (limited to 'Swiften/Elements')
-rw-r--r-- | Swiften/Elements/MIXCreate.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Swiften/Elements/MIXCreate.h b/Swiften/Elements/MIXCreate.h new file mode 100644 index 0000000..0fab463 --- /dev/null +++ b/Swiften/Elements/MIXCreate.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017 Tarun Gupta + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <memory> + +#include <boost/optional.hpp> + +#include <Swiften/Base/API.h> +#include <Swiften/Elements/Form.h> +#include <Swiften/Elements/Payload.h> + +namespace Swift { + class SWIFTEN_API MIXCreate : public Payload { + public: + using ref = std::shared_ptr<MIXCreate>; + + public: + + MIXCreate() {} + + std::shared_ptr<Form> getData() const { + return data_; + } + + void setData(std::shared_ptr<Form> value) { + this->data_ = value ; + } + + const boost::optional<std::string>& getChannel() const { + return channel_; + } + + void setChannel(const std::string& channel) { + this->channel_ = channel; + } + + private: + boost::optional<std::string> channel_; + std::shared_ptr<Form> data_; + }; +} |