summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarun Gupta <tarun1995gupta@gmail.com>2017-06-24 18:12:41 (GMT)
committerTobias Markmann <tm@ayena.de>2017-07-11 08:10:47 (GMT)
commit8b3082e5fa56540714f3ce9b72f87965a62b5d14 (patch)
tree90ab1f432b97b2103de3708b0b6831425ccc2219 /Swiften/Elements
parentf68d574ff04162e98e16a636c66ab6de5960e875 (diff)
downloadswift-8b3082e5fa56540714f3ce9b72f87965a62b5d14.zip
swift-8b3082e5fa56540714f3ce9b72f87965a62b5d14.tar.bz2
Add MIXPayload, its Parser and Serializer
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXPayload Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: I45da05d6fe57b4be7ed8534dd84cbf0fd31ced1a
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/MIXPayload.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/Swiften/Elements/MIXPayload.h b/Swiften/Elements/MIXPayload.h
new file mode 100644
index 0000000..3989c18
--- /dev/null
+++ b/Swiften/Elements/MIXPayload.h
@@ -0,0 +1,56 @@
+/*
+ * 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 <string>
+
+#include <boost/optional.hpp>
+
+#include <Swiften/Base/API.h>
+#include <Swiften/Elements/Payload.h>
+#include <Swiften/JID/JID.h>
+
+namespace Swift {
+ class SWIFTEN_API MIXPayload : public Payload {
+ public:
+ using ref = std::shared_ptr<MIXPayload>;
+
+ public:
+
+ MIXPayload() {}
+
+ const boost::optional<std::string>& getNick() const {
+ return nick_;
+ }
+
+ void setNick(const std::string& nick) {
+ nick_ = nick;
+ }
+
+ const boost::optional<JID>& getJID() const {
+ return jid_;
+ }
+
+ void setJID(const JID& jid) {
+ jid_ = jid;
+ }
+
+ const boost::optional<std::string>& getSubmissionID() const {
+ return submissionId_;
+ }
+
+ void setSubmissionID(const std::string& submissionId) {
+ submissionId_ = submissionId;
+ }
+
+ private:
+ boost::optional<JID> jid_;
+ boost::optional<std::string> nick_;
+ boost::optional<std::string> submissionId_;
+ };
+}