summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-01 17:23:49 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-04 08:28:23 (GMT)
commit741c45b74d5f634622eb5f757c49323274fb8937 (patch)
treeb9cfa6c2fe2e79e03cc8cb7c1ca1e9cf45aa5328 /Swiften/Parser/PayloadParsers
parenteddd92ed76ae68cb1e202602fd3ebd11b69191a2 (diff)
downloadswift-741c45b74d5f634622eb5f757c49323274fb8937.zip
swift-741c45b74d5f634622eb5f757c49323274fb8937.tar.bz2
Modernize code to use C++11 shared_ptr instead of Boost's
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
Diffstat (limited to 'Swiften/Parser/PayloadParsers')
-rw-r--r--Swiften/Parser/PayloadParsers/CarbonsReceivedParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/CarbonsReceivedParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/CarbonsSentParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/CarbonsSentParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/CommandParser.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/ErrorParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/FormParser.cpp14
-rw-r--r--Swiften/Parser/PayloadParsers/FormParser.h8
-rw-r--r--Swiften/Parser/PayloadParsers/ForwardedParser.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/ForwardedParser.h6
-rw-r--r--Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp154
-rw-r--r--Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h5
-rw-r--r--Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/JingleContentPayloadParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/JingleContentPayloadParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.cpp7
-rw-r--r--Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/JingleParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/JingleParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/MAMFinParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/MAMFinParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/MAMQueryParser.cpp8
-rw-r--r--Swiften/Parser/PayloadParsers/MAMQueryParser.h7
-rw-r--r--Swiften/Parser/PayloadParsers/MAMResultParser.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/MAMResultParser.h5
-rw-r--r--Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PrivateStorageParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubAffiliationParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubConfigureParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubConfigureParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubCreateParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubDefaultParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubErrorParser.h2
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventAssociateParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventDisassociateParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventItemParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventItemsParser.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventItemsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventParser.cpp16
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventPurgeParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventRedirectParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventRetractParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubEventSubscriptionParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubItemParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubItemsParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubItemsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOptionsParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOptionsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.cpp16
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerPurgeParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerRedirectParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubParser.cpp36
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubParser.h8
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubPublishParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubPublishParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubRetractParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubRetractParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubSubscribeOptionsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubSubscribeParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/PubSubUnsubscribeParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/ResultSetParser.h2
-rw-r--r--Swiften/Parser/PayloadParsers/SecurityLabelParser.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/SecurityLabelParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h4
-rw-r--r--Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/CarbonsParserTest.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/DeliveryReceiptParserTest.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/DiscoInfoParserTest.cpp8
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp8
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/ErrorParserTest.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/ForwardedParserTest.cpp16
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/MAMFinParserTest.cpp8
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/MAMQueryParserTest.cpp16
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/MAMResultParserTest.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/MUCAdminPayloadParserTest.cpp4
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/MUCUserPayloadParserTest.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h8
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/PriorityParserTest.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp12
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/ReplaceTest.cpp10
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/ResultSetParserTest.cpp6
-rw-r--r--Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp2
-rw-r--r--Swiften/Parser/PayloadParsers/UserLocationParser.h3
-rw-r--r--Swiften/Parser/PayloadParsers/UserTuneParser.h3
-rw-r--r--Swiften/Parser/PayloadParsers/WhiteboardParser.cpp27
117 files changed, 427 insertions, 414 deletions
diff --git a/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.cpp b/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.cpp
index d6fb6be..e4f8ab9 100644
--- a/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.cpp
+++ b/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,7 +16,7 @@ namespace Swift {
void CarbonsReceivedParser::handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
if (level_ == PayloadLevel) {
if (element == "forwarded") {
- forwardedParser_ = boost::dynamic_pointer_cast<ForwardedParser>(boost::make_shared<ForwardedParser>(factories_));
+ forwardedParser_ = std::dynamic_pointer_cast<ForwardedParser>(std::make_shared<ForwardedParser>(factories_));
}
}
if (forwardedParser_) {
diff --git a/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.h b/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.h
index 666f20b..6cc1f43 100644
--- a/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.h
+++ b/Swiften/Parser/PayloadParsers/CarbonsReceivedParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -29,7 +29,7 @@ namespace Swift {
private:
PayloadParserFactoryCollection* factories_;
- boost::shared_ptr<ForwardedParser> forwardedParser_;
+ std::shared_ptr<ForwardedParser> forwardedParser_;
int level_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/CarbonsSentParser.cpp b/Swiften/Parser/PayloadParsers/CarbonsSentParser.cpp
index e616211..f446042 100644
--- a/Swiften/Parser/PayloadParsers/CarbonsSentParser.cpp
+++ b/Swiften/Parser/PayloadParsers/CarbonsSentParser.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,7 +16,7 @@ namespace Swift {
void CarbonsSentParser::handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
if (level_ == PayloadLevel) {
if (element == "forwarded") {
- forwardedParser_ = boost::dynamic_pointer_cast<ForwardedParser>(boost::make_shared<ForwardedParser>(factories_));
+ forwardedParser_ = std::dynamic_pointer_cast<ForwardedParser>(std::make_shared<ForwardedParser>(factories_));
}
}
if (forwardedParser_) {
diff --git a/Swiften/Parser/PayloadParsers/CarbonsSentParser.h b/Swiften/Parser/PayloadParsers/CarbonsSentParser.h
index 9faf62d..d4e12ba 100644
--- a/Swiften/Parser/PayloadParsers/CarbonsSentParser.h
+++ b/Swiften/Parser/PayloadParsers/CarbonsSentParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -29,7 +29,7 @@ namespace Swift {
private:
PayloadParserFactoryCollection* factories_;
- boost::shared_ptr<ForwardedParser> forwardedParser_;
+ std::shared_ptr<ForwardedParser> forwardedParser_;
int level_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/CommandParser.cpp b/Swiften/Parser/PayloadParsers/CommandParser.cpp
index bdfeaec..cb6fc0a 100644
--- a/Swiften/Parser/PayloadParsers/CommandParser.cpp
+++ b/Swiften/Parser/PayloadParsers/CommandParser.cpp
@@ -89,7 +89,7 @@ void CommandParser::handleEndElement(const std::string& element, const std::stri
if (level_ == FormOrNoteOrActionsLevel) {
if (formParser_) {
- Form::ref form(boost::dynamic_pointer_cast<Form>(formParser_->getPayload()));
+ Form::ref form(std::dynamic_pointer_cast<Form>(formParser_->getPayload()));
assert(form);
getPayloadInternal()->setForm(form);
delete formParser_;
diff --git a/Swiften/Parser/PayloadParsers/ErrorParser.h b/Swiften/Parser/PayloadParsers/ErrorParser.h
index dd1aa95..10f5431 100644
--- a/Swiften/Parser/PayloadParsers/ErrorParser.h
+++ b/Swiften/Parser/PayloadParsers/ErrorParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -28,6 +28,6 @@ namespace Swift {
PayloadParserFactoryCollection* factories;
int level_;
std::string currentText_;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/FormParser.cpp b/Swiften/Parser/PayloadParsers/FormParser.cpp
index 3a2c880..4a0a26f 100644
--- a/Swiften/Parser/PayloadParsers/FormParser.cpp
+++ b/Swiften/Parser/PayloadParsers/FormParser.cpp
@@ -45,7 +45,7 @@ void FormParser::handleStartElement(const std::string& element, const std::strin
parsingItem_ = true;
}
else if (element == "page") {
- currentPage_ = boost::make_shared<FormPage>();
+ currentPage_ = std::make_shared<FormPage>();
currentPage_->setLabel(attributes.getAttribute("label"));
}
}
@@ -59,7 +59,7 @@ void FormParser::handleStartElement(const std::string& element, const std::strin
}
if (level_ >= PayloadLevel) {
if (element == "field") {
- currentField_ = boost::make_shared<FormField>();
+ currentField_ = std::make_shared<FormField>();
std::string type = attributes.getAttribute("type");
FormField::Type fieldType = FormField::UnknownType;
if (type == "boolean") {
@@ -102,13 +102,13 @@ void FormParser::handleStartElement(const std::string& element, const std::strin
}
if (level_ > PayloadLevel) {
if (element == "section") {
- currentSection_ = boost::make_shared<FormSection>();
+ currentSection_ = std::make_shared<FormSection>();
currentSection_->setLabel(attributes.getAttribute("label"));
sectionStack_.push_back(currentSection_);
currentSections_.push_back(currentSection_);
}
if (element == "reportedref") {
- currentReportedRef_ = boost::make_shared<FormReportedRef>();
+ currentReportedRef_ = std::make_shared<FormReportedRef>();
}
if (element == "fieldref") {
currentText_.clear();
@@ -121,7 +121,7 @@ void FormParser::handleStartElement(const std::string& element, const std::strin
}
if (element == "text") {
currentText_.clear();
- currentTextElement_ = boost::make_shared<FormText>();
+ currentTextElement_ = std::make_shared<FormText>();
}
}
++level_;
@@ -191,14 +191,14 @@ void FormParser::handleEndElement(const std::string& element, const std::string&
}
else {
if (currentPages_.size() > 0) {
- foreach (boost::shared_ptr<FormPage> page, currentPages_) {
+ foreach (std::shared_ptr<FormPage> page, currentPages_) {
foreach (std::string pageRef, page->getFieldRefs()) {
if (pageRef == currentField_->getName()) {
page->addField(currentField_);
}
}
}
- foreach (boost::shared_ptr<FormSection> section, currentSections_) {
+ foreach (std::shared_ptr<FormSection> section, currentSections_) {
foreach (std::string sectionRef, section->getFieldRefs()) {
if (sectionRef == currentField_->getName()) {
section->addField(currentField_);
diff --git a/Swiften/Parser/PayloadParsers/FormParser.h b/Swiften/Parser/PayloadParsers/FormParser.h
index 81032ee..e1491b1 100644
--- a/Swiften/Parser/PayloadParsers/FormParser.h
+++ b/Swiften/Parser/PayloadParsers/FormParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -39,8 +39,8 @@ namespace Swift {
FormReportedRef::ref currentReportedRef_;
FormPage::page currentPage_;
FormSection::section currentSection_;
- std::vector<boost::shared_ptr<FormPage> > currentPages_;
- std::vector<boost::shared_ptr<FormSection> > sectionStack_;
- std::vector<boost::shared_ptr<FormSection> > currentSections_;
+ std::vector<std::shared_ptr<FormPage> > currentPages_;
+ std::vector<std::shared_ptr<FormSection> > sectionStack_;
+ std::vector<std::shared_ptr<FormSection> > currentSections_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/ForwardedParser.cpp b/Swiften/Parser/PayloadParsers/ForwardedParser.cpp
index 35d20a9..72a665a 100644
--- a/Swiften/Parser/PayloadParsers/ForwardedParser.cpp
+++ b/Swiften/Parser/PayloadParsers/ForwardedParser.cpp
@@ -25,13 +25,13 @@ ForwardedParser::ForwardedParser(PayloadParserFactoryCollection* factories) : fa
void ForwardedParser::handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
if (level_ == PayloadLevel) {
if (element == "iq" && ns == "jabber:client") { /* begin parsing a nested stanza? */
- childParser_ = boost::dynamic_pointer_cast<StanzaParser>(boost::make_shared<IQParser>(factories_));
+ childParser_ = std::dynamic_pointer_cast<StanzaParser>(std::make_shared<IQParser>(factories_));
} else if (element == "message" && ns == "jabber:client") {
- childParser_ = boost::dynamic_pointer_cast<StanzaParser>(boost::make_shared<MessageParser>(factories_));
+ childParser_ = std::dynamic_pointer_cast<StanzaParser>(std::make_shared<MessageParser>(factories_));
} else if (element == "presence" && ns == "jabber:client") {
- childParser_ = boost::dynamic_pointer_cast<StanzaParser>(boost::make_shared<PresenceParser>(factories_));
+ childParser_ = std::dynamic_pointer_cast<StanzaParser>(std::make_shared<PresenceParser>(factories_));
} else if (element == "delay" && ns == "urn:xmpp:delay") { /* nested delay payload */
- delayParser_ = boost::make_shared<DelayParser>();
+ delayParser_ = std::make_shared<DelayParser>();
}
}
if (childParser_) { /* parsing a nested stanza? */
@@ -58,7 +58,7 @@ void ForwardedParser::handleEndElement(const std::string& element, const std::st
}
if (delayParser_ && level_ == PayloadLevel) {
/* done parsing nested delay payload */
- getPayloadInternal()->setDelay(boost::dynamic_pointer_cast<Delay>(delayParser_->getPayload()));
+ getPayloadInternal()->setDelay(std::dynamic_pointer_cast<Delay>(delayParser_->getPayload()));
delayParser_.reset();
}
}
diff --git a/Swiften/Parser/PayloadParsers/ForwardedParser.h b/Swiften/Parser/PayloadParsers/ForwardedParser.h
index 70eecdf..f91fda5 100644
--- a/Swiften/Parser/PayloadParsers/ForwardedParser.h
+++ b/Swiften/Parser/PayloadParsers/ForwardedParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -33,8 +33,8 @@ namespace Swift {
private:
PayloadParserFactoryCollection* factories_;
- boost::shared_ptr<StanzaParser> childParser_;
- boost::shared_ptr<DelayParser> delayParser_;
+ std::shared_ptr<StanzaParser> childParser_;
+ std::shared_ptr<DelayParser> delayParser_;
int level_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp
index d59d9a0..a231397 100644
--- a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp
+++ b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp
@@ -89,87 +89,85 @@
#include <Swiften/Parser/PayloadParsers/VCardUpdateParser.h>
#include <Swiften/Parser/PayloadParsers/WhiteboardParser.h>
-using namespace boost;
-
namespace Swift {
FullPayloadParserFactoryCollection::FullPayloadParserFactoryCollection() {
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<IBBParser> >("", "http://jabber.org/protocol/ibb"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<StatusShowParser> >("show"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<StatusParser> >("status"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<ReplaceParser> >("replace", "http://swift.im/protocol/replace"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<ReplaceParser> >("replace", "urn:xmpp:message-correct:0"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<LastParser> >("query", "jabber:iq:last"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<BodyParser> >("body"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<SubjectParser> >("subject"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<ThreadParser> >("thread"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<PriorityParser> >("priority"));
- factories_.push_back(boost::make_shared<ErrorParserFactory>(this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<DelayParser> >("delay", "urn:xmpp:delay"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<SoftwareVersionParser> >("query", "jabber:iq:version"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<StorageParser> >("storage", "storage:bookmarks"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<RosterItemExchangeParser> >("x", "http://jabber.org/protocol/rosterx"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<RosterParser> >("query", "jabber:iq:roster"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<DiscoInfoParser> >("query", "http://jabber.org/protocol/disco#info"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<DiscoItemsParser> >("query", "http://jabber.org/protocol/disco#items"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<CapsInfoParser> >("c", "http://jabber.org/protocol/caps"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<ResourceBindParser> >("bind", "urn:ietf:params:xml:ns:xmpp-bind"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<StartSessionParser> >("session", "urn:ietf:params:xml:ns:xmpp-session"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<BlockParser<BlockPayload> > >("block", "urn:xmpp:blocking"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<BlockParser<BlockListPayload> > >("blocklist", "urn:xmpp:blocking"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<BlockParser<UnblockPayload> > >("unblock", "urn:xmpp:blocking"));
- factories_.push_back(boost::make_shared<SecurityLabelParserFactory>());
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<SecurityLabelsCatalogParser> >("catalog", "urn:xmpp:sec-label:catalog:2"));
- factories_.push_back(boost::make_shared<FormParserFactory>());
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<CommandParser> >("command", "http://jabber.org/protocol/commands"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<InBandRegistrationPayloadParser> >("query", "jabber:iq:register"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<SearchPayloadParser> >("query", "jabber:iq:search"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<StreamInitiationParser> >("si", "http://jabber.org/protocol/si"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<BytestreamsParser> >("query", "http://jabber.org/protocol/bytestreams"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<VCardUpdateParser> >("x", "vcard-temp:x:update"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<VCardParser> >("vCard", "vcard-temp"));
- factories_.push_back(boost::make_shared<PrivateStorageParserFactory>(this));
- factories_.push_back(boost::make_shared<ChatStateParserFactory>());
- factories_.push_back(boost::make_shared<MUCUserPayloadParserFactory>(this));
- factories_.push_back(boost::make_shared<MUCOwnerPayloadParserFactory>(this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<MUCInvitationPayloadParser> >("x", "jabber:x:conference"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<MUCAdminPayloadParser> >("query", "http://jabber.org/protocol/muc#admin"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<MUCDestroyPayloadParser> >("destroy", "http://jabber.org/protocol/muc#user"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<MUCDestroyPayloadParser> >("destroy", "http://jabber.org/protocol/muc#owner"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<NicknameParser> >("nick", "http://jabber.org/protocol/nick"));
- factories_.push_back(boost::make_shared<JingleParserFactory>(this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<JingleReasonParser> >("reason", "urn:xmpp:jingle:1"));
- factories_.push_back(boost::make_shared<JingleContentPayloadParserFactory>(this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<JingleIBBTransportMethodPayloadParser> >("transport", "urn:xmpp:jingle:transports:ibb:1"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<JingleS5BTransportMethodPayloadParser> >("transport", "urn:xmpp:jingle:transports:s5b:1"));
- factories_.push_back(boost::make_shared<JingleFileTransferDescriptionParserFactory>(this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<StreamInitiationFileInfoParser> >("file", "http://jabber.org/protocol/si/profile/file-transfer"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<JingleFileTransferFileInfoParser> >("file", "urn:xmpp:jingle:apps:file-transfer:4"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<JingleFileTransferHashParser> >("checksum"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<S5BProxyRequestParser> >("query", "http://jabber.org/protocol/bytestreams"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<WhiteboardParser> >("wb", "http://swift.im/whiteboard"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<UserLocationParser> >("geoloc", "http://jabber.org/protocol/geoloc"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<UserTuneParser> >("tune", "http://jabber.org/protocol/tune"));
- factories_.push_back(boost::make_shared<DeliveryReceiptParserFactory>());
- factories_.push_back(boost::make_shared<DeliveryReceiptRequestParserFactory>());
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<IdleParser> >("idle", "urn:xmpp:idle:1"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<PubSubParser> >("pubsub", "http://jabber.org/protocol/pubsub", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<PubSubOwnerPubSubParser> >("pubsub", "http://jabber.org/protocol/pubsub#owner", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<PubSubEventParser> >("event", "http://jabber.org/protocol/pubsub#event", this));
- factories_.push_back(boost::make_shared<PubSubErrorParserFactory>());
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<ResultSetParser> >("set", "http://jabber.org/protocol/rsm"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<ForwardedParser> >("forwarded", "urn:xmpp:forward:0", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<MAMResultParser> >("result", "urn:xmpp:mam:0", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<MAMQueryParser> >("query", "urn:xmpp:mam:0"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<MAMFinParser> >("fin", "urn:xmpp:mam:0"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<IsodeIQDelegationParser> >("delegate", "http://isode.com/iq_delegation", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<CarbonsEnableParser> >("enable", "urn:xmpp:carbons:2"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<CarbonsDisableParser> >("disable", "urn:xmpp:carbons:2"));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<CarbonsReceivedParser> >("received", "urn:xmpp:carbons:2", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory2<CarbonsSentParser> >("sent", "urn:xmpp:carbons:2", this));
- factories_.push_back(boost::make_shared<GenericPayloadParserFactory<CarbonsPrivateParser> >("private", "urn:xmpp:carbons:2"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<IBBParser> >("", "http://jabber.org/protocol/ibb"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<StatusShowParser> >("show"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<StatusParser> >("status"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<ReplaceParser> >("replace", "http://swift.im/protocol/replace"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<ReplaceParser> >("replace", "urn:xmpp:message-correct:0"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<LastParser> >("query", "jabber:iq:last"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<BodyParser> >("body"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<SubjectParser> >("subject"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<ThreadParser> >("thread"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<PriorityParser> >("priority"));
+ factories_.push_back(std::make_shared<ErrorParserFactory>(this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<DelayParser> >("delay", "urn:xmpp:delay"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<SoftwareVersionParser> >("query", "jabber:iq:version"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<StorageParser> >("storage", "storage:bookmarks"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<RosterItemExchangeParser> >("x", "http://jabber.org/protocol/rosterx"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<RosterParser> >("query", "jabber:iq:roster"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<DiscoInfoParser> >("query", "http://jabber.org/protocol/disco#info"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<DiscoItemsParser> >("query", "http://jabber.org/protocol/disco#items"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<CapsInfoParser> >("c", "http://jabber.org/protocol/caps"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<ResourceBindParser> >("bind", "urn:ietf:params:xml:ns:xmpp-bind"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<StartSessionParser> >("session", "urn:ietf:params:xml:ns:xmpp-session"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<BlockParser<BlockPayload> > >("block", "urn:xmpp:blocking"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<BlockParser<BlockListPayload> > >("blocklist", "urn:xmpp:blocking"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<BlockParser<UnblockPayload> > >("unblock", "urn:xmpp:blocking"));
+ factories_.push_back(std::make_shared<SecurityLabelParserFactory>());
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<SecurityLabelsCatalogParser> >("catalog", "urn:xmpp:sec-label:catalog:2"));
+ factories_.push_back(std::make_shared<FormParserFactory>());
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<CommandParser> >("command", "http://jabber.org/protocol/commands"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<InBandRegistrationPayloadParser> >("query", "jabber:iq:register"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<SearchPayloadParser> >("query", "jabber:iq:search"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<StreamInitiationParser> >("si", "http://jabber.org/protocol/si"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<BytestreamsParser> >("query", "http://jabber.org/protocol/bytestreams"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<VCardUpdateParser> >("x", "vcard-temp:x:update"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<VCardParser> >("vCard", "vcard-temp"));
+ factories_.push_back(std::make_shared<PrivateStorageParserFactory>(this));
+ factories_.push_back(std::make_shared<ChatStateParserFactory>());
+ factories_.push_back(std::make_shared<MUCUserPayloadParserFactory>(this));
+ factories_.push_back(std::make_shared<MUCOwnerPayloadParserFactory>(this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<MUCInvitationPayloadParser> >("x", "jabber:x:conference"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<MUCAdminPayloadParser> >("query", "http://jabber.org/protocol/muc#admin"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<MUCDestroyPayloadParser> >("destroy", "http://jabber.org/protocol/muc#user"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<MUCDestroyPayloadParser> >("destroy", "http://jabber.org/protocol/muc#owner"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<NicknameParser> >("nick", "http://jabber.org/protocol/nick"));
+ factories_.push_back(std::make_shared<JingleParserFactory>(this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<JingleReasonParser> >("reason", "urn:xmpp:jingle:1"));
+ factories_.push_back(std::make_shared<JingleContentPayloadParserFactory>(this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<JingleIBBTransportMethodPayloadParser> >("transport", "urn:xmpp:jingle:transports:ibb:1"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<JingleS5BTransportMethodPayloadParser> >("transport", "urn:xmpp:jingle:transports:s5b:1"));
+ factories_.push_back(std::make_shared<JingleFileTransferDescriptionParserFactory>(this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<StreamInitiationFileInfoParser> >("file", "http://jabber.org/protocol/si/profile/file-transfer"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<JingleFileTransferFileInfoParser> >("file", "urn:xmpp:jingle:apps:file-transfer:4"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<JingleFileTransferHashParser> >("checksum"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<S5BProxyRequestParser> >("query", "http://jabber.org/protocol/bytestreams"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<WhiteboardParser> >("wb", "http://swift.im/whiteboard"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<UserLocationParser> >("geoloc", "http://jabber.org/protocol/geoloc"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<UserTuneParser> >("tune", "http://jabber.org/protocol/tune"));
+ factories_.push_back(std::make_shared<DeliveryReceiptParserFactory>());
+ factories_.push_back(std::make_shared<DeliveryReceiptRequestParserFactory>());
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<IdleParser> >("idle", "urn:xmpp:idle:1"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<PubSubParser> >("pubsub", "http://jabber.org/protocol/pubsub", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<PubSubOwnerPubSubParser> >("pubsub", "http://jabber.org/protocol/pubsub#owner", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<PubSubEventParser> >("event", "http://jabber.org/protocol/pubsub#event", this));
+ factories_.push_back(std::make_shared<PubSubErrorParserFactory>());
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<ResultSetParser> >("set", "http://jabber.org/protocol/rsm"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<ForwardedParser> >("forwarded", "urn:xmpp:forward:0", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<MAMResultParser> >("result", "urn:xmpp:mam:0", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<MAMQueryParser> >("query", "urn:xmpp:mam:0"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<MAMFinParser> >("fin", "urn:xmpp:mam:0"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<IsodeIQDelegationParser> >("delegate", "http://isode.com/iq_delegation", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<CarbonsEnableParser> >("enable", "urn:xmpp:carbons:2"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<CarbonsDisableParser> >("disable", "urn:xmpp:carbons:2"));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<CarbonsReceivedParser> >("received", "urn:xmpp:carbons:2", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory2<CarbonsSentParser> >("sent", "urn:xmpp:carbons:2", this));
+ factories_.push_back(std::make_shared<GenericPayloadParserFactory<CarbonsPrivateParser> >("private", "urn:xmpp:carbons:2"));
- foreach(shared_ptr<PayloadParserFactory> factory, factories_) {
+ foreach(std::shared_ptr<PayloadParserFactory> factory, factories_) {
addFactory(factory.get());
}
defaultFactory_ = new RawXMLPayloadParserFactory();
@@ -179,7 +177,7 @@ FullPayloadParserFactoryCollection::FullPayloadParserFactoryCollection() {
FullPayloadParserFactoryCollection::~FullPayloadParserFactoryCollection() {
setDefaultFactory(nullptr);
delete defaultFactory_;
- foreach(shared_ptr<PayloadParserFactory> factory, factories_) {
+ foreach(std::shared_ptr<PayloadParserFactory> factory, factories_) {
removeFactory(factory.get());
}
}
diff --git a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h
index 210e85e..e59a6e0 100644
--- a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h
+++ b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <vector>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Parser/PayloadParserFactory.h>
#include <Swiften/Parser/PayloadParserFactoryCollection.h>
@@ -21,7 +20,7 @@ namespace Swift {
~FullPayloadParserFactoryCollection();
private:
- std::vector< boost::shared_ptr<PayloadParserFactory> > factories_;
+ std::vector< std::shared_ptr<PayloadParserFactory> > factories_;
PayloadParserFactory* defaultFactory_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.cpp b/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.cpp
index 6bdd517..ddcd425 100644
--- a/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.cpp
+++ b/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -46,7 +46,7 @@ void IsodeIQDelegationParser::handleEndElement(const std::string& element, const
}
if (level == 1) {
- getPayloadInternal()->setForward(boost::dynamic_pointer_cast<Forwarded>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setForward(std::dynamic_pointer_cast<Forwarded>(currentPayloadParser->getPayload()));
currentPayloadParser.reset();
}
}
diff --git a/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.h b/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.h
index cf86a1a..eaedd27 100644
--- a/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.h
+++ b/Swiften/Parser/PayloadParsers/IsodeIQDelegationParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.cpp b/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.cpp
index 30404f3..3a01676 100644
--- a/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.cpp
+++ b/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.cpp
@@ -59,12 +59,12 @@ namespace Swift {
}
if (level == 1) {
- boost::shared_ptr<JingleTransportPayload> transport = boost::dynamic_pointer_cast<JingleTransportPayload>(currentPayloadParser->getPayload());
+ std::shared_ptr<JingleTransportPayload> transport = std::dynamic_pointer_cast<JingleTransportPayload>(currentPayloadParser->getPayload());
if (transport) {
getPayloadInternal()->addTransport(transport);
}
- boost::shared_ptr<JingleDescription> description = boost::dynamic_pointer_cast<JingleDescription>(currentPayloadParser->getPayload());
+ std::shared_ptr<JingleDescription> description = std::dynamic_pointer_cast<JingleDescription>(currentPayloadParser->getPayload());
if (description) {
getPayloadInternal()->addDescription(description);
}
diff --git a/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.h b/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.h
index eaa8ff6..fde07cb 100644
--- a/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.h
+++ b/Swiften/Parser/PayloadParsers/JingleContentPayloadParser.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -31,7 +31,7 @@ class SWIFTEN_API JingleContentPayloadParser : public GenericPayloadParser<Jingl
private:
PayloadParserFactoryCollection* factories;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.cpp b/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.cpp
index 32a6e4c..1e433a6 100644
--- a/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.cpp
+++ b/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.cpp
@@ -46,7 +46,7 @@ void JingleFileTransferDescriptionParser::handleEndElement(const std::string& el
}
if (level == 0) {
- boost::shared_ptr<JingleFileTransferFileInfo> info = boost::dynamic_pointer_cast<JingleFileTransferFileInfo>(currentPayloadParser->getPayload());
+ std::shared_ptr<JingleFileTransferFileInfo> info = std::dynamic_pointer_cast<JingleFileTransferFileInfo>(currentPayloadParser->getPayload());
if (info) {
getPayloadInternal()->setFileInfo(*info);
}
diff --git a/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.h b/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.h
index c7f80e1..b148d9b 100644
--- a/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.h
+++ b/Swiften/Parser/PayloadParsers/JingleFileTransferDescriptionParser.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -32,7 +32,7 @@ class SWIFTEN_API JingleFileTransferDescriptionParser : public GenericPayloadPar
private:
PayloadParserFactoryCollection* factories;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.cpp b/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.cpp
index a890a99..4adf3bd 100644
--- a/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.cpp
+++ b/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.cpp
@@ -12,8 +12,9 @@
#include <Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.h>
+#include <memory>
+
#include <boost/algorithm/string.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Parser/GenericPayloadParserFactory.h>
#include <Swiften/Parser/PayloadParserFactory.h>
@@ -26,7 +27,7 @@ JingleFileTransferHashParser::JingleFileTransferHashParser() : level(0) {
void JingleFileTransferHashParser::handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
if (level == 1 && element == "file") {
- currentPayloadParser = boost::make_shared<JingleFileTransferFileInfoParser>();
+ currentPayloadParser = std::make_shared<JingleFileTransferFileInfoParser>();
}
if (level >= 1 && currentPayloadParser) {
@@ -42,7 +43,7 @@ void JingleFileTransferHashParser::handleEndElement(const std::string& element,
}
if (level == 1) {
- boost::shared_ptr<JingleFileTransferFileInfo> info = boost::dynamic_pointer_cast<JingleFileTransferFileInfo>(currentPayloadParser->getPayload());
+ std::shared_ptr<JingleFileTransferFileInfo> info = std::dynamic_pointer_cast<JingleFileTransferFileInfo>(currentPayloadParser->getPayload());
if (info) {
getPayloadInternal()->setFileInfo(*info);
}
diff --git a/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.h b/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.h
index 8a28d5a..1b47921 100644
--- a/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.h
+++ b/Swiften/Parser/PayloadParsers/JingleFileTransferHashParser.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014-2015 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -28,7 +28,7 @@ public:
private:
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/JingleParser.cpp b/Swiften/Parser/PayloadParsers/JingleParser.cpp
index 48507af..a88a5b2 100644
--- a/Swiften/Parser/PayloadParsers/JingleParser.cpp
+++ b/Swiften/Parser/PayloadParsers/JingleParser.cpp
@@ -57,17 +57,17 @@ namespace Swift {
}
if (level == 1) {
- boost::shared_ptr<JinglePayload::Reason> reason = boost::dynamic_pointer_cast<JinglePayload::Reason>(currentPayloadParser->getPayload());
+ std::shared_ptr<JinglePayload::Reason> reason = std::dynamic_pointer_cast<JinglePayload::Reason>(currentPayloadParser->getPayload());
if (reason) {
getPayloadInternal()->setReason(*reason);
}
- boost::shared_ptr<JingleContentPayload> payload = boost::dynamic_pointer_cast<JingleContentPayload>(currentPayloadParser->getPayload());
+ std::shared_ptr<JingleContentPayload> payload = std::dynamic_pointer_cast<JingleContentPayload>(currentPayloadParser->getPayload());
if (payload) {
getPayloadInternal()->addContent(payload);
}
- boost::shared_ptr<JingleFileTransferHash> hash = boost::dynamic_pointer_cast<JingleFileTransferHash>(currentPayloadParser->getPayload());
+ std::shared_ptr<JingleFileTransferHash> hash = std::dynamic_pointer_cast<JingleFileTransferHash>(currentPayloadParser->getPayload());
if (hash) {
getPayloadInternal()->addPayload(hash);
}
diff --git a/Swiften/Parser/PayloadParsers/JingleParser.h b/Swiften/Parser/PayloadParsers/JingleParser.h
index 28850e2..1dcc9e7 100644
--- a/Swiften/Parser/PayloadParsers/JingleParser.h
+++ b/Swiften/Parser/PayloadParsers/JingleParser.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -33,7 +33,7 @@ class SWIFTEN_API JingleParser : public GenericPayloadParser<JinglePayload> {
private:
PayloadParserFactoryCollection* factories;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/MAMFinParser.cpp b/Swiften/Parser/PayloadParsers/MAMFinParser.cpp
index a29a7c4..88dd571 100644
--- a/Swiften/Parser/PayloadParsers/MAMFinParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MAMFinParser.cpp
@@ -30,7 +30,7 @@ void MAMFinParser::handleStartElement(const std::string& element, const std::str
}
else if (level_ == PayloadLevel) {
if (element == "set" && ns == "http://jabber.org/protocol/rsm") {
- resultSetParser_ = boost::make_shared<ResultSetParser>();
+ resultSetParser_ = std::make_shared<ResultSetParser>();
}
}
@@ -49,7 +49,7 @@ void MAMFinParser::handleEndElement(const std::string& element, const std::strin
}
if (resultSetParser_ && level_ == PayloadLevel) {
/* done parsing nested ResultSet */
- getPayloadInternal()->setResultSet(boost::dynamic_pointer_cast<ResultSet>(resultSetParser_->getPayload()));
+ getPayloadInternal()->setResultSet(std::dynamic_pointer_cast<ResultSet>(resultSetParser_->getPayload()));
resultSetParser_.reset();
}
}
diff --git a/Swiften/Parser/PayloadParsers/MAMFinParser.h b/Swiften/Parser/PayloadParsers/MAMFinParser.h
index 2e805ad..f08231e 100644
--- a/Swiften/Parser/PayloadParsers/MAMFinParser.h
+++ b/Swiften/Parser/PayloadParsers/MAMFinParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -30,7 +30,7 @@ namespace Swift {
};
private:
- boost::shared_ptr<ResultSetParser> resultSetParser_;
+ std::shared_ptr<ResultSetParser> resultSetParser_;
int level_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/MAMQueryParser.cpp b/Swiften/Parser/PayloadParsers/MAMQueryParser.cpp
index 41fbbb7..4919d22 100644
--- a/Swiften/Parser/PayloadParsers/MAMQueryParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MAMQueryParser.cpp
@@ -29,9 +29,9 @@ void MAMQueryParser::handleStartElement(const std::string& element, const std::s
}
} else if (level_ == PayloadLevel) {
if (element == "x" && ns == "jabber:x:data") {
- formParser_ = boost::make_shared<FormParser>();
+ formParser_ = std::make_shared<FormParser>();
} else if (element == "set" && ns == "http://jabber.org/protocol/rsm") {
- resultSetParser_ = boost::make_shared<ResultSetParser>();
+ resultSetParser_ = std::make_shared<ResultSetParser>();
}
}
@@ -54,7 +54,7 @@ void MAMQueryParser::handleEndElement(const std::string& element, const std::str
}
if (formParser_ && level_ == PayloadLevel) {
/* done parsing nested Form */
- getPayloadInternal()->setForm(boost::dynamic_pointer_cast<Form>(formParser_->getPayload()));
+ getPayloadInternal()->setForm(std::dynamic_pointer_cast<Form>(formParser_->getPayload()));
formParser_.reset();
}
@@ -63,7 +63,7 @@ void MAMQueryParser::handleEndElement(const std::string& element, const std::str
}
if (resultSetParser_ && level_ == PayloadLevel) {
/* done parsing nested ResultSet */
- getPayloadInternal()->setResultSet(boost::dynamic_pointer_cast<ResultSet>(resultSetParser_->getPayload()));
+ getPayloadInternal()->setResultSet(std::dynamic_pointer_cast<ResultSet>(resultSetParser_->getPayload()));
resultSetParser_.reset();
}
}
diff --git a/Swiften/Parser/PayloadParsers/MAMQueryParser.h b/Swiften/Parser/PayloadParsers/MAMQueryParser.h
index 4f5bd47..7e4b58a 100644
--- a/Swiften/Parser/PayloadParsers/MAMQueryParser.h
+++ b/Swiften/Parser/PayloadParsers/MAMQueryParser.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMQuery.h>
@@ -33,8 +32,8 @@ namespace Swift {
};
private:
- boost::shared_ptr<FormParser> formParser_;
- boost::shared_ptr<ResultSetParser> resultSetParser_;
+ std::shared_ptr<FormParser> formParser_;
+ std::shared_ptr<ResultSetParser> resultSetParser_;
int level_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/MAMResultParser.cpp b/Swiften/Parser/PayloadParsers/MAMResultParser.cpp
index e39ed94..b810b87 100644
--- a/Swiften/Parser/PayloadParsers/MAMResultParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MAMResultParser.cpp
@@ -28,7 +28,7 @@ void MAMResultParser::handleStartElement(const std::string& element, const std::
}
} else if (level_ == PayloadLevel) {
if (element == "forwarded" && ns == "urn:xmpp:forward:0") {
- payloadParser_ = boost::make_shared<ForwardedParser>(factories_);
+ payloadParser_ = std::make_shared<ForwardedParser>(factories_);
}
}
@@ -47,7 +47,7 @@ void MAMResultParser::handleEndElement(const std::string& element, const std::st
}
if (payloadParser_ && level_ == PayloadLevel) {
/* done parsing nested stanza */
- getPayloadInternal()->setPayload(boost::dynamic_pointer_cast<Forwarded>(payloadParser_->getPayload()));
+ getPayloadInternal()->setPayload(std::dynamic_pointer_cast<Forwarded>(payloadParser_->getPayload()));
payloadParser_.reset();
}
}
diff --git a/Swiften/Parser/PayloadParsers/MAMResultParser.h b/Swiften/Parser/PayloadParsers/MAMResultParser.h
index 5177f8b..e68e365 100644
--- a/Swiften/Parser/PayloadParsers/MAMResultParser.h
+++ b/Swiften/Parser/PayloadParsers/MAMResultParser.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMResult.h>
@@ -33,7 +32,7 @@ namespace Swift {
};
private:
- boost::shared_ptr<ForwardedParser> payloadParser_;
+ std::shared_ptr<ForwardedParser> payloadParser_;
PayloadParserFactoryCollection* factories_;
int level_;
};
diff --git a/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp b/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp
index 20e5f2b..14d6d16 100644
--- a/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp
+++ b/Swiften/Parser/PayloadParsers/MUCInvitationPayloadParser.cpp
@@ -18,7 +18,7 @@ void MUCInvitationPayloadParser::handleTree(ParserElement::ref root) {
invite->setReason(root->getAttributes().getAttribute("reason"));
invite->setThread(root->getAttributes().getAttribute("thread"));
ParserElement::ref impromptuNode = root->getChild("impromptu", "http://swift.im/impromptu");
- invite->setIsImpromptu(!boost::dynamic_pointer_cast<NullParserElement>(impromptuNode));
+ invite->setIsImpromptu(!std::dynamic_pointer_cast<NullParserElement>(impromptuNode));
}
}
diff --git a/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.h b/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.h
index 6502512..4c1f048 100644
--- a/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.h
+++ b/Swiften/Parser/PayloadParsers/MUCOwnerPayloadParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2015 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -27,6 +27,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* factories;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PrivateStorageParser.h b/Swiften/Parser/PayloadParsers/PrivateStorageParser.h
index 761a019..c1d695c 100644
--- a/Swiften/Parser/PayloadParsers/PrivateStorageParser.h
+++ b/Swiften/Parser/PayloadParsers/PrivateStorageParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -27,6 +27,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* factories;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubAffiliationParser.h b/Swiften/Parser/PayloadParsers/PubSubAffiliationParser.h
index 1d3f4fd..6c38f37 100644
--- a/Swiften/Parser/PayloadParsers/PubSubAffiliationParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubAffiliationParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.cpp
index 8a11553..9c44f31 100644
--- a/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubAffiliationsParser::handleStartElement(const std::string& element, co
if (level == 1) {
if (element == "affiliation" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubAffiliationParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubAffiliationParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubAffiliationsParser::handleEndElement(const std::string& element, cons
if (level == 1) {
if (element == "affiliation" && ns == "http://jabber.org/protocol/pubsub") {
- getPayloadInternal()->addAffiliation(boost::dynamic_pointer_cast<PubSubAffiliation>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addAffiliation(std::dynamic_pointer_cast<PubSubAffiliation>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.h b/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.h
index a26942f..2f80dbd 100644
--- a/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubAffiliationsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubConfigureParser.cpp b/Swiften/Parser/PayloadParsers/PubSubConfigureParser.cpp
index f3af12f..0abfe0b 100644
--- a/Swiften/Parser/PayloadParsers/PubSubConfigureParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubConfigureParser.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.
*/
@@ -28,7 +28,7 @@ void PubSubConfigureParser::handleStartElement(const std::string& element, const
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- currentPayloadParser = boost::make_shared<FormParser>();
+ currentPayloadParser = std::make_shared<FormParser>();
}
}
@@ -47,7 +47,7 @@ void PubSubConfigureParser::handleEndElement(const std::string& element, const s
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- getPayloadInternal()->setData(boost::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setData(std::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubConfigureParser.h b/Swiften/Parser/PayloadParsers/PubSubConfigureParser.h
index 33a3da5..16f1cd9 100644
--- a/Swiften/Parser/PayloadParsers/PubSubConfigureParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubConfigureParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubCreateParser.h b/Swiften/Parser/PayloadParsers/PubSubCreateParser.h
index 3f277ed..fa1f98c 100644
--- a/Swiften/Parser/PayloadParsers/PubSubCreateParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubCreateParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubDefaultParser.h b/Swiften/Parser/PayloadParsers/PubSubDefaultParser.h
index b0f0e25..e4d4834 100644
--- a/Swiften/Parser/PayloadParsers/PubSubDefaultParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubDefaultParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubErrorParser.h b/Swiften/Parser/PayloadParsers/PubSubErrorParser.h
index 749fb1a..adc36e9 100644
--- a/Swiften/Parser/PayloadParsers/PubSubErrorParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubErrorParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventAssociateParser.h b/Swiften/Parser/PayloadParsers/PubSubEventAssociateParser.h
index c2cc9f6..5e1fc45 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventAssociateParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventAssociateParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.cpp b/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.cpp
index bb167e3..bfa9cf5 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.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.
*/
@@ -33,10 +33,10 @@ void PubSubEventCollectionParser::handleStartElement(const std::string& element,
if (level == 1) {
if (element == "disassociate" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventDisassociateParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventDisassociateParser>(parsers);
}
if (element == "associate" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventAssociateParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventAssociateParser>(parsers);
}
}
@@ -55,10 +55,10 @@ void PubSubEventCollectionParser::handleEndElement(const std::string& element, c
if (level == 1) {
if (element == "disassociate" && ns == "http://jabber.org/protocol/pubsub#event") {
- getPayloadInternal()->setDisassociate(boost::dynamic_pointer_cast<PubSubEventDisassociate>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setDisassociate(std::dynamic_pointer_cast<PubSubEventDisassociate>(currentPayloadParser->getPayload()));
}
if (element == "associate" && ns == "http://jabber.org/protocol/pubsub#event") {
- getPayloadInternal()->setAssociate(boost::dynamic_pointer_cast<PubSubEventAssociate>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setAssociate(std::dynamic_pointer_cast<PubSubEventAssociate>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.h b/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.h
index a2b1663..ffdafcf 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventCollectionParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.cpp b/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.cpp
index d118ab8..73112da 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubEventConfigurationParser::handleStartElement(const std::string& eleme
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- currentPayloadParser = boost::make_shared<FormParser>();
+ currentPayloadParser = std::make_shared<FormParser>();
}
}
@@ -51,7 +51,7 @@ void PubSubEventConfigurationParser::handleEndElement(const std::string& element
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- getPayloadInternal()->setData(boost::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setData(std::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.h b/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.h
index e3fcab6..a79ee07 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventConfigurationParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.cpp b/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.cpp
index 167a682..da308db 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubEventDeleteParser::handleStartElement(const std::string& element, con
if (level == 1) {
if (element == "redirect" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventRedirectParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventRedirectParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubEventDeleteParser::handleEndElement(const std::string& element, const
if (level == 1) {
if (element == "redirect" && ns == "http://jabber.org/protocol/pubsub#event") {
- getPayloadInternal()->setRedirects(boost::dynamic_pointer_cast<PubSubEventRedirect>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setRedirects(std::dynamic_pointer_cast<PubSubEventRedirect>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.h b/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.h
index 24d6b6b..270430e 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventDeleteParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventDisassociateParser.h b/Swiften/Parser/PayloadParsers/PubSubEventDisassociateParser.h
index 6835602..9088359 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventDisassociateParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventDisassociateParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventItemParser.h b/Swiften/Parser/PayloadParsers/PubSubEventItemParser.h
index 4b34a26..bd2e72e 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventItemParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventItemParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.cpp
index 90d3fe8..0264275 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.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.
*/
@@ -33,10 +33,10 @@ void PubSubEventItemsParser::handleStartElement(const std::string& element, cons
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventItemParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventItemParser>(parsers);
}
if (element == "retract" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventRetractParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventRetractParser>(parsers);
}
}
@@ -55,10 +55,10 @@ void PubSubEventItemsParser::handleEndElement(const std::string& element, const
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub#event") {
- getPayloadInternal()->addItem(boost::dynamic_pointer_cast<PubSubEventItem>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addItem(std::dynamic_pointer_cast<PubSubEventItem>(currentPayloadParser->getPayload()));
}
if (element == "retract" && ns == "http://jabber.org/protocol/pubsub#event") {
- getPayloadInternal()->addRetract(boost::dynamic_pointer_cast<PubSubEventRetract>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addRetract(std::dynamic_pointer_cast<PubSubEventRetract>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.h b/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.h
index 6cb0148..34b3669 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventItemsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventParser.cpp b/Swiften/Parser/PayloadParsers/PubSubEventParser.cpp
index ae0439c..7677369 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubEventParser.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.
*/
@@ -33,22 +33,22 @@ void PubSubEventParser::handleStartElement(const std::string& element, const std
if (level == 1) {
if (element == "items" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventItemsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventItemsParser>(parsers);
}
if (element == "collection" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventCollectionParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventCollectionParser>(parsers);
}
if (element == "purge" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventPurgeParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventPurgeParser>(parsers);
}
if (element == "configuration" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventConfigurationParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventConfigurationParser>(parsers);
}
if (element == "delete" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventDeleteParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventDeleteParser>(parsers);
}
if (element == "subscription" && ns == "http://jabber.org/protocol/pubsub#event") {
- currentPayloadParser = boost::make_shared<PubSubEventSubscriptionParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubEventSubscriptionParser>(parsers);
}
}
@@ -67,7 +67,7 @@ void PubSubEventParser::handleEndElement(const std::string& element, const std::
if (level == 1) {
if (currentPayloadParser) {
- getPayloadInternal()->setPayload(boost::dynamic_pointer_cast<PubSubEventPayload>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setPayload(std::dynamic_pointer_cast<PubSubEventPayload>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventParser.h b/Swiften/Parser/PayloadParsers/PubSubEventParser.h
index a4fc5a6..3b231b0 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventPurgeParser.h b/Swiften/Parser/PayloadParsers/PubSubEventPurgeParser.h
index 7afc754..e1b1d05 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventPurgeParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventPurgeParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventRedirectParser.h b/Swiften/Parser/PayloadParsers/PubSubEventRedirectParser.h
index ecdeca5..63f0f98 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventRedirectParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventRedirectParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventRetractParser.h b/Swiften/Parser/PayloadParsers/PubSubEventRetractParser.h
index 8bc6a9c..eacaac2 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventRetractParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventRetractParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubEventSubscriptionParser.h b/Swiften/Parser/PayloadParsers/PubSubEventSubscriptionParser.h
index b43e64a..b1d065a 100644
--- a/Swiften/Parser/PayloadParsers/PubSubEventSubscriptionParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubEventSubscriptionParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubItemParser.h b/Swiften/Parser/PayloadParsers/PubSubItemParser.h
index 39d24bc..c6e4ccf 100644
--- a/Swiften/Parser/PayloadParsers/PubSubItemParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubItemParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubItemsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubItemsParser.cpp
index 643eb85..7cbeb70 100644
--- a/Swiften/Parser/PayloadParsers/PubSubItemsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubItemsParser.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.
*/
@@ -42,7 +42,7 @@ void PubSubItemsParser::handleStartElement(const std::string& element, const std
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubItemParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubItemParser>(parsers);
}
}
@@ -61,7 +61,7 @@ void PubSubItemsParser::handleEndElement(const std::string& element, const std::
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub") {
- getPayloadInternal()->addItem(boost::dynamic_pointer_cast<PubSubItem>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addItem(std::dynamic_pointer_cast<PubSubItem>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubItemsParser.h b/Swiften/Parser/PayloadParsers/PubSubItemsParser.h
index 84c8f79..ad6e746 100644
--- a/Swiften/Parser/PayloadParsers/PubSubItemsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubItemsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOptionsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOptionsParser.cpp
index 2683ae6..04d11a1 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOptionsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOptionsParser.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.
*/
@@ -40,7 +40,7 @@ void PubSubOptionsParser::handleStartElement(const std::string& element, const s
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- currentPayloadParser = boost::make_shared<FormParser>();
+ currentPayloadParser = std::make_shared<FormParser>();
}
}
@@ -59,7 +59,7 @@ void PubSubOptionsParser::handleEndElement(const std::string& element, const std
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- getPayloadInternal()->setData(boost::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setData(std::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOptionsParser.h b/Swiften/Parser/PayloadParsers/PubSubOptionsParser.h
index 52d374c..b4ee87a 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOptionsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOptionsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationParser.h
index 972930c..8b74106 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.cpp
index 247bf4c..265c404 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubOwnerAffiliationsParser::handleStartElement(const std::string& elemen
if (level == 1) {
if (element == "affiliation" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerAffiliationParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerAffiliationParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubOwnerAffiliationsParser::handleEndElement(const std::string& element,
if (level == 1) {
if (element == "affiliation" && ns == "http://jabber.org/protocol/pubsub#owner") {
- getPayloadInternal()->addAffiliation(boost::dynamic_pointer_cast<PubSubOwnerAffiliation>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addAffiliation(std::dynamic_pointer_cast<PubSubOwnerAffiliation>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.h
index 870d809..52c7fa9 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerAffiliationsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.cpp
index 62dd1ac..ce9ccff 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubOwnerConfigureParser::handleStartElement(const std::string& element,
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- currentPayloadParser = boost::make_shared<FormParser>();
+ currentPayloadParser = std::make_shared<FormParser>();
}
}
@@ -51,7 +51,7 @@ void PubSubOwnerConfigureParser::handleEndElement(const std::string& element, co
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- getPayloadInternal()->setData(boost::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setData(std::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.h
index 914a309..e23e257 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerConfigureParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.cpp
index 36ccbaf..e65aa2a 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.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.
*/
@@ -28,7 +28,7 @@ void PubSubOwnerDefaultParser::handleStartElement(const std::string& element, co
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- currentPayloadParser = boost::make_shared<FormParser>();
+ currentPayloadParser = std::make_shared<FormParser>();
}
}
@@ -47,7 +47,7 @@ void PubSubOwnerDefaultParser::handleEndElement(const std::string& element, cons
if (level == 1) {
if (element == "x" && ns == "jabber:x:data") {
- getPayloadInternal()->setData(boost::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setData(std::dynamic_pointer_cast<Form>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.h
index 3106854..82e4825 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerDefaultParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.cpp
index 047fe8b..0051ee7 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubOwnerDeleteParser::handleStartElement(const std::string& element, con
if (level == 1) {
if (element == "redirect" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerRedirectParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerRedirectParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubOwnerDeleteParser::handleEndElement(const std::string& element, const
if (level == 1) {
if (element == "redirect" && ns == "http://jabber.org/protocol/pubsub#owner") {
- getPayloadInternal()->setRedirect(boost::dynamic_pointer_cast<PubSubOwnerRedirect>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setRedirect(std::dynamic_pointer_cast<PubSubOwnerRedirect>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.h
index f56ae3c..99a8c0e 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerDeleteParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.cpp
index aa7310e..ca73b00 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.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.
*/
@@ -33,22 +33,22 @@ void PubSubOwnerPubSubParser::handleStartElement(const std::string& element, con
if (level == 1) {
if (element == "configure" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerConfigureParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerConfigureParser>(parsers);
}
if (element == "subscriptions" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerSubscriptionsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerSubscriptionsParser>(parsers);
}
if (element == "default" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerDefaultParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerDefaultParser>(parsers);
}
if (element == "purge" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerPurgeParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerPurgeParser>(parsers);
}
if (element == "affiliations" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerAffiliationsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerAffiliationsParser>(parsers);
}
if (element == "delete" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerDeleteParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerDeleteParser>(parsers);
}
}
@@ -67,7 +67,7 @@ void PubSubOwnerPubSubParser::handleEndElement(const std::string& element, const
if (level == 1) {
if (currentPayloadParser) {
- getPayloadInternal()->setPayload(boost::dynamic_pointer_cast<PubSubOwnerPayload>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setPayload(std::dynamic_pointer_cast<PubSubOwnerPayload>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.h
index d4d67f9..35420f7 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerPubSubParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerPurgeParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerPurgeParser.h
index 364de29..044ac04 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerPurgeParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerPurgeParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerRedirectParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerRedirectParser.h
index fd48dbb..5714d46 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerRedirectParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerRedirectParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionParser.h
index 46df820..48e2786 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.cpp
index e08d782..da82600 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubOwnerSubscriptionsParser::handleStartElement(const std::string& eleme
if (level == 1) {
if (element == "subscription" && ns == "http://jabber.org/protocol/pubsub#owner") {
- currentPayloadParser = boost::make_shared<PubSubOwnerSubscriptionParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOwnerSubscriptionParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubOwnerSubscriptionsParser::handleEndElement(const std::string& element
if (level == 1) {
if (element == "subscription" && ns == "http://jabber.org/protocol/pubsub#owner") {
- getPayloadInternal()->addSubscription(boost::dynamic_pointer_cast<PubSubOwnerSubscription>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addSubscription(std::dynamic_pointer_cast<PubSubOwnerSubscription>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.h b/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.h
index 10c11e4..541d225 100644
--- a/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubOwnerSubscriptionsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubParser.cpp b/Swiften/Parser/PayloadParsers/PubSubParser.cpp
index 9c86c21..b527d4c 100644
--- a/Swiften/Parser/PayloadParsers/PubSubParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubParser.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.
*/
@@ -38,40 +38,40 @@ PubSubParser::~PubSubParser() {
void PubSubParser::handleStartElement(const std::string& element, const std::string& ns, const AttributeMap& attributes) {
if (level == 1) {
if (element == "items" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubItemsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubItemsParser>(parsers);
}
if (element == "create" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubCreateParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubCreateParser>(parsers);
}
if (element == "publish" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubPublishParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubPublishParser>(parsers);
}
if (element == "affiliations" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubAffiliationsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubAffiliationsParser>(parsers);
}
if (element == "retract" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubRetractParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubRetractParser>(parsers);
}
if (element == "options" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubOptionsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubOptionsParser>(parsers);
}
if (element == "configure" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubConfigureParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubConfigureParser>(parsers);
}
if (element == "default" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubDefaultParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubDefaultParser>(parsers);
}
if (element == "subscriptions" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubSubscriptionsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubSubscriptionsParser>(parsers);
}
if (element == "subscribe" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubSubscribeParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubSubscribeParser>(parsers);
}
if (element == "unsubscribe" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubUnsubscribeParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubUnsubscribeParser>(parsers);
}
if (element == "subscription" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubSubscriptionParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubSubscriptionParser>(parsers);
}
}
@@ -91,25 +91,25 @@ void PubSubParser::handleEndElement(const std::string& element, const std::strin
if (level == 1) {
if (currentPayloadParser) {
if (element == "options" && ns == "http://jabber.org/protocol/pubsub") {
- optionsPayload = boost::dynamic_pointer_cast<PubSubOptions>(currentPayloadParser->getPayload());
+ optionsPayload = std::dynamic_pointer_cast<PubSubOptions>(currentPayloadParser->getPayload());
}
else if (element == "configure" && ns == "http://jabber.org/protocol/pubsub") {
- configurePayload = boost::dynamic_pointer_cast<PubSubConfigure>(currentPayloadParser->getPayload());
+ configurePayload = std::dynamic_pointer_cast<PubSubConfigure>(currentPayloadParser->getPayload());
}
else {
- getPayloadInternal()->setPayload(boost::dynamic_pointer_cast<PubSubPayload>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setPayload(std::dynamic_pointer_cast<PubSubPayload>(currentPayloadParser->getPayload()));
}
}
currentPayloadParser.reset();
}
if (level == 0) {
- if (boost::shared_ptr<PubSubCreate> create = boost::dynamic_pointer_cast<PubSubCreate>(getPayloadInternal()->getPayload())) {
+ if (std::shared_ptr<PubSubCreate> create = std::dynamic_pointer_cast<PubSubCreate>(getPayloadInternal()->getPayload())) {
if (configurePayload) {
create->setConfigure(configurePayload);
}
}
- if (boost::shared_ptr<PubSubSubscribe> subscribe = boost::dynamic_pointer_cast<PubSubSubscribe>(getPayloadInternal()->getPayload())) {
+ if (std::shared_ptr<PubSubSubscribe> subscribe = std::dynamic_pointer_cast<PubSubSubscribe>(getPayloadInternal()->getPayload())) {
if (optionsPayload) {
subscribe->setOptions(optionsPayload);
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubParser.h b/Swiften/Parser/PayloadParsers/PubSubParser.h
index a8043fc..1f40ca9 100644
--- a/Swiften/Parser/PayloadParsers/PubSubParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -31,8 +31,8 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
- boost::shared_ptr<PubSubConfigure> configurePayload;
- boost::shared_ptr<PubSubOptions> optionsPayload;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PubSubConfigure> configurePayload;
+ std::shared_ptr<PubSubOptions> optionsPayload;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubPublishParser.cpp b/Swiften/Parser/PayloadParsers/PubSubPublishParser.cpp
index 3bd3ac0..3fd2951 100644
--- a/Swiften/Parser/PayloadParsers/PubSubPublishParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubPublishParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubPublishParser::handleStartElement(const std::string& element, const s
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubItemParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubItemParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubPublishParser::handleEndElement(const std::string& element, const std
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub") {
- getPayloadInternal()->addItem(boost::dynamic_pointer_cast<PubSubItem>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addItem(std::dynamic_pointer_cast<PubSubItem>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubPublishParser.h b/Swiften/Parser/PayloadParsers/PubSubPublishParser.h
index 1df7c6f..ad7dd11 100644
--- a/Swiften/Parser/PayloadParsers/PubSubPublishParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubPublishParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubRetractParser.cpp b/Swiften/Parser/PayloadParsers/PubSubRetractParser.cpp
index e710fad..b011b76 100644
--- a/Swiften/Parser/PayloadParsers/PubSubRetractParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubRetractParser.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.
*/
@@ -35,7 +35,7 @@ void PubSubRetractParser::handleStartElement(const std::string& element, const s
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubItemParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubItemParser>(parsers);
}
}
@@ -54,7 +54,7 @@ void PubSubRetractParser::handleEndElement(const std::string& element, const std
if (level == 1) {
if (element == "item" && ns == "http://jabber.org/protocol/pubsub") {
- getPayloadInternal()->addItem(boost::dynamic_pointer_cast<PubSubItem>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addItem(std::dynamic_pointer_cast<PubSubItem>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubRetractParser.h b/Swiften/Parser/PayloadParsers/PubSubRetractParser.h
index ece2a52..6bea498 100644
--- a/Swiften/Parser/PayloadParsers/PubSubRetractParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubRetractParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubSubscribeOptionsParser.h b/Swiften/Parser/PayloadParsers/PubSubSubscribeOptionsParser.h
index 9136f44..4e995dd 100644
--- a/Swiften/Parser/PayloadParsers/PubSubSubscribeOptionsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubSubscribeOptionsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubSubscribeParser.h b/Swiften/Parser/PayloadParsers/PubSubSubscribeParser.h
index 823c086..2b1788f 100644
--- a/Swiften/Parser/PayloadParsers/PubSubSubscribeParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubSubscribeParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.cpp b/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.cpp
index 5954bf1..4ce83cc 100644
--- a/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.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.
*/
@@ -46,7 +46,7 @@ void PubSubSubscriptionParser::handleStartElement(const std::string& element, co
if (level == 1) {
if (element == "subscribe-options" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubSubscribeOptionsParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubSubscribeOptionsParser>(parsers);
}
}
@@ -65,7 +65,7 @@ void PubSubSubscriptionParser::handleEndElement(const std::string& element, cons
if (level == 1) {
if (element == "subscribe-options" && ns == "http://jabber.org/protocol/pubsub") {
- getPayloadInternal()->setOptions(boost::dynamic_pointer_cast<PubSubSubscribeOptions>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->setOptions(std::dynamic_pointer_cast<PubSubSubscribeOptions>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.h b/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.h
index 771a74a..7075a99 100644
--- a/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubSubscriptionParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.cpp b/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.cpp
index 30198a5..3badaa2 100644
--- a/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.cpp
+++ b/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.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.
*/
@@ -32,7 +32,7 @@ void PubSubSubscriptionsParser::handleStartElement(const std::string& element, c
if (level == 1) {
if (element == "subscription" && ns == "http://jabber.org/protocol/pubsub") {
- currentPayloadParser = boost::make_shared<PubSubSubscriptionParser>(parsers);
+ currentPayloadParser = std::make_shared<PubSubSubscriptionParser>(parsers);
}
}
@@ -51,7 +51,7 @@ void PubSubSubscriptionsParser::handleEndElement(const std::string& element, con
if (level == 1) {
if (element == "subscription" && ns == "http://jabber.org/protocol/pubsub") {
- getPayloadInternal()->addSubscription(boost::dynamic_pointer_cast<PubSubSubscription>(currentPayloadParser->getPayload()));
+ getPayloadInternal()->addSubscription(std::dynamic_pointer_cast<PubSubSubscription>(currentPayloadParser->getPayload()));
}
currentPayloadParser.reset();
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.h b/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.h
index 9f18376..2371a56 100644
--- a/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubSubscriptionsParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/PubSubUnsubscribeParser.h b/Swiften/Parser/PayloadParsers/PubSubUnsubscribeParser.h
index d33d33c..d63dd70 100644
--- a/Swiften/Parser/PayloadParsers/PubSubUnsubscribeParser.h
+++ b/Swiften/Parser/PayloadParsers/PubSubUnsubscribeParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -29,6 +29,6 @@ namespace Swift {
private:
PayloadParserFactoryCollection* parsers;
int level;
- boost::shared_ptr<PayloadParser> currentPayloadParser;
+ std::shared_ptr<PayloadParser> currentPayloadParser;
};
}
diff --git a/Swiften/Parser/PayloadParsers/ResultSetParser.h b/Swiften/Parser/PayloadParsers/ResultSetParser.h
index 335a798..aa18ae6 100644
--- a/Swiften/Parser/PayloadParsers/ResultSetParser.h
+++ b/Swiften/Parser/PayloadParsers/ResultSetParser.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
diff --git a/Swiften/Parser/PayloadParsers/SecurityLabelParser.cpp b/Swiften/Parser/PayloadParsers/SecurityLabelParser.cpp
index b3a8c67..3dd5811 100644
--- a/Swiften/Parser/PayloadParsers/SecurityLabelParser.cpp
+++ b/Swiften/Parser/PayloadParsers/SecurityLabelParser.cpp
@@ -63,7 +63,7 @@ void SecurityLabelParser::handleCharacterData(const std::string& data) {
}
}
-boost::shared_ptr<SecurityLabel> SecurityLabelParser::getLabelPayload() const {
+std::shared_ptr<SecurityLabel> SecurityLabelParser::getLabelPayload() const {
return getPayloadInternal();
}
diff --git a/Swiften/Parser/PayloadParsers/SecurityLabelParser.h b/Swiften/Parser/PayloadParsers/SecurityLabelParser.h
index d5b0466..cc444a4 100644
--- a/Swiften/Parser/PayloadParsers/SecurityLabelParser.h
+++ b/Swiften/Parser/PayloadParsers/SecurityLabelParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -20,7 +20,7 @@ namespace Swift {
virtual void handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes);
virtual void handleEndElement(const std::string& element, const std::string&);
virtual void handleCharacterData(const std::string& data);
- boost::shared_ptr<SecurityLabel> getLabelPayload() const;
+ std::shared_ptr<SecurityLabel> getLabelPayload() const;
private:
enum Level {
TopLevel = 0,
diff --git a/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp b/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp
index 024d587..0de7544 100644
--- a/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp
+++ b/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.cpp
@@ -6,7 +6,7 @@
#include <Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Parser/PayloadParsers/SecurityLabelParser.h>
#include <Swiften/Parser/PayloadParsers/SecurityLabelParserFactory.h>
@@ -29,7 +29,7 @@ void SecurityLabelsCatalogParser::handleStartElement(const std::string& element,
getPayloadInternal()->setDescription(attributes.getAttribute("desc"));
}
else if (level_ == ItemLevel && element == "item" && ns == "urn:xmpp:sec-label:catalog:2") {
- currentItem_ = boost::make_shared<SecurityLabelsCatalog::Item>();
+ currentItem_ = std::make_shared<SecurityLabelsCatalog::Item>();
currentItem_->setSelector(attributes.getAttribute("selector"));
currentItem_->setIsDefault(attributes.getBoolAttribute("default", false));
}
@@ -51,7 +51,7 @@ void SecurityLabelsCatalogParser::handleEndElement(const std::string& element, c
labelParser_->handleEndElement(element, ns);
}
if (level_ == LabelLevel && labelParser_ && currentItem_) {
- boost::shared_ptr<SecurityLabel> currentLabel = labelParser_->getLabelPayload();
+ std::shared_ptr<SecurityLabel> currentLabel = labelParser_->getLabelPayload();
assert(currentLabel);
currentItem_->setLabel(currentLabel);
delete labelParser_;
diff --git a/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h b/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h
index bb44369..edfa86b 100644
--- a/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h
+++ b/Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParser.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -33,6 +33,6 @@ namespace Swift {
int level_;
SecurityLabelParserFactory* labelParserFactory_;
SecurityLabelParser* labelParser_;
- boost::shared_ptr<SecurityLabelsCatalog::Item> currentItem_;
+ std::shared_ptr<SecurityLabelsCatalog::Item> currentItem_;
};
}
diff --git a/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp b/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp
index 12dace9..ca6f644 100644
--- a/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp
+++ b/Swiften/Parser/PayloadParsers/StreamInitiationParser.cpp
@@ -88,7 +88,7 @@ void StreamInitiationParser::handleEndElement(const std::string& element, const
else if (formParser) {
Form::ref form = formParser->getPayloadInternal();
if (form) {
- FormField::ref field = boost::dynamic_pointer_cast<FormField>(form->getField("stream-method"));
+ FormField::ref field = std::dynamic_pointer_cast<FormField>(form->getField("stream-method"));
if (field) {
if (form->getType() == Form::FormType) {
foreach (const FormField::Option& option, field->getOptions()) {
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/CarbonsParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/CarbonsParserTest.cpp
index f85efb2..b5b9995 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/CarbonsParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/CarbonsParserTest.cpp
@@ -73,14 +73,14 @@ class CarbonsParserTest : public CppUnit::TestFixture {
CarbonsReceived::ref received = parser.getPayload<CarbonsReceived>();
CPPUNIT_ASSERT(received);
- boost::shared_ptr<Forwarded> forwarded = received->getForwarded();
+ std::shared_ptr<Forwarded> forwarded = received->getForwarded();
CPPUNIT_ASSERT(forwarded);
- boost::shared_ptr<Message> message = boost::dynamic_pointer_cast<Message>(forwarded->getStanza());
+ std::shared_ptr<Message> message = std::dynamic_pointer_cast<Message>(forwarded->getStanza());
CPPUNIT_ASSERT(message);
CPPUNIT_ASSERT_EQUAL(JID("juliet@capulet.example/balcony"), message->getFrom());
- boost::shared_ptr<Thread> thread = message->getPayload<Thread>();
+ std::shared_ptr<Thread> thread = message->getPayload<Thread>();
CPPUNIT_ASSERT(thread);
CPPUNIT_ASSERT_EQUAL(std::string("0e3141cd80894871a68e6fe6b1ec56fa"), thread->getText());
}
@@ -105,10 +105,10 @@ class CarbonsParserTest : public CppUnit::TestFixture {
CarbonsSent::ref sent = parser.getPayload<CarbonsSent>();
CPPUNIT_ASSERT(sent);
- boost::shared_ptr<Forwarded> forwarded = sent->getForwarded();
+ std::shared_ptr<Forwarded> forwarded = sent->getForwarded();
CPPUNIT_ASSERT(forwarded);
- boost::shared_ptr<Message> message = boost::dynamic_pointer_cast<Message>(forwarded->getStanza());
+ std::shared_ptr<Message> message = std::dynamic_pointer_cast<Message>(forwarded->getStanza());
CPPUNIT_ASSERT(message);
CPPUNIT_ASSERT_EQUAL(JID("juliet@capulet.example/balcony"), message->getTo());
}
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/DeliveryReceiptParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/DeliveryReceiptParserTest.cpp
index d18e1b4..d93fd1f 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/DeliveryReceiptParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/DeliveryReceiptParserTest.cpp
@@ -4,6 +4,12 @@
* See http://www.opensource.org/licenses/bsd-license.php for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -25,7 +31,7 @@ class DeliveryReceiptParserTest : public CppUnit::TestFixture {
PayloadsParserTester parser;
CPPUNIT_ASSERT(parser.parse("<request xmlns='urn:xmpp:receipts'/>"));
- DeliveryReceiptRequest::ref request = boost::dynamic_pointer_cast<DeliveryReceiptRequest>(parser.getPayload());
+ DeliveryReceiptRequest::ref request = std::dynamic_pointer_cast<DeliveryReceiptRequest>(parser.getPayload());
CPPUNIT_ASSERT(request);
}
@@ -34,7 +40,7 @@ class DeliveryReceiptParserTest : public CppUnit::TestFixture {
PayloadsParserTester parser;
CPPUNIT_ASSERT(parser.parse("<received xmlns='urn:xmpp:receipts' id='richard2-4.1.247'/>"));
- DeliveryReceipt::ref receipt = boost::dynamic_pointer_cast<DeliveryReceipt>(parser.getPayload());
+ DeliveryReceipt::ref receipt = std::dynamic_pointer_cast<DeliveryReceipt>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(std::string("richard2-4.1.247"), receipt->getReceivedID());
}
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/DiscoInfoParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/DiscoInfoParserTest.cpp
index c23b1d0..6e866fc 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/DiscoInfoParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/DiscoInfoParserTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -32,7 +32,7 @@ class DiscoInfoParserTest : public CppUnit::TestFixture {
"<feature var=\"baz-feature\"/>"
"</query>"));
- DiscoInfo::ref payload = boost::dynamic_pointer_cast<DiscoInfo>(parser.getPayload());
+ DiscoInfo::ref payload = std::dynamic_pointer_cast<DiscoInfo>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(payload->getIdentities().size()));
CPPUNIT_ASSERT_EQUAL(std::string("Swift"), payload->getIdentities()[0].getName());
CPPUNIT_ASSERT_EQUAL(std::string("pc"), payload->getIdentities()[0].getType());
@@ -61,7 +61,7 @@ class DiscoInfoParserTest : public CppUnit::TestFixture {
"<feature var=\"baz-feature\"/>"
"</query>"));
- DiscoInfo::ref payload = boost::dynamic_pointer_cast<DiscoInfo>(parser.getPayload());
+ DiscoInfo::ref payload = std::dynamic_pointer_cast<DiscoInfo>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(payload->getIdentities().size()));
CPPUNIT_ASSERT_EQUAL(std::string("Swift"), payload->getIdentities()[0].getName());
CPPUNIT_ASSERT_EQUAL(std::string("pc"), payload->getIdentities()[0].getType());
@@ -91,7 +91,7 @@ class DiscoInfoParserTest : public CppUnit::TestFixture {
"<feature var=\"bar-feature\"/>"
"</query>"));
- DiscoInfo::ref payload = boost::dynamic_pointer_cast<DiscoInfo>(parser.getPayload());
+ DiscoInfo::ref payload = std::dynamic_pointer_cast<DiscoInfo>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(payload->getExtensions().size()));
CPPUNIT_ASSERT_EQUAL(std::string("Bot Configuration"), payload->getExtensions()[0]->getTitle());
CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(payload->getFeatures().size()));
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp
index 01db978..977ef8e 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/DiscoItemsParserTest.cpp
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -27,7 +33,7 @@ class DiscoItemsParserTest : public CppUnit::TestFixture {
"<item jid='responder@domain' node='config' name='Configure Service'/>"
"</query>"));
- boost::shared_ptr<DiscoItems> payload = boost::dynamic_pointer_cast<DiscoItems>(parser.getPayload());
+ std::shared_ptr<DiscoItems> payload = std::dynamic_pointer_cast<DiscoItems>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(payload->getItems().size()));
CPPUNIT_ASSERT_EQUAL(std::string("List Service Configurations"), payload->getItems()[0].getName());
CPPUNIT_ASSERT_EQUAL(std::string("list"), payload->getItems()[0].getNode());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/ErrorParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/ErrorParserTest.cpp
index 529d573..5402614 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/ErrorParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/ErrorParserTest.cpp
@@ -29,7 +29,7 @@ class ErrorParserTest : public CppUnit::TestFixture {
"<text xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">boo</text>"
"</error>"));
- ErrorPayload::ref payload = boost::dynamic_pointer_cast<ErrorPayload>(parser.getPayload());
+ ErrorPayload::ref payload = std::dynamic_pointer_cast<ErrorPayload>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(ErrorPayload::BadRequest, payload->getCondition());
CPPUNIT_ASSERT_EQUAL(ErrorPayload::Modify, payload->getType());
CPPUNIT_ASSERT_EQUAL(std::string("boo"), payload->getText());
@@ -46,11 +46,11 @@ class ErrorParserTest : public CppUnit::TestFixture {
"<text xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">boo</text>"
"</error>"));
- ErrorPayload::ref payload = boost::dynamic_pointer_cast<ErrorPayload>(parser.getPayload());
+ ErrorPayload::ref payload = std::dynamic_pointer_cast<ErrorPayload>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(ErrorPayload::BadRequest, payload->getCondition());
CPPUNIT_ASSERT_EQUAL(ErrorPayload::Modify, payload->getType());
CPPUNIT_ASSERT_EQUAL(std::string("boo"), payload->getText());
- CPPUNIT_ASSERT(boost::dynamic_pointer_cast<Delay>(payload->getPayload()));
+ CPPUNIT_ASSERT(std::dynamic_pointer_cast<Delay>(payload->getPayload()));
}
};
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
index 4ffc776..ace6bcb 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/FormParserTest.cpp
@@ -203,7 +203,7 @@ class FormParserTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(std::string("first"), item[0]->getName());
CPPUNIT_ASSERT_EQUAL(std::string("Montague"), item[1]->getValues()[0]);
CPPUNIT_ASSERT_EQUAL(std::string("last"), item[1]->getName());
- boost::shared_ptr<FormField> jidField = item[2];
+ std::shared_ptr<FormField> jidField = item[2];
CPPUNIT_ASSERT_EQUAL(JID("benvolio@montague.net"), jidField->getJIDSingleValue());
CPPUNIT_ASSERT_EQUAL(std::string("jid"), item[2]->getName());
CPPUNIT_ASSERT_EQUAL(std::string("male"), item[3]->getValues()[0]);
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/ForwardedParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/ForwardedParserTest.cpp
index 30af3ec..a807d4e 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/ForwardedParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/ForwardedParserTest.cpp
@@ -35,12 +35,12 @@ class ForwardedParserTest : public CppUnit::TestFixture
"<iq xmlns=\"jabber:client\" type=\"get\" from=\"kindanormal@example.com/IM\" to=\"stupidnewbie@example.com\" id=\"id0\"/>"
"</forwarded>"));
- boost::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
+ std::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getDelay());
CPPUNIT_ASSERT_EQUAL(std::string("2010-07-10T23:08:25Z"), dateTimeToString(payload->getDelay()->getStamp()));
- boost::shared_ptr<IQ> iq = boost::dynamic_pointer_cast<IQ>(payload->getStanza());
+ std::shared_ptr<IQ> iq = std::dynamic_pointer_cast<IQ>(payload->getStanza());
CPPUNIT_ASSERT(!!iq);
CPPUNIT_ASSERT_EQUAL(JID("stupidnewbie@example.com"), iq->getTo());
CPPUNIT_ASSERT_EQUAL(JID("kindanormal@example.com/IM"), iq->getFrom());
@@ -58,12 +58,12 @@ class ForwardedParserTest : public CppUnit::TestFixture
"</message>"
"</forwarded>"));
- boost::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
+ std::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getDelay());
CPPUNIT_ASSERT_EQUAL(std::string("2010-07-10T23:08:25Z"), dateTimeToString(payload->getDelay()->getStamp()));
- boost::shared_ptr<Message> message = boost::dynamic_pointer_cast<Message>(payload->getStanza());
+ std::shared_ptr<Message> message = std::dynamic_pointer_cast<Message>(payload->getStanza());
CPPUNIT_ASSERT(!!message);
const std::string expectedBody = "Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.";
CPPUNIT_ASSERT_EQUAL(expectedBody, message->getBody().get());
@@ -81,11 +81,11 @@ class ForwardedParserTest : public CppUnit::TestFixture
"</message>"
"</forwarded>"));
- boost::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
+ std::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(!payload->getDelay());
- boost::shared_ptr<Message> message = boost::dynamic_pointer_cast<Message>(payload->getStanza());
+ std::shared_ptr<Message> message = std::dynamic_pointer_cast<Message>(payload->getStanza());
CPPUNIT_ASSERT(!!message);
const std::string expectedBody = "Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.";
CPPUNIT_ASSERT_EQUAL(expectedBody, message->getBody().get());
@@ -102,12 +102,12 @@ class ForwardedParserTest : public CppUnit::TestFixture
"<presence xmlns=\"jabber:client\" from=\"alice@wonderland.lit/rabbithole\" to=\"madhatter@wonderland.lit\" type=\"unavailable\"/>"
"</forwarded>"));
- boost::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
+ std::shared_ptr<Forwarded> payload = parser.getPayload<Forwarded>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getDelay());
CPPUNIT_ASSERT_EQUAL(std::string("2010-07-10T23:08:25Z"), dateTimeToString(payload->getDelay()->getStamp()));
- boost::shared_ptr<Presence> presence = boost::dynamic_pointer_cast<Presence>(payload->getStanza());
+ std::shared_ptr<Presence> presence = std::dynamic_pointer_cast<Presence>(payload->getStanza());
CPPUNIT_ASSERT(!!presence);
CPPUNIT_ASSERT_EQUAL(JID("madhatter@wonderland.lit"), presence->getTo());
CPPUNIT_ASSERT_EQUAL(JID("alice@wonderland.lit/rabbithole"), presence->getFrom());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MAMFinParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MAMFinParserTest.cpp
index b045ca5..6a8e2ed 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/MAMFinParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/MAMFinParserTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -25,7 +25,7 @@ class MAMFinParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(parser.parse(
"<fin xmlns='urn:xmpp:mam:0' queryid='f27' />"));
- boost::shared_ptr<MAMFin> payload = parser.getPayload<MAMFin>();
+ std::shared_ptr<MAMFin> payload = parser.getPayload<MAMFin>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT_EQUAL(false, payload->isComplete());
CPPUNIT_ASSERT_EQUAL(true, payload->isStable());
@@ -46,13 +46,13 @@ class MAMFinParserTest : public CppUnit::TestFixture
"</set>"
"</fin>"));
- boost::shared_ptr<MAMFin> payload = parser.getPayload<MAMFin>();
+ std::shared_ptr<MAMFin> payload = parser.getPayload<MAMFin>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT_EQUAL(true, payload->isComplete());
CPPUNIT_ASSERT_EQUAL(true, payload->isStable());
CPPUNIT_ASSERT(!!payload->getResultSet());
- boost::shared_ptr<ResultSet> resultSet = payload->getResultSet();
+ std::shared_ptr<ResultSet> resultSet = payload->getResultSet();
}
};
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MAMQueryParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MAMQueryParserTest.cpp
index 8bdefc1..8750c2e 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/MAMQueryParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/MAMQueryParserTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -41,22 +41,22 @@ class MAMQueryParserTest : public CppUnit::TestFixture
"</query>"));
- boost::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
+ std::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getQueryID());
CPPUNIT_ASSERT_EQUAL(std::string("id0"), *payload->getQueryID());
CPPUNIT_ASSERT_EQUAL(std::string("node1"), *payload->getNode());
CPPUNIT_ASSERT(payload->getForm());
- boost::shared_ptr<FormField> fieldType = payload->getForm()->getField("FORM_TYPE");
+ std::shared_ptr<FormField> fieldType = payload->getForm()->getField("FORM_TYPE");
CPPUNIT_ASSERT(fieldType);
CPPUNIT_ASSERT_EQUAL(std::string("urn:xmpp:mam:0"), fieldType->getTextSingleValue());
- boost::shared_ptr<FormField> fieldStart = payload->getForm()->getField("start");
+ std::shared_ptr<FormField> fieldStart = payload->getForm()->getField("start");
CPPUNIT_ASSERT(fieldStart);
CPPUNIT_ASSERT_EQUAL(std::string("2010-08-07T00:00:00Z"), fieldStart->getTextSingleValue());
CPPUNIT_ASSERT(payload->getResultSet());
- boost::shared_ptr<ResultSet> resultSet = payload->getResultSet();
+ std::shared_ptr<ResultSet> resultSet = payload->getResultSet();
CPPUNIT_ASSERT(resultSet->getMaxItems());
CPPUNIT_ASSERT_EQUAL(*resultSet->getMaxItems(), 10);
}
@@ -75,7 +75,7 @@ class MAMQueryParserTest : public CppUnit::TestFixture
"</x>"
"</query>"));
- boost::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
+ std::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
CPPUNIT_ASSERT(!!payload && !!payload->getForm() && !!payload->getForm()->getField("FORM_TYPE") && !!payload->getForm()->getField("with"));
CPPUNIT_ASSERT_EQUAL(std::string("urn:xmpp:mam:0"), payload->getForm()->getField("FORM_TYPE")->getTextSingleValue());
CPPUNIT_ASSERT_EQUAL(std::string("juliet@capulet.lit"), payload->getForm()->getField("with")->getTextSingleValue());
@@ -97,7 +97,7 @@ class MAMQueryParserTest : public CppUnit::TestFixture
"</field>"
"</x>"
"</query>"));
- boost::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
+ std::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
CPPUNIT_ASSERT(!!payload && !!payload->getForm() && !!payload->getForm()->getField("FORM_TYPE") && !!payload->getForm()->getField("start") && !!payload->getForm()->getField("start"));
CPPUNIT_ASSERT_EQUAL(std::string("urn:xmpp:mam:0"), payload->getForm()->getField("FORM_TYPE")->getTextSingleValue());
CPPUNIT_ASSERT_EQUAL(std::string("2010-06-07T00:00:00Z"), payload->getForm()->getField("start")->getTextSingleValue());
@@ -110,7 +110,7 @@ class MAMQueryParserTest : public CppUnit::TestFixture
"<query queryid=\"id0\" xmlns=\"urn:xmpp:mam:0\">"
"</query>"));
- boost::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
+ std::shared_ptr<MAMQuery> payload = parser.getPayload<MAMQuery>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getQueryID());
CPPUNIT_ASSERT_EQUAL(std::string("id0"), *payload->getQueryID());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MAMResultParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MAMResultParserTest.cpp
index 7393630..15912b1 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/MAMResultParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/MAMResultParserTest.cpp
@@ -35,17 +35,17 @@ class MAMResultParserTest : public CppUnit::TestFixture
"</forwarded>"
"</result>"));
- boost::shared_ptr<MAMResult> payload = parser.getPayload<MAMResult>();
+ std::shared_ptr<MAMResult> payload = parser.getPayload<MAMResult>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT_EQUAL(std::string("28482-98726-73623"), payload->getID());
CPPUNIT_ASSERT(payload->getQueryID());
CPPUNIT_ASSERT_EQUAL(std::string("f27"), *payload->getQueryID());
- boost::shared_ptr<Forwarded> forwarded = payload->getPayload();
+ std::shared_ptr<Forwarded> forwarded = payload->getPayload();
CPPUNIT_ASSERT(forwarded->getDelay());
CPPUNIT_ASSERT_EQUAL(std::string("2010-07-10T23:08:25Z"), dateTimeToString(forwarded->getDelay()->getStamp()));
- boost::shared_ptr<Message> message = boost::dynamic_pointer_cast<Message>(forwarded->getStanza());
+ std::shared_ptr<Message> message = std::dynamic_pointer_cast<Message>(forwarded->getStanza());
CPPUNIT_ASSERT(!!message);
const std::string expectedBody = "Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.";
CPPUNIT_ASSERT_EQUAL(expectedBody, message->getBody().get());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MUCAdminPayloadParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MUCAdminPayloadParserTest.cpp
index 495aefe..d403872 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/MUCAdminPayloadParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/MUCAdminPayloadParserTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -26,7 +26,7 @@ class MUCAdminPayloadParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(parser.parse("<query xmlns=\"http://jabber.org/protocol/muc#admin\"><item affiliation=\"owner\" role=\"visitor\"><actor jid=\"kev@tester.lit\"/><reason>malice</reason></item></query>"));
- MUCAdminPayload::ref payload = boost::dynamic_pointer_cast<MUCAdminPayload>(parser.getPayload());
+ MUCAdminPayload::ref payload = std::dynamic_pointer_cast<MUCAdminPayload>(parser.getPayload());
MUCItem item = payload->getItems()[0];
CPPUNIT_ASSERT_EQUAL(MUCOccupant::Owner, item.affiliation.get());
CPPUNIT_ASSERT_EQUAL(MUCOccupant::Visitor, item.role.get());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/MUCUserPayloadParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/MUCUserPayloadParserTest.cpp
index a8cf246..18597bd 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/MUCUserPayloadParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/MUCUserPayloadParserTest.cpp
@@ -34,7 +34,7 @@ class MUCUserPayloadParserTest : public CppUnit::TestFixture
bool found110 = false;
bool found210 = false;
- MUCUserPayload::ref payload = boost::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
+ MUCUserPayload::ref payload = std::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
foreach (MUCUserPayload::StatusCode status, payload->getStatusCodes()) {
if (status.code == 110) found110 = true;
@@ -55,7 +55,7 @@ class MUCUserPayloadParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(parser.parse("<x xmlns=\"http://jabber.org/protocol/muc#user\"/>"));
- MUCUserPayload::ref payload = boost::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
+ MUCUserPayload::ref payload = std::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT(payload->getItems().empty());
}
@@ -65,9 +65,9 @@ class MUCUserPayloadParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(parser.parse("<x xmlns=\"http://jabber.org/protocol/muc#user\"><destroy jid='alice@wonderland.lit'><reason>bert</reason></destroy></x>"));
- MUCUserPayload::ref payload = boost::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
+ MUCUserPayload::ref payload = std::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
CPPUNIT_ASSERT(payload);
- MUCDestroyPayload::ref destroy = boost::dynamic_pointer_cast<MUCDestroyPayload>(payload->getPayload());
+ MUCDestroyPayload::ref destroy = std::dynamic_pointer_cast<MUCDestroyPayload>(payload->getPayload());
CPPUNIT_ASSERT(destroy);
CPPUNIT_ASSERT_EQUAL(std::string("bert"), destroy->getReason());
CPPUNIT_ASSERT_EQUAL(JID("alice@wonderland.lit"), destroy->getNewVenue());
@@ -78,7 +78,7 @@ class MUCUserPayloadParserTest : public CppUnit::TestFixture
CPPUNIT_ASSERT(parser.parse("<x xmlns=\"http://jabber.org/protocol/muc#user\"><invite from='crone1@shakespeare.lit/desktop' to='alice@wonderland.lit/xxx'> <reason>Hey Hecate, this is the place for all good witches!</reason> </invite> <password>cauldronburn</password></x>"));
- MUCUserPayload::ref payload = boost::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
+ MUCUserPayload::ref payload = std::dynamic_pointer_cast<MUCUserPayload>(parser.getPayload());
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT(payload->getInvite());
CPPUNIT_ASSERT(payload->getPassword());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h b/Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h
index 8e871b2..89b990c 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h
+++ b/Swiften/Parser/PayloadParsers/UnitTest/PayloadsParserTester.h
@@ -48,19 +48,19 @@ namespace Swift {
payloadParser->handleCharacterData(data);
}
- boost::shared_ptr<Payload> getPayload() const {
+ std::shared_ptr<Payload> getPayload() const {
return payloadParser->getPayload();
}
template<typename T>
- boost::shared_ptr<T> getPayload() const {
- return boost::dynamic_pointer_cast<T>(payloadParser->getPayload());
+ std::shared_ptr<T> getPayload() const {
+ return std::dynamic_pointer_cast<T>(payloadParser->getPayload());
}
private:
XMLParser* xmlParser;
FullPayloadParserFactoryCollection factories;
- boost::shared_ptr<PayloadParser> payloadParser;
+ std::shared_ptr<PayloadParser> payloadParser;
int level;
};
}
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/PriorityParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/PriorityParserTest.cpp
index e724090..2c89f0f 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/PriorityParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/PriorityParserTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -24,7 +24,7 @@ class PriorityParserTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(parser.parse("<priority>-120</priority>"));
- boost::shared_ptr<Priority> payload = boost::dynamic_pointer_cast<Priority>(parser.getPayload());
+ std::shared_ptr<Priority> payload = std::dynamic_pointer_cast<Priority>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(-120, payload->getPriority());
}
@@ -33,7 +33,7 @@ class PriorityParserTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(parser.parse("<priority>invalid</priority>"));
- boost::shared_ptr<Priority> payload = boost::dynamic_pointer_cast<Priority>(parser.getPayload());
+ std::shared_ptr<Priority> payload = std::dynamic_pointer_cast<Priority>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(0, payload->getPriority());
}
};
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp
index 2975485..06f3ae5 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/PrivateStorageParserTest.cpp
@@ -36,9 +36,9 @@ class PrivateStorageParserTest : public CppUnit::TestFixture {
"</storage>"
"</query>"));
- boost::shared_ptr<PrivateStorage> payload = boost::dynamic_pointer_cast<PrivateStorage>(parser.getPayload());
+ std::shared_ptr<PrivateStorage> payload = std::dynamic_pointer_cast<PrivateStorage>(parser.getPayload());
CPPUNIT_ASSERT(payload);
- boost::shared_ptr<Storage> storage = boost::dynamic_pointer_cast<Storage>(payload->getPayload());
+ std::shared_ptr<Storage> storage = std::dynamic_pointer_cast<Storage>(payload->getPayload());
CPPUNIT_ASSERT(storage);
CPPUNIT_ASSERT_EQUAL(std::string("Alice"), storage->getRooms()[0].nick);
CPPUNIT_ASSERT_EQUAL(JID("swift@rooms.swift.im"), storage->getRooms()[0].jid);
@@ -49,7 +49,7 @@ class PrivateStorageParserTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(parser.parse("<query xmlns='jabber:iq:private'/>"));
- boost::shared_ptr<PrivateStorage> payload = boost::dynamic_pointer_cast<PrivateStorage>(parser.getPayload());
+ std::shared_ptr<PrivateStorage> payload = std::dynamic_pointer_cast<PrivateStorage>(parser.getPayload());
CPPUNIT_ASSERT(payload);
CPPUNIT_ASSERT(!payload->getPayload());
}
@@ -71,9 +71,9 @@ class PrivateStorageParserTest : public CppUnit::TestFixture {
"</storage>"
"</query>"));
- boost::shared_ptr<PrivateStorage> payload = boost::dynamic_pointer_cast<PrivateStorage>(parser.getPayload());
+ std::shared_ptr<PrivateStorage> payload = std::dynamic_pointer_cast<PrivateStorage>(parser.getPayload());
CPPUNIT_ASSERT(payload);
- boost::shared_ptr<Storage> storage = boost::dynamic_pointer_cast<Storage>(payload->getPayload());
+ std::shared_ptr<Storage> storage = std::dynamic_pointer_cast<Storage>(payload->getPayload());
CPPUNIT_ASSERT(storage);
CPPUNIT_ASSERT_EQUAL(std::string("Rabbit"), storage->getRooms()[0].nick);
}
@@ -88,7 +88,7 @@ class PrivateStorageParserTest : public CppUnit::TestFixture {
"<foo>Bar</foo>"
"</query>"));
- CPPUNIT_ASSERT(!boost::dynamic_pointer_cast<PrivateStorage>(testling.getPayload())->getPayload());
+ CPPUNIT_ASSERT(!std::dynamic_pointer_cast<PrivateStorage>(testling.getPayload())->getPayload());
}
};
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/ReplaceTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/ReplaceTest.cpp
index 3e42788..6d77d4a 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/ReplaceTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/ReplaceTest.cpp
@@ -4,6 +4,12 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -22,13 +28,13 @@ class ReplaceParserTest : public CppUnit::TestFixture {
void testParseTrivial() {
PayloadsParserTester parser;
CPPUNIT_ASSERT(parser.parse("<replace id='bad1' xmlns='http://swift.im/protocol/replace'/>"));
- Replace::ref payload = boost::dynamic_pointer_cast <Replace>(parser.getPayload());
+ Replace::ref payload = std::dynamic_pointer_cast <Replace>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(std::string("bad1"), payload->getID());
}
void testParseChild() {
PayloadsParserTester parser;
CPPUNIT_ASSERT(parser.parse("<replace id='bad1' xmlns='http://swift.im/protocol/replace' ><child xmlns='blah' id=\"hi\"/></replace>"));
- Replace::ref payload = boost::dynamic_pointer_cast <Replace>(parser.getPayload());
+ Replace::ref payload = std::dynamic_pointer_cast <Replace>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(std::string("bad1"), payload->getID());
}
};
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/ResultSetParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/ResultSetParserTest.cpp
index 7924e05..da5d978 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/ResultSetParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/ResultSetParserTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -33,7 +33,7 @@ class ResultSetParserTest : public CppUnit::TestFixture
"<after>09af3-cc343-b409f</after>"
"</set>"));
- boost::shared_ptr<ResultSet> payload = parser.getPayload<ResultSet>();
+ std::shared_ptr<ResultSet> payload = parser.getPayload<ResultSet>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getMaxItems());
CPPUNIT_ASSERT_EQUAL(100, *payload->getMaxItems());
@@ -60,7 +60,7 @@ class ResultSetParserTest : public CppUnit::TestFixture
"<first>stpeter@jabber.org</first>"
"</set>"));
- boost::shared_ptr<ResultSet> payload = parser.getPayload<ResultSet>();
+ std::shared_ptr<ResultSet> payload = parser.getPayload<ResultSet>();
CPPUNIT_ASSERT(!!payload);
CPPUNIT_ASSERT(payload->getFirstID());
CPPUNIT_ASSERT_EQUAL(std::string("stpeter@jabber.org"), *payload->getFirstID());
diff --git a/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp b/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp
index e02eb7a..bc29921 100644
--- a/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp
+++ b/Swiften/Parser/PayloadParsers/UnitTest/VCardParserTest.cpp
@@ -84,7 +84,7 @@ class VCardParserTest : public CppUnit::TestFixture {
"<MAILER>mutt</MAILER>"
"</vCard>"));
- boost::shared_ptr<VCard> payload = boost::dynamic_pointer_cast<VCard>(parser.getPayload());
+ std::shared_ptr<VCard> payload = std::dynamic_pointer_cast<VCard>(parser.getPayload());
CPPUNIT_ASSERT_EQUAL(std::string("2.0"), payload->getVersion());
CPPUNIT_ASSERT_EQUAL(std::string("Alice In Wonderland"), payload->getFullName());
CPPUNIT_ASSERT_EQUAL(std::string("Alice"), payload->getGivenName());
diff --git a/Swiften/Parser/PayloadParsers/UserLocationParser.h b/Swiften/Parser/PayloadParsers/UserLocationParser.h
index c2a226e..1445d3e 100644
--- a/Swiften/Parser/PayloadParsers/UserLocationParser.h
+++ b/Swiften/Parser/PayloadParsers/UserLocationParser.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
#include <Swiften/Elements/UserLocation.h>
diff --git a/Swiften/Parser/PayloadParsers/UserTuneParser.h b/Swiften/Parser/PayloadParsers/UserTuneParser.h
index 5c35074..5a27273 100644
--- a/Swiften/Parser/PayloadParsers/UserTuneParser.h
+++ b/Swiften/Parser/PayloadParsers/UserTuneParser.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
#include <Swiften/Elements/UserTune.h>
diff --git a/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp b/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp
index b9786c9..d3a7211 100644
--- a/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp
+++ b/Swiften/Parser/PayloadParsers/WhiteboardParser.cpp
@@ -12,9 +12,10 @@
#include <Swiften/Parser/PayloadParsers/WhiteboardParser.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
#include <boost/optional.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Elements/Whiteboard/WhiteboardColor.h>
#include <Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h>
@@ -37,15 +38,15 @@ namespace Swift {
} else if (level_ == 1) {
std::string type = attributes.getAttributeValue("type").get_value_or("");
if (type == "insert") {
- WhiteboardInsertOperation::ref insertOp = boost::make_shared<WhiteboardInsertOperation>();
+ WhiteboardInsertOperation::ref insertOp = std::make_shared<WhiteboardInsertOperation>();
operation = insertOp;
} else if (type == "update") {
- WhiteboardUpdateOperation::ref updateOp = boost::make_shared<WhiteboardUpdateOperation>();
+ WhiteboardUpdateOperation::ref updateOp = std::make_shared<WhiteboardUpdateOperation>();
std::string move = attributes.getAttributeValue("newpos").get_value_or("0");
updateOp->setNewPos(boost::lexical_cast<int>(attributes.getAttributeValue("newpos").get_value_or("0")));
operation = updateOp;
} else if (type == "delete") {
- WhiteboardDeleteOperation::ref deleteOp = boost::make_shared<WhiteboardDeleteOperation>();
+ WhiteboardDeleteOperation::ref deleteOp = std::make_shared<WhiteboardDeleteOperation>();
deleteOp->setElementID(attributes.getAttributeValue("elementid").get_value_or(""));
operation = deleteOp;
}
@@ -71,7 +72,7 @@ namespace Swift {
y2 = boost::lexical_cast<int>(attributes.getAttributeValue("y2").get_value_or("0"));
} catch (boost::bad_lexical_cast&) {
}
- WhiteboardLineElement::ref whiteboardElement = boost::make_shared<WhiteboardLineElement>(x1, y1, x2, y2);
+ WhiteboardLineElement::ref whiteboardElement = std::make_shared<WhiteboardLineElement>(x1, y1, x2, y2);
WhiteboardColor color(attributes.getAttributeValue("stroke").get_value_or("#000000"));
color.setAlpha(opacityToAlpha(attributes.getAttributeValue("opacity").get_value_or("1")));
@@ -87,7 +88,7 @@ namespace Swift {
getPayloadInternal()->setElement(whiteboardElement);
wbElement = whiteboardElement;
} else if (element == "path") {
- WhiteboardFreehandPathElement::ref whiteboardElement = boost::make_shared<WhiteboardFreehandPathElement>();
+ WhiteboardFreehandPathElement::ref whiteboardElement = std::make_shared<WhiteboardFreehandPathElement>();
std::string pathData = attributes.getAttributeValue("d").get_value_or("");
std::vector<std::pair<int, int> > points;
if (pathData[0] == 'M') {
@@ -148,7 +149,7 @@ namespace Swift {
} catch (boost::bad_lexical_cast&) {
}
- WhiteboardRectElement::ref whiteboardElement = boost::make_shared<WhiteboardRectElement>(x, y, width, height);
+ WhiteboardRectElement::ref whiteboardElement = std::make_shared<WhiteboardRectElement>(x, y, width, height);
int penWidth = 1;
try {
@@ -167,7 +168,7 @@ namespace Swift {
getPayloadInternal()->setElement(whiteboardElement);
wbElement = whiteboardElement;
} else if (element == "polygon") {
- WhiteboardPolygonElement::ref whiteboardElement = boost::make_shared<WhiteboardPolygonElement>();
+ WhiteboardPolygonElement::ref whiteboardElement = std::make_shared<WhiteboardPolygonElement>();
std::string pointsData = attributes.getAttributeValue("points").get_value_or("");
std::vector<std::pair<int, int> > points;
@@ -214,7 +215,7 @@ namespace Swift {
} catch (boost::bad_lexical_cast&) {
}
- WhiteboardTextElement::ref whiteboardElement = boost::make_shared<WhiteboardTextElement>(x, y);
+ WhiteboardTextElement::ref whiteboardElement = std::make_shared<WhiteboardTextElement>(x, y);
actualIsText = true;
WhiteboardColor color(attributes.getAttributeValue("fill").get_value_or("#000000"));
@@ -243,7 +244,7 @@ namespace Swift {
} catch (boost::bad_lexical_cast&) {
}
- WhiteboardEllipseElement::ref whiteboardElement = boost::make_shared<WhiteboardEllipseElement>(cx, cy, rx, ry);
+ WhiteboardEllipseElement::ref whiteboardElement = std::make_shared<WhiteboardEllipseElement>(cx, cy, rx, ry);
int penWidth = 1;
try {
@@ -271,12 +272,12 @@ namespace Swift {
if (level_ == 0) {
getPayloadInternal()->setData(data_);
} else if (level_ == 1) {
- WhiteboardInsertOperation::ref insertOp = boost::dynamic_pointer_cast<WhiteboardInsertOperation>(operation);
+ WhiteboardInsertOperation::ref insertOp = std::dynamic_pointer_cast<WhiteboardInsertOperation>(operation);
if (insertOp) {
insertOp->setElement(wbElement);
}
- WhiteboardUpdateOperation::ref updateOp = boost::dynamic_pointer_cast<WhiteboardUpdateOperation>(operation);
+ WhiteboardUpdateOperation::ref updateOp = std::dynamic_pointer_cast<WhiteboardUpdateOperation>(operation);
if (updateOp) {
updateOp->setElement(wbElement);
}
@@ -290,7 +291,7 @@ namespace Swift {
void WhiteboardParser::handleCharacterData(const std::string& data) {
if (level_ == 3 && actualIsText) {
- WhiteboardTextElement::ref element = boost::dynamic_pointer_cast<WhiteboardTextElement>(getPayloadInternal()->getElement());
+ WhiteboardTextElement::ref element = std::dynamic_pointer_cast<WhiteboardTextElement>(getPayloadInternal()->getElement());
element->setText(data);
}
}