summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2013-03-08 15:17:30 (GMT)
committerTobias Markmann <tm@ayena.de>2013-03-27 14:12:26 (GMT)
commit497b647fe034a3d2cdc6d75ce0ff70e3df3aaf04 (patch)
treedc81e56199f54cf20f834c78bda7fc26ffbc38f9 /Swiften/Elements
parent20ead0a84fdd8c9e870e98ee6a2712bfa263d7fb (diff)
downloadswift-497b647fe034a3d2cdc6d75ce0ff70e3df3aaf04.zip
swift-497b647fe034a3d2cdc6d75ce0ff70e3df3aaf04.tar.bz2
Adding support for Blocking Command (XEP-0191) to Swift(-en).
Change-Id: I7c92518dc389474d520d4cf96f96a11459f73d26 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/BlockListPayload.h2
-rw-r--r--Swiften/Elements/BlockPayload.h2
-rw-r--r--Swiften/Elements/DiscoInfo.cpp1
-rw-r--r--Swiften/Elements/DiscoInfo.h1
-rw-r--r--Swiften/Elements/UnblockPayload.h2
5 files changed, 5 insertions, 3 deletions
diff --git a/Swiften/Elements/BlockListPayload.h b/Swiften/Elements/BlockListPayload.h
index 25cb602..49df75f 100644
--- a/Swiften/Elements/BlockListPayload.h
+++ b/Swiften/Elements/BlockListPayload.h
@@ -14,7 +14,7 @@
namespace Swift {
class BlockListPayload : public Payload {
public:
- BlockListPayload() {
+ BlockListPayload(const std::vector<JID>& items = std::vector<JID>()) : items(items) {
}
void addItem(const JID& item) {
diff --git a/Swiften/Elements/BlockPayload.h b/Swiften/Elements/BlockPayload.h
index 6dd5170..49a0463 100644
--- a/Swiften/Elements/BlockPayload.h
+++ b/Swiften/Elements/BlockPayload.h
@@ -14,7 +14,7 @@
namespace Swift {
class BlockPayload : public Payload {
public:
- BlockPayload() {
+ BlockPayload(const std::vector<JID>& jids = std::vector<JID>()) : items(jids) {
}
void addItem(const JID& jid) {
diff --git a/Swiften/Elements/DiscoInfo.cpp b/Swiften/Elements/DiscoInfo.cpp
index 1683916..f353c42 100644
--- a/Swiften/Elements/DiscoInfo.cpp
+++ b/Swiften/Elements/DiscoInfo.cpp
@@ -23,6 +23,7 @@ const std::string DiscoInfo::JingleTransportsS5BFeature = std::string("urn:xmpp:
const std::string DiscoInfo::Bytestream = std::string("http://jabber.org/protocol/bytestreams");
const std::string DiscoInfo::MessageDeliveryReceiptsFeature = std::string("urn:xmpp:receipts");
const std::string DiscoInfo::WhiteboardFeature = std::string("http://swift.im/whiteboard");
+const std::string DiscoInfo::BlockingCommandFeature = std::string("urn:xmpp:blocking");
bool DiscoInfo::Identity::operator<(const Identity& other) const {
if (category_ == other.category_) {
diff --git a/Swiften/Elements/DiscoInfo.h b/Swiften/Elements/DiscoInfo.h
index 3334ac8..3701096 100644
--- a/Swiften/Elements/DiscoInfo.h
+++ b/Swiften/Elements/DiscoInfo.h
@@ -34,6 +34,7 @@ namespace Swift {
static const std::string Bytestream;
static const std::string MessageDeliveryReceiptsFeature;
static const std::string WhiteboardFeature;
+ static const std::string BlockingCommandFeature;
class Identity {
public:
diff --git a/Swiften/Elements/UnblockPayload.h b/Swiften/Elements/UnblockPayload.h
index b6593ab..c5e7c80 100644
--- a/Swiften/Elements/UnblockPayload.h
+++ b/Swiften/Elements/UnblockPayload.h
@@ -14,7 +14,7 @@
namespace Swift {
class UnblockPayload : public Payload {
public:
- UnblockPayload() {
+ UnblockPayload(const std::vector<JID>& jids = std::vector<JID>()) : items(jids) {
}
void addItem(const JID& item) {