summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-05-11 15:38:57 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-06-14 20:28:20 (GMT)
commit9b1c1ec6922047fa30c19c0744619dc458a12b78 (patch)
tree230a96de2a104324b8ab179834a7b9914c0443f9 /Swiften/Elements
parent0d5dcec01a396ab64c559a5b0cd04eb38f2f1954 (diff)
downloadswift-9b1c1ec6922047fa30c19c0744619dc458a12b78.zip
swift-9b1c1ec6922047fa30c19c0744619dc458a12b78.tar.bz2
Fix handling of notify attribute in PubSub retract elements
Test-Information: Added serializer and parser unit tests. All tests pass on Mac OS X 10.11.4. Change-Id: I8550c76ba182a67613d55634c72c0f2979f8b80a
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/PubSubRetract.cpp4
-rw-r--r--Swiften/Elements/PubSubRetract.h9
2 files changed, 7 insertions, 6 deletions
diff --git a/Swiften/Elements/PubSubRetract.cpp b/Swiften/Elements/PubSubRetract.cpp
index 90a63e6..1b188ee 100644
--- a/Swiften/Elements/PubSubRetract.cpp
+++ b/Swiften/Elements/PubSubRetract.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
using namespace Swift;
-PubSubRetract::PubSubRetract() : notify(false) {
+PubSubRetract::PubSubRetract() {
}
PubSubRetract::~PubSubRetract() {
diff --git a/Swiften/Elements/PubSubRetract.h b/Swiften/Elements/PubSubRetract.h
index 0d30c31..2629c16 100644
--- a/Swiften/Elements/PubSubRetract.h
+++ b/Swiften/Elements/PubSubRetract.h
@@ -10,8 +10,9 @@
#include <string>
#include <vector>
+#include <boost/optional.hpp>
+
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Payload.h>
#include <Swiften/Elements/PubSubItem.h>
#include <Swiften/Elements/PubSubPayload.h>
@@ -44,11 +45,11 @@ namespace Swift {
this->items.push_back(value);
}
- bool isNotify() const {
+ boost::optional<bool> isNotify() const {
return notify;
}
- void setNotify(bool value) {
+ void setNotify(const boost::optional<bool>& value) {
this->notify = value ;
}
@@ -56,6 +57,6 @@ namespace Swift {
private:
std::string node;
std::vector< std::shared_ptr<PubSubItem> > items;
- bool notify;
+ boost::optional<bool> notify;
};
}