summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Elements/PubSubItem.cpp5
-rw-r--r--Swiften/Elements/PubSubItem.h18
-rw-r--r--Swiften/Elements/PubSubItems.h1
3 files changed, 13 insertions, 11 deletions
diff --git a/Swiften/Elements/PubSubItem.cpp b/Swiften/Elements/PubSubItem.cpp
index 4dc0907..b5f17cc 100644
--- a/Swiften/Elements/PubSubItem.cpp
+++ b/Swiften/Elements/PubSubItem.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -11,5 +11,8 @@ using namespace Swift;
PubSubItem::PubSubItem() {
}
+PubSubItem::PubSubItem(const std::string& id) : id_(id) {
+}
+
PubSubItem::~PubSubItem() {
}
diff --git a/Swiften/Elements/PubSubItem.h b/Swiften/Elements/PubSubItem.h
index ba13150..161b733 100644
--- a/Swiften/Elements/PubSubItem.h
+++ b/Swiften/Elements/PubSubItem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017 Isode Limited.
+ * Copyright (c) 2013-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -18,32 +18,32 @@ namespace Swift {
public:
PubSubItem();
+ PubSubItem(const std::string& id);
virtual ~PubSubItem();
const std::vector< std::shared_ptr<Payload> >& getData() const {
- return data;
+ return data_;
}
void setData(const std::vector< std::shared_ptr<Payload> >& value) {
- this->data = value ;
+ this->data_ = value ;
}
void addData(std::shared_ptr<Payload> value) {
- this->data.push_back(value);
+ this->data_.push_back(value);
}
const std::string& getID() const {
- return id;
+ return id_;
}
void setID(const std::string& value) {
- this->id = value ;
+ this->id_ = value ;
}
-
private:
- std::vector< std::shared_ptr<Payload> > data;
- std::string id;
+ std::vector< std::shared_ptr<Payload> > data_;
+ std::string id_;
};
}
diff --git a/Swiften/Elements/PubSubItems.h b/Swiften/Elements/PubSubItems.h
index c60adca..c8b7f53 100644
--- a/Swiften/Elements/PubSubItems.h
+++ b/Swiften/Elements/PubSubItems.h
@@ -61,7 +61,6 @@ namespace Swift {
this->subscriptionID = value ;
}
-
private:
std::string node;
std::vector< std::shared_ptr<PubSubItem> > items;