summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTarun Gupta <tarun1995gupta@gmail.com>2017-06-26 11:08:07 (GMT)
committerTobias Markmann <tm@ayena.de>2017-07-12 09:06:44 (GMT)
commit8f4d198c4d3aa55a5215061e84572d5faf4e4117 (patch)
tree95a6b0b29c10d9ab24ba16b1058640510b98370d /Swiften/Elements
parente5111d0125ad107e12150e0cb5447209189c5338 (diff)
downloadswift-8f4d198c4d3aa55a5215061e84572d5faf4e4117.zip
swift-8f4d198c4d3aa55a5215061e84572d5faf4e4117.tar.bz2
Add MIXSetNick Element, its Parser and Serializer
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXSetNick Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: I23081637f2aecf9fc5abc63147d01bfd4d2bb2f1
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/MIXSetNick.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/Swiften/Elements/MIXSetNick.h b/Swiften/Elements/MIXSetNick.h
new file mode 100644
index 0000000..94c5a3b
--- /dev/null
+++ b/Swiften/Elements/MIXSetNick.h
@@ -0,0 +1,35 @@
+/*
+ * 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 <Swiften/Base/API.h>
+#include <Swiften/Elements/Payload.h>
+
+namespace Swift {
+ class SWIFTEN_API MIXSetNick : public Payload {
+ public:
+ using ref = std::shared_ptr<MIXSetNick>;
+
+ public:
+
+ MIXSetNick() {}
+
+ const std::string& getNick() const {
+ return nick_;
+ }
+
+ void setNick(const std::string& nick) {
+ nick_ = nick;
+ }
+
+ private:
+ std::string nick_;
+ };
+}