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/Serializer
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/Serializer')
-rw-r--r--Swiften/Serializer/AuthChallengeSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthChallengeSerializer.h6
-rw-r--r--Swiften/Serializer/AuthFailureSerializer.h6
-rw-r--r--Swiften/Serializer/AuthRequestSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthRequestSerializer.h6
-rw-r--r--Swiften/Serializer/AuthResponseSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthResponseSerializer.h6
-rw-r--r--Swiften/Serializer/AuthSuccessSerializer.cpp4
-rw-r--r--Swiften/Serializer/AuthSuccessSerializer.h6
-rw-r--r--Swiften/Serializer/ComponentHandshakeSerializer.cpp6
-rw-r--r--Swiften/Serializer/ComponentHandshakeSerializer.h6
-rw-r--r--Swiften/Serializer/CompressFailureSerializer.h6
-rw-r--r--Swiften/Serializer/CompressRequestSerializer.cpp8
-rw-r--r--Swiften/Serializer/CompressRequestSerializer.h8
-rw-r--r--Swiften/Serializer/ElementSerializer.h6
-rw-r--r--Swiften/Serializer/EnableStreamManagementSerializer.h6
-rw-r--r--Swiften/Serializer/GenericElementSerializer.h10
-rw-r--r--Swiften/Serializer/GenericPayloadSerializer.h14
-rw-r--r--Swiften/Serializer/GenericStanzaSerializer.h8
-rw-r--r--Swiften/Serializer/IQSerializer.h2
-rw-r--r--Swiften/Serializer/MessageSerializer.cpp2
-rw-r--r--Swiften/Serializer/MessageSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializerCollection.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializerCollection.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/BlockSerializer.h8
-rw-r--r--Swiften/Serializer/PayloadSerializers/BodySerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.cpp9
-rw-r--r--Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/ChatStateSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/CommandSerializer.cpp13
-rw-r--r--Swiften/Serializer/PayloadSerializers/CommandSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp5
-rw-r--r--Swiften/Serializer/PayloadSerializers/DelaySerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/ErrorSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/FormSerializer.cpp74
-rw-r--r--Swiften/Serializer/PayloadSerializers/FormSerializer.h18
-rw-r--r--Swiften/Serializer/PayloadSerializers/ForwardedSerializer.cpp25
-rw-r--r--Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp7
-rw-r--r--Swiften/Serializer/PayloadSerializers/IBBSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/IdleSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.cpp7
-rw-r--r--Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp18
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.cpp20
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp18
-rw-r--r--Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.cpp16
-rw-r--r--Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/LastSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMFinSerializer.cpp7
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp9
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp7
-rw-r--r--Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.cpp7
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h12
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp22
-rw-r--r--Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/NicknameSerializer.cpp9
-rw-r--r--Swiften/Serializer/PayloadSerializers/NicknameSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/PrioritySerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.cpp9
-rw-r--r--Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.cpp14
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.cpp24
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.cpp24
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h7
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSerializer.cpp42
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSerializer.h6
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp15
-rw-r--r--Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/ResultSetSerializer.cpp19
-rw-r--r--Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/RosterSerializer.cpp13
-rw-r--r--Swiften/Serializer/PayloadSerializers/RosterSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/S5BProxyRequestSerializer.h11
-rw-r--r--Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.cpp7
-rw-r--r--Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.cpp16
-rw-r--r--Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/StatusSerializer.h6
-rw-r--r--Swiften/Serializer/PayloadSerializers/StatusShowSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp19
-rw-r--r--Swiften/Serializer/PayloadSerializers/StorageSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp24
-rw-r--r--Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/SubjectSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/ThreadSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/ThreadSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/BlockSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/CapsInfoSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/CarbonsSerializerTest.cpp22
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp16
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/DeliveryReceiptSerializerTest.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ErrorSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp76
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ForwardedSerializerTest.cpp26
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/IBBSerializerTest.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/IdleSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/InBandRegistrationPayloadSerializerTest.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/IsodeIQDelegationSerializerTest.cpp30
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp53
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MAMFinSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp12
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MAMResultSerializerTest.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/MUCAdminPayloadSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.h5
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/PrioritySerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemsSerializerTest.cpp14
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/ResultSetSerializerTest.cpp12
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/RosterItemExchangeSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/RosterSerializerTest.cpp10
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/SearchPayloadSerializerTest.cpp30
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelsCatalogSerializerTest.cpp8
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/SoftwareVersionSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/StatusSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/StatusShowSerializerTest.cpp14
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/StreamInitiationSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/UserTuneSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/VCardUpdateSerializerTest.cpp4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UserLocationSerializer.cpp50
-rw-r--r--Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/UserTuneSerializer.cpp20
-rw-r--r--Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h4
-rw-r--r--Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp139
-rw-r--r--Swiften/Serializer/PayloadSerializers/VCardSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.cpp11
-rw-r--r--Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h2
-rw-r--r--Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp26
-rw-r--r--Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h2
-rw-r--r--Swiften/Serializer/PresenceSerializer.cpp4
-rw-r--r--Swiften/Serializer/PresenceSerializer.h2
-rw-r--r--Swiften/Serializer/StanzaAckRequestSerializer.h6
-rw-r--r--Swiften/Serializer/StanzaAckSerializer.h7
-rw-r--r--Swiften/Serializer/StanzaSerializer.cpp10
-rw-r--r--Swiften/Serializer/StanzaSerializer.h6
-rw-r--r--Swiften/Serializer/StartTLSFailureSerializer.h6
-rw-r--r--Swiften/Serializer/StartTLSRequestSerializer.h6
-rw-r--r--Swiften/Serializer/StreamErrorSerializer.cpp12
-rw-r--r--Swiften/Serializer/StreamErrorSerializer.h2
-rw-r--r--Swiften/Serializer/StreamFeaturesSerializer.cpp28
-rw-r--r--Swiften/Serializer/StreamFeaturesSerializer.h6
-rw-r--r--Swiften/Serializer/StreamManagementEnabledSerializer.cpp8
-rw-r--r--Swiften/Serializer/StreamManagementEnabledSerializer.h6
-rw-r--r--Swiften/Serializer/StreamManagementFailedSerializer.h6
-rw-r--r--Swiften/Serializer/StreamResumeSerializer.cpp7
-rw-r--r--Swiften/Serializer/StreamResumeSerializer.h6
-rw-r--r--Swiften/Serializer/StreamResumedSerializer.cpp7
-rw-r--r--Swiften/Serializer/StreamResumedSerializer.h6
-rw-r--r--Swiften/Serializer/TLSProceedSerializer.h6
-rw-r--r--Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/UnitTest/StreamFeaturesSerializerTest.cpp2
-rw-r--r--Swiften/Serializer/UnitTest/XMPPSerializerTest.cpp6
-rw-r--r--Swiften/Serializer/XML/UnitTest/XMLElementTest.cpp10
-rw-r--r--Swiften/Serializer/XML/XMLElement.cpp6
-rw-r--r--Swiften/Serializer/XML/XMLElement.h9
-rw-r--r--Swiften/Serializer/XML/XMLTextNode.h6
-rw-r--r--Swiften/Serializer/XMPPSerializer.cpp52
-rw-r--r--Swiften/Serializer/XMPPSerializer.h7
299 files changed, 1201 insertions, 1213 deletions
diff --git a/Swiften/Serializer/AuthChallengeSerializer.cpp b/Swiften/Serializer/AuthChallengeSerializer.cpp
index 2796a2d..8f963ff 100644
--- a/Swiften/Serializer/AuthChallengeSerializer.cpp
+++ b/Swiften/Serializer/AuthChallengeSerializer.cpp
@@ -15,8 +15,8 @@ namespace Swift {
AuthChallengeSerializer::AuthChallengeSerializer() {
}
-SafeByteArray AuthChallengeSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<AuthChallenge> authChallenge(boost::dynamic_pointer_cast<AuthChallenge>(element));
+SafeByteArray AuthChallengeSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<AuthChallenge> authChallenge(std::dynamic_pointer_cast<AuthChallenge>(element));
std::string value;
boost::optional<std::vector<unsigned char> > message = authChallenge->getValue();
if (message) {
diff --git a/Swiften/Serializer/AuthChallengeSerializer.h b/Swiften/Serializer/AuthChallengeSerializer.h
index 6c88d0a..9bcf68b 100644
--- a/Swiften/Serializer/AuthChallengeSerializer.h
+++ b/Swiften/Serializer/AuthChallengeSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/AuthChallenge.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthChallengeSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/AuthFailureSerializer.h b/Swiften/Serializer/AuthFailureSerializer.h
index fe85d2c..a410e8c 100644
--- a/Swiften/Serializer/AuthFailureSerializer.h
+++ b/Swiften/Serializer/AuthFailureSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/AuthFailure.h>
@@ -19,7 +19,7 @@ namespace Swift {
AuthFailureSerializer() : GenericElementSerializer<AuthFailure>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failure", "urn:ietf:params:xml:ns:xmpp-sasl").serialize());
}
};
diff --git a/Swiften/Serializer/AuthRequestSerializer.cpp b/Swiften/Serializer/AuthRequestSerializer.cpp
index f479eac..2c9a4dd 100644
--- a/Swiften/Serializer/AuthRequestSerializer.cpp
+++ b/Swiften/Serializer/AuthRequestSerializer.cpp
@@ -16,8 +16,8 @@ namespace Swift {
AuthRequestSerializer::AuthRequestSerializer() {
}
-SafeByteArray AuthRequestSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<AuthRequest> authRequest(boost::dynamic_pointer_cast<AuthRequest>(element));
+SafeByteArray AuthRequestSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<AuthRequest> authRequest(std::dynamic_pointer_cast<AuthRequest>(element));
SafeByteArray value;
boost::optional<SafeByteArray> message = authRequest->getMessage();
if (message) {
diff --git a/Swiften/Serializer/AuthRequestSerializer.h b/Swiften/Serializer/AuthRequestSerializer.h
index 8522c35..ae85cf6 100644
--- a/Swiften/Serializer/AuthRequestSerializer.h
+++ b/Swiften/Serializer/AuthRequestSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/AuthRequest.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthRequestSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/AuthResponseSerializer.cpp b/Swiften/Serializer/AuthResponseSerializer.cpp
index b4be521..9d3e2e0 100644
--- a/Swiften/Serializer/AuthResponseSerializer.cpp
+++ b/Swiften/Serializer/AuthResponseSerializer.cpp
@@ -16,8 +16,8 @@ namespace Swift {
AuthResponseSerializer::AuthResponseSerializer() {
}
-SafeByteArray AuthResponseSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<AuthResponse> authResponse(boost::dynamic_pointer_cast<AuthResponse>(element));
+SafeByteArray AuthResponseSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<AuthResponse> authResponse(std::dynamic_pointer_cast<AuthResponse>(element));
SafeByteArray value;
boost::optional<SafeByteArray> message = authResponse->getValue();
if (message) {
diff --git a/Swiften/Serializer/AuthResponseSerializer.h b/Swiften/Serializer/AuthResponseSerializer.h
index 2017f75..25ffbbb 100644
--- a/Swiften/Serializer/AuthResponseSerializer.h
+++ b/Swiften/Serializer/AuthResponseSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/AuthResponse.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthResponseSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/AuthSuccessSerializer.cpp b/Swiften/Serializer/AuthSuccessSerializer.cpp
index 78fe6a1..48d512b 100644
--- a/Swiften/Serializer/AuthSuccessSerializer.cpp
+++ b/Swiften/Serializer/AuthSuccessSerializer.cpp
@@ -15,8 +15,8 @@ namespace Swift {
AuthSuccessSerializer::AuthSuccessSerializer() {
}
-SafeByteArray AuthSuccessSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<AuthSuccess> authSuccess(boost::dynamic_pointer_cast<AuthSuccess>(element));
+SafeByteArray AuthSuccessSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<AuthSuccess> authSuccess(std::dynamic_pointer_cast<AuthSuccess>(element));
std::string value;
boost::optional<std::vector<unsigned char> > message = authSuccess->getValue();
if (message) {
diff --git a/Swiften/Serializer/AuthSuccessSerializer.h b/Swiften/Serializer/AuthSuccessSerializer.h
index 99133fa..102e6a0 100644
--- a/Swiften/Serializer/AuthSuccessSerializer.h
+++ b/Swiften/Serializer/AuthSuccessSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/AuthSuccess.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
AuthSuccessSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/ComponentHandshakeSerializer.cpp b/Swiften/Serializer/ComponentHandshakeSerializer.cpp
index 1ac1ce7..0e94917 100644
--- a/Swiften/Serializer/ComponentHandshakeSerializer.cpp
+++ b/Swiften/Serializer/ComponentHandshakeSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,8 +13,8 @@ namespace Swift {
ComponentHandshakeSerializer::ComponentHandshakeSerializer() {
}
-SafeByteArray ComponentHandshakeSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<ComponentHandshake> handshake(boost::dynamic_pointer_cast<ComponentHandshake>(element));
+SafeByteArray ComponentHandshakeSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<ComponentHandshake> handshake(std::dynamic_pointer_cast<ComponentHandshake>(element));
return createSafeByteArray("<handshake>" + handshake->getData() + "</handshake>");
}
diff --git a/Swiften/Serializer/ComponentHandshakeSerializer.h b/Swiften/Serializer/ComponentHandshakeSerializer.h
index 651903f..d6ee156 100644
--- a/Swiften/Serializer/ComponentHandshakeSerializer.h
+++ b/Swiften/Serializer/ComponentHandshakeSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/ComponentHandshake.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
ComponentHandshakeSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/CompressFailureSerializer.h b/Swiften/Serializer/CompressFailureSerializer.h
index 154f167..045c7d2 100644
--- a/Swiften/Serializer/CompressFailureSerializer.h
+++ b/Swiften/Serializer/CompressFailureSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/CompressFailure.h>
@@ -19,7 +19,7 @@ namespace Swift {
CompressFailureSerializer() : GenericElementSerializer<CompressFailure>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failure", "http://jabber.org/protocol/compress").serialize());
}
};
diff --git a/Swiften/Serializer/CompressRequestSerializer.cpp b/Swiften/Serializer/CompressRequestSerializer.cpp
index e6bc4ff..9deb702 100644
--- a/Swiften/Serializer/CompressRequestSerializer.cpp
+++ b/Swiften/Serializer/CompressRequestSerializer.cpp
@@ -13,13 +13,13 @@ namespace Swift {
CompressRequestSerializer::CompressRequestSerializer() {
}
-SafeByteArray CompressRequestSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<CompressRequest> compressRequest(boost::dynamic_pointer_cast<CompressRequest>(element));
+SafeByteArray CompressRequestSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<CompressRequest> compressRequest(std::dynamic_pointer_cast<CompressRequest>(element));
return createSafeByteArray("<compress xmlns='http://jabber.org/protocol/compress'><method>" + compressRequest->getMethod() + "</method></compress>");
}
-bool CompressRequestSerializer::canSerialize(boost::shared_ptr<ToplevelElement> element) const {
- return boost::dynamic_pointer_cast<CompressRequest>(element) != nullptr;
+bool CompressRequestSerializer::canSerialize(std::shared_ptr<ToplevelElement> element) const {
+ return std::dynamic_pointer_cast<CompressRequest>(element) != nullptr;
}
}
diff --git a/Swiften/Serializer/CompressRequestSerializer.h b/Swiften/Serializer/CompressRequestSerializer.h
index 1472a81..d768023 100644
--- a/Swiften/Serializer/CompressRequestSerializer.h
+++ b/Swiften/Serializer/CompressRequestSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Serializer/ElementSerializer.h>
@@ -16,7 +16,7 @@ namespace Swift {
public:
CompressRequestSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
- virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
+ virtual bool canSerialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/ElementSerializer.h b/Swiften/Serializer/ElementSerializer.h
index 15f69da..3bef58b 100644
--- a/Swiften/Serializer/ElementSerializer.h
+++ b/Swiften/Serializer/ElementSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/SafeByteArray.h>
#include <Swiften/Elements/ToplevelElement.h>
@@ -16,7 +16,7 @@ namespace Swift {
public:
virtual ~ElementSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const = 0;
- virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const = 0;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const = 0;
+ virtual bool canSerialize(std::shared_ptr<ToplevelElement> element) const = 0;
};
}
diff --git a/Swiften/Serializer/EnableStreamManagementSerializer.h b/Swiften/Serializer/EnableStreamManagementSerializer.h
index ffbcf8b..ba92843 100644
--- a/Swiften/Serializer/EnableStreamManagementSerializer.h
+++ b/Swiften/Serializer/EnableStreamManagementSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/EnableStreamManagement.h>
@@ -19,7 +19,7 @@ namespace Swift {
EnableStreamManagementSerializer() : GenericElementSerializer<EnableStreamManagement>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("enable", "urn:xmpp:sm:2").serialize());
}
};
diff --git a/Swiften/Serializer/GenericElementSerializer.h b/Swiften/Serializer/GenericElementSerializer.h
index 053a163..b5f4119 100644
--- a/Swiften/Serializer/GenericElementSerializer.h
+++ b/Swiften/Serializer/GenericElementSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Serializer/ElementSerializer.h>
@@ -15,10 +15,10 @@ namespace Swift {
template<typename T>
class SWIFTEN_API GenericElementSerializer : public ElementSerializer {
public:
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const = 0;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const = 0;
- virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const {
- return !!boost::dynamic_pointer_cast<T>(element);
+ virtual bool canSerialize(std::shared_ptr<ToplevelElement> element) const {
+ return !!std::dynamic_pointer_cast<T>(element);
}
};
}
diff --git a/Swiften/Serializer/GenericPayloadSerializer.h b/Swiften/Serializer/GenericPayloadSerializer.h
index 080d04b..804ccaf 100644
--- a/Swiften/Serializer/GenericPayloadSerializer.h
+++ b/Swiften/Serializer/GenericPayloadSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Serializer/PayloadSerializer.h>
@@ -15,14 +15,14 @@ namespace Swift {
template<typename PAYLOAD_TYPE>
class GenericPayloadSerializer : public PayloadSerializer {
public:
- virtual std::string serialize(boost::shared_ptr<Payload> element) const {
- return serializePayload(boost::dynamic_pointer_cast<PAYLOAD_TYPE>(element));
+ virtual std::string serialize(std::shared_ptr<Payload> element) const {
+ return serializePayload(std::dynamic_pointer_cast<PAYLOAD_TYPE>(element));
}
- virtual bool canSerialize(boost::shared_ptr<Payload> element) const {
- return !!boost::dynamic_pointer_cast<PAYLOAD_TYPE>(element);
+ virtual bool canSerialize(std::shared_ptr<Payload> element) const {
+ return !!std::dynamic_pointer_cast<PAYLOAD_TYPE>(element);
}
- virtual std::string serializePayload(boost::shared_ptr<PAYLOAD_TYPE>) const = 0;
+ virtual std::string serializePayload(std::shared_ptr<PAYLOAD_TYPE>) const = 0;
};
}
diff --git a/Swiften/Serializer/GenericStanzaSerializer.h b/Swiften/Serializer/GenericStanzaSerializer.h
index 32fcbe9..badd55c 100644
--- a/Swiften/Serializer/GenericStanzaSerializer.h
+++ b/Swiften/Serializer/GenericStanzaSerializer.h
@@ -15,19 +15,19 @@ namespace Swift {
public:
GenericStanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers, const boost::optional<std::string>& explicitNS = boost::optional<std::string>()) : StanzaSerializer(tag, payloadSerializers, explicitNS) {}
- virtual bool canSerialize(boost::shared_ptr<ToplevelElement> element) const {
+ virtual bool canSerialize(std::shared_ptr<ToplevelElement> element) const {
return dynamic_cast<STANZA_TYPE*>(element.get()) != nullptr;
}
virtual void setStanzaSpecificAttributes(
- boost::shared_ptr<ToplevelElement> stanza,
+ std::shared_ptr<ToplevelElement> stanza,
XMLElement& element) const {
setStanzaSpecificAttributesGeneric(
- boost::dynamic_pointer_cast<STANZA_TYPE>(stanza), element);
+ std::dynamic_pointer_cast<STANZA_TYPE>(stanza), element);
}
virtual void setStanzaSpecificAttributesGeneric(
- boost::shared_ptr<STANZA_TYPE>,
+ std::shared_ptr<STANZA_TYPE>,
XMLElement&) const = 0;
};
}
diff --git a/Swiften/Serializer/IQSerializer.h b/Swiften/Serializer/IQSerializer.h
index db052fb..1bdbb07 100644
--- a/Swiften/Serializer/IQSerializer.h
+++ b/Swiften/Serializer/IQSerializer.h
@@ -22,7 +22,7 @@ namespace Swift {
private:
virtual void setStanzaSpecificAttributesGeneric(
- boost::shared_ptr<IQ> iq,
+ std::shared_ptr<IQ> iq,
XMLElement& element) const {
switch (iq->getType()) {
case IQ::Get: element.setAttribute("type","get"); break;
diff --git a/Swiften/Serializer/MessageSerializer.cpp b/Swiften/Serializer/MessageSerializer.cpp
index fb16393..774d9a3 100644
--- a/Swiften/Serializer/MessageSerializer.cpp
+++ b/Swiften/Serializer/MessageSerializer.cpp
@@ -15,7 +15,7 @@ MessageSerializer::MessageSerializer(PayloadSerializerCollection* payloadSeriali
}
void MessageSerializer::setStanzaSpecificAttributesGeneric(
- boost::shared_ptr<Message> message,
+ std::shared_ptr<Message> message,
XMLElement& element) const {
if (message->getType() == Message::Chat) {
element.setAttribute("type", "chat");
diff --git a/Swiften/Serializer/MessageSerializer.h b/Swiften/Serializer/MessageSerializer.h
index 50df353..812b647 100644
--- a/Swiften/Serializer/MessageSerializer.h
+++ b/Swiften/Serializer/MessageSerializer.h
@@ -21,7 +21,7 @@ namespace Swift {
private:
void setStanzaSpecificAttributesGeneric(
- boost::shared_ptr<Message> message,
+ std::shared_ptr<Message> message,
XMLElement& element) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializer.h b/Swiften/Serializer/PayloadSerializer.h
index 642247d..fe14e3d 100644
--- a/Swiften/Serializer/PayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializer.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
namespace Swift {
@@ -19,7 +18,7 @@ namespace Swift {
public:
virtual ~PayloadSerializer();
- virtual bool canSerialize(boost::shared_ptr<Payload>) const = 0;
- virtual std::string serialize(boost::shared_ptr<Payload>) const = 0;
+ virtual bool canSerialize(std::shared_ptr<Payload>) const = 0;
+ virtual std::string serialize(std::shared_ptr<Payload>) const = 0;
};
}
diff --git a/Swiften/Serializer/PayloadSerializerCollection.cpp b/Swiften/Serializer/PayloadSerializerCollection.cpp
index 05fe445..dd20364 100644
--- a/Swiften/Serializer/PayloadSerializerCollection.cpp
+++ b/Swiften/Serializer/PayloadSerializerCollection.cpp
@@ -25,7 +25,7 @@ void PayloadSerializerCollection::removeSerializer(PayloadSerializer* serializer
serializers_.erase(std::remove(serializers_.begin(), serializers_.end(), serializer), serializers_.end());
}
-PayloadSerializer* PayloadSerializerCollection::getPayloadSerializer(boost::shared_ptr<Payload> payload) const {
+PayloadSerializer* PayloadSerializerCollection::getPayloadSerializer(std::shared_ptr<Payload> payload) const {
std::vector<PayloadSerializer*>::const_iterator i = std::find_if(
serializers_.begin(), serializers_.end(),
boost::bind(&PayloadSerializer::canSerialize, _1, payload));
diff --git a/Swiften/Serializer/PayloadSerializerCollection.h b/Swiften/Serializer/PayloadSerializerCollection.h
index 47ba6a1..a0fe2ea 100644
--- a/Swiften/Serializer/PayloadSerializerCollection.h
+++ b/Swiften/Serializer/PayloadSerializerCollection.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <vector>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Elements/Payload.h>
@@ -23,7 +22,7 @@ namespace Swift {
void addSerializer(PayloadSerializer* factory);
void removeSerializer(PayloadSerializer* factory);
- PayloadSerializer* getPayloadSerializer(boost::shared_ptr<Payload>) const;
+ PayloadSerializer* getPayloadSerializer(std::shared_ptr<Payload>) const;
private:
std::vector<PayloadSerializer*> serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/BlockSerializer.h b/Swiften/Serializer/PayloadSerializers/BlockSerializer.h
index 7490e4f..86aa321 100644
--- a/Swiften/Serializer/PayloadSerializers/BlockSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/BlockSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/JID/JID.h>
@@ -20,11 +20,11 @@ namespace Swift {
BlockSerializer(std::string tag) : GenericPayloadSerializer<BLOCK_ELEMENT>(), tag(tag) {
}
- virtual std::string serializePayload(boost::shared_ptr<BLOCK_ELEMENT> payload) const {
+ virtual std::string serializePayload(std::shared_ptr<BLOCK_ELEMENT> payload) const {
XMLElement element(tag, "urn:xmpp:blocking");
const std::vector<JID>& items = payload->getItems();
for (std::vector<JID>::const_iterator i = items.begin(); i != items.end(); ++i) {
- boost::shared_ptr<XMLElement> item = boost::make_shared<XMLElement>("item");
+ std::shared_ptr<XMLElement> item = std::make_shared<XMLElement>("item");
item->setAttribute("jid", *i);
element.addNode(item);
}
diff --git a/Swiften/Serializer/PayloadSerializers/BodySerializer.h b/Swiften/Serializer/PayloadSerializers/BodySerializer.h
index f2d7a8d..faad411 100644
--- a/Swiften/Serializer/PayloadSerializers/BodySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/BodySerializer.h
@@ -16,7 +16,7 @@ namespace Swift {
public:
BodySerializer() : GenericPayloadSerializer<Body>() {}
- virtual std::string serializePayload(boost::shared_ptr<Body> body) const {
+ virtual std::string serializePayload(std::shared_ptr<Body> body) const {
XMLTextNode textNode(body->getText());
return "<body>" + textNode.serialize() + "</body>";
}
diff --git a/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.cpp
index b5218ee..93eab75 100644
--- a/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
@@ -18,11 +19,11 @@ namespace Swift {
BytestreamsSerializer::BytestreamsSerializer() {
}
-std::string BytestreamsSerializer::serializePayload(boost::shared_ptr<Bytestreams> bytestreams) const {
+std::string BytestreamsSerializer::serializePayload(std::shared_ptr<Bytestreams> bytestreams) const {
XMLElement queryElement("query", "http://jabber.org/protocol/bytestreams");
queryElement.setAttribute("sid", bytestreams->getStreamID());
foreach(const Bytestreams::StreamHost& streamHost, bytestreams->getStreamHosts()) {
- boost::shared_ptr<XMLElement> streamHostElement(new XMLElement("streamhost"));
+ std::shared_ptr<XMLElement> streamHostElement(new XMLElement("streamhost"));
streamHostElement->setAttribute("host", streamHost.host);
streamHostElement->setAttribute("jid", streamHost.jid.toString());
streamHostElement->setAttribute("port", boost::lexical_cast<std::string>(streamHost.port));
@@ -30,7 +31,7 @@ std::string BytestreamsSerializer::serializePayload(boost::shared_ptr<Bytestream
}
if (bytestreams->getUsedStreamHost()) {
- boost::shared_ptr<XMLElement> streamHostElement(new XMLElement("streamhost-used"));
+ std::shared_ptr<XMLElement> streamHostElement(new XMLElement("streamhost-used"));
streamHostElement->setAttribute("jid", *bytestreams->getUsedStreamHost());
queryElement.addNode(streamHostElement);
}
diff --git a/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.h b/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.h
index 6056cad..533be61 100644
--- a/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/BytestreamsSerializer.h
@@ -17,6 +17,6 @@ namespace Swift {
public:
BytestreamsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Bytestreams>) const;
+ virtual std::string serializePayload(std::shared_ptr<Bytestreams>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.cpp
index 799e662..19f8a27 100644
--- a/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -15,7 +15,7 @@ namespace Swift {
CapsInfoSerializer::CapsInfoSerializer() : GenericPayloadSerializer<CapsInfo>() {
}
-std::string CapsInfoSerializer::serializePayload(boost::shared_ptr<CapsInfo> capsInfo) const {
+std::string CapsInfoSerializer::serializePayload(std::shared_ptr<CapsInfo> capsInfo) const {
XMLElement capsElement("c", "http://jabber.org/protocol/caps");
capsElement.setAttribute("node", capsInfo->getNode());
capsElement.setAttribute("hash", capsInfo->getHash());
diff --git a/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h b/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h
index bbf4c09..ac168e4 100644
--- a/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CapsInfoSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
CapsInfoSerializer();
- virtual std::string serializePayload(boost::shared_ptr<CapsInfo>) const;
+ virtual std::string serializePayload(std::shared_ptr<CapsInfo>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.cpp
index 406fdbc..9938bd9 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.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.
*/
@@ -17,7 +17,7 @@ namespace Swift {
}
- std::string CarbonsDisableSerializer::serializePayload(boost::shared_ptr<CarbonsDisable>) const {
+ std::string CarbonsDisableSerializer::serializePayload(std::shared_ptr<CarbonsDisable>) const {
XMLElement element("disable", "urn:xmpp:carbons:2");
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.h b/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.h
index da01ead..a6bf16f 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsDisableSerializer.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.
*/
@@ -16,6 +16,6 @@ namespace Swift {
CarbonsDisableSerializer();
virtual ~CarbonsDisableSerializer();
- virtual std::string serializePayload(boost::shared_ptr<CarbonsDisable>) const;
+ virtual std::string serializePayload(std::shared_ptr<CarbonsDisable>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.cpp
index a2520f9..424c6fc 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.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 {
}
- std::string CarbonsEnableSerializer::serializePayload(boost::shared_ptr<CarbonsEnable>) const {
+ std::string CarbonsEnableSerializer::serializePayload(std::shared_ptr<CarbonsEnable>) const {
XMLElement element("enable", "urn:xmpp:carbons:2");
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.h b/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.h
index 8b26901..eb0f6fa 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsEnableSerializer.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.
*/
@@ -17,6 +17,6 @@ namespace Swift {
CarbonsEnableSerializer();
virtual ~CarbonsEnableSerializer();
- virtual std::string serializePayload(boost::shared_ptr<CarbonsEnable>) const;
+ virtual std::string serializePayload(std::shared_ptr<CarbonsEnable>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.cpp
index 6fbfc26..fb92017 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.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 {
}
- std::string CarbonsPrivateSerializer::serializePayload(boost::shared_ptr<CarbonsPrivate>) const {
+ std::string CarbonsPrivateSerializer::serializePayload(std::shared_ptr<CarbonsPrivate>) const {
XMLElement element("private", "urn:xmpp:carbons:2");
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.h b/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.h
index a93d87f..d148a26 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsPrivateSerializer.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.
*/
@@ -17,6 +17,6 @@ namespace Swift {
CarbonsPrivateSerializer();
virtual ~CarbonsPrivateSerializer();
- virtual std::string serializePayload(boost::shared_ptr<CarbonsPrivate>) const;
+ virtual std::string serializePayload(std::shared_ptr<CarbonsPrivate>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp
index 981421b..cc87929 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h>
-#include <boost/make_shared.hpp>
+#include <memory>
namespace Swift {
CarbonsReceivedSerializer::CarbonsReceivedSerializer(PayloadSerializerCollection* serializers) : GenericPayloadSerializer<CarbonsReceived>(), serializers_(serializers) {
@@ -15,10 +15,10 @@ namespace Swift {
CarbonsReceivedSerializer::~CarbonsReceivedSerializer() {
}
- std::string CarbonsReceivedSerializer::serializePayload(boost::shared_ptr<CarbonsReceived> received) const {
+ std::string CarbonsReceivedSerializer::serializePayload(std::shared_ptr<CarbonsReceived> received) const {
XMLElement element("received", "urn:xmpp:carbons:2");
if (received->getForwarded()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(received->getForwarded())));
+ element.addNode(std::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(received->getForwarded())));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h b/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h
index 719e84a..017b187 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsReceivedSerializer.h
@@ -20,7 +20,7 @@ namespace Swift {
CarbonsReceivedSerializer(PayloadSerializerCollection* serializers);
virtual ~CarbonsReceivedSerializer();
- virtual std::string serializePayload(boost::shared_ptr<CarbonsReceived> received) const;
+ virtual std::string serializePayload(std::shared_ptr<CarbonsReceived> received) const;
private:
PayloadSerializerCollection* serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.cpp
index f71208f..986edcb 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.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.
*/
@@ -13,10 +13,10 @@ namespace Swift {
CarbonsSentSerializer::~CarbonsSentSerializer() {
}
- std::string CarbonsSentSerializer::serializePayload(boost::shared_ptr<CarbonsSent> sent) const {
+ std::string CarbonsSentSerializer::serializePayload(std::shared_ptr<CarbonsSent> sent) const {
XMLElement element("sent", "urn:xmpp:carbons:2");
if (sent->getForwarded()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(sent->getForwarded())));
+ element.addNode(std::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(sent->getForwarded())));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.h b/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.h
index cecb3b8..16db398 100644
--- a/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CarbonsSentSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/CarbonsSent.h>
@@ -22,7 +22,7 @@ namespace Swift {
CarbonsSentSerializer(PayloadSerializerCollection* serializers);
virtual ~CarbonsSentSerializer();
- virtual std::string serializePayload(boost::shared_ptr<CarbonsSent> sent) const;
+ virtual std::string serializePayload(std::shared_ptr<CarbonsSent> sent) const;
private:
PayloadSerializerCollection* serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp
index 325215a..17f8be0 100644
--- a/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.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.
*/
@@ -11,7 +11,7 @@ namespace Swift {
ChatStateSerializer::ChatStateSerializer() : GenericPayloadSerializer<ChatState>() {
}
-std::string ChatStateSerializer::serializePayload(boost::shared_ptr<ChatState> chatState) const {
+std::string ChatStateSerializer::serializePayload(std::shared_ptr<ChatState> chatState) const {
std::string result("<");
switch (chatState->getChatState()) {
case ChatState::Active: result += "active"; break;
diff --git a/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.h b/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.h
index cfdaf83..3b9f315 100644
--- a/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ChatStateSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
ChatStateSerializer();
- virtual std::string serializePayload(boost::shared_ptr<ChatState> error) const;
+ virtual std::string serializePayload(std::shared_ptr<ChatState> error) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/CommandSerializer.cpp b/Swiften/Serializer/PayloadSerializers/CommandSerializer.cpp
index 9ed17dc..e1dd6ed 100644
--- a/Swiften/Serializer/PayloadSerializers/CommandSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/CommandSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/CommandSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -20,7 +19,7 @@ namespace Swift {
CommandSerializer::CommandSerializer() {
}
-std::string CommandSerializer::serializePayload(boost::shared_ptr<Command> command) const {
+std::string CommandSerializer::serializePayload(std::shared_ptr<Command> command) const {
XMLElement commandElement("command", "http://jabber.org/protocol/commands");
commandElement.setAttribute("node", command->getNode());
@@ -55,11 +54,11 @@ std::string CommandSerializer::serializePayload(boost::shared_ptr<Command> comma
actions += "<" + actionToString(action) + "/>";
}
actions += "</actions>";
- commandElement.addNode(boost::make_shared<XMLRawTextNode>(actions));
+ commandElement.addNode(std::make_shared<XMLRawTextNode>(actions));
}
foreach (Command::Note note, command->getNotes()) {
- boost::shared_ptr<XMLElement> noteElement(new XMLElement("note"));
+ std::shared_ptr<XMLElement> noteElement(new XMLElement("note"));
std::string type;
switch (note.type) {
case Command::Note::Info: type = "info"; break;
@@ -69,13 +68,13 @@ std::string CommandSerializer::serializePayload(boost::shared_ptr<Command> comma
if (!type.empty()) {
noteElement->setAttribute("type", type);
}
- noteElement->addNode(boost::make_shared<XMLTextNode>(note.note));
+ noteElement->addNode(std::make_shared<XMLTextNode>(note.note));
commandElement.addNode(noteElement);
}
Form::ref form = command->getForm();
if (form) {
- commandElement.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
+ commandElement.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
}
return commandElement.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/CommandSerializer.h b/Swiften/Serializer/PayloadSerializers/CommandSerializer.h
index bc3642d..e1f0b24 100644
--- a/Swiften/Serializer/PayloadSerializers/CommandSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/CommandSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
CommandSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Command>) const;
+ virtual std::string serializePayload(std::shared_ptr<Command>) const;
private:
std::string actionToString(Command::Action action) const;
diff --git a/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp b/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp
index 428b565..b168fdc 100644
--- a/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DelaySerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/DelaySerializer.h>
+#include <memory>
+
#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/DateTime.h>
#include <Swiften/Base/String.h>
@@ -18,7 +19,7 @@ namespace Swift {
DelaySerializer::DelaySerializer() : GenericPayloadSerializer<Delay>() {
}
-std::string DelaySerializer::serializePayload(boost::shared_ptr<Delay> delay) const {
+std::string DelaySerializer::serializePayload(std::shared_ptr<Delay> delay) const {
XMLElement delayElement("delay", "urn:xmpp:delay");
if (delay->getFrom() && delay->getFrom()->isValid()) {
delayElement.setAttribute("from", delay->getFrom()->toString());
diff --git a/Swiften/Serializer/PayloadSerializers/DelaySerializer.h b/Swiften/Serializer/PayloadSerializers/DelaySerializer.h
index 71039f2..86fde42 100644
--- a/Swiften/Serializer/PayloadSerializers/DelaySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/DelaySerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
DelaySerializer();
- virtual std::string serializePayload(boost::shared_ptr<Delay>) const;
+ virtual std::string serializePayload(std::shared_ptr<Delay>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.cpp
index 887502a..8183b7f 100644
--- a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.cpp
@@ -20,7 +20,7 @@ namespace Swift {
DeliveryReceiptRequestSerializer::DeliveryReceiptRequestSerializer() : GenericPayloadSerializer<DeliveryReceiptRequest>() {
}
-std::string DeliveryReceiptRequestSerializer::serializePayload(boost::shared_ptr<DeliveryReceiptRequest> /* request*/) const {
+std::string DeliveryReceiptRequestSerializer::serializePayload(std::shared_ptr<DeliveryReceiptRequest> /* request*/) const {
XMLElement requestXML("request", "urn:xmpp:receipts");
return requestXML.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h
index 97377d6..a3e76eb 100644
--- a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptRequestSerializer.h
@@ -21,6 +21,6 @@ namespace Swift {
public:
DeliveryReceiptRequestSerializer();
- virtual std::string serializePayload(boost::shared_ptr<DeliveryReceiptRequest> request) const;
+ virtual std::string serializePayload(std::shared_ptr<DeliveryReceiptRequest> request) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.cpp
index d3e1480..d392d17 100644
--- a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.cpp
@@ -19,7 +19,7 @@ namespace Swift {
DeliveryReceiptSerializer::DeliveryReceiptSerializer() : GenericPayloadSerializer<DeliveryReceipt>() {
}
-std::string DeliveryReceiptSerializer::serializePayload(boost::shared_ptr<DeliveryReceipt> receipt) const {
+std::string DeliveryReceiptSerializer::serializePayload(std::shared_ptr<DeliveryReceipt> receipt) const {
XMLElement received("received", "urn:xmpp:receipts");
received.setAttribute("id", receipt->getReceivedID());
return received.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h
index 943f4b9..6153de1 100644
--- a/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/DeliveryReceiptSerializer.h
@@ -21,6 +21,6 @@ namespace Swift {
public:
DeliveryReceiptSerializer();
- virtual std::string serializePayload(boost::shared_ptr<DeliveryReceipt> receipt) const;
+ virtual std::string serializePayload(std::shared_ptr<DeliveryReceipt> receipt) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp
index e57fd12..73e2585 100644
--- a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -19,13 +18,13 @@ namespace Swift {
DiscoInfoSerializer::DiscoInfoSerializer() : GenericPayloadSerializer<DiscoInfo>() {
}
-std::string DiscoInfoSerializer::serializePayload(boost::shared_ptr<DiscoInfo> discoInfo) const {
+std::string DiscoInfoSerializer::serializePayload(std::shared_ptr<DiscoInfo> discoInfo) const {
XMLElement queryElement("query", "http://jabber.org/protocol/disco#info");
if (!discoInfo->getNode().empty()) {
queryElement.setAttribute("node", discoInfo->getNode());
}
foreach(const DiscoInfo::Identity& identity, discoInfo->getIdentities()) {
- boost::shared_ptr<XMLElement> identityElement(new XMLElement("identity"));
+ std::shared_ptr<XMLElement> identityElement(new XMLElement("identity"));
if (!identity.getLanguage().empty()) {
identityElement->setAttribute("xml:lang", identity.getLanguage());
}
@@ -35,12 +34,12 @@ std::string DiscoInfoSerializer::serializePayload(boost::shared_ptr<DiscoInfo> d
queryElement.addNode(identityElement);
}
foreach(const std::string& feature, discoInfo->getFeatures()) {
- boost::shared_ptr<XMLElement> featureElement(new XMLElement("feature"));
+ std::shared_ptr<XMLElement> featureElement(new XMLElement("feature"));
featureElement->setAttribute("var", feature);
queryElement.addNode(featureElement);
}
foreach(const Form::ref extension, discoInfo->getExtensions()) {
- queryElement.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(extension)));
+ queryElement.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(extension)));
}
return queryElement.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h
index 9850714..21648d6 100644
--- a/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
DiscoInfoSerializer();
- virtual std::string serializePayload(boost::shared_ptr<DiscoInfo>) const;
+ virtual std::string serializePayload(std::shared_ptr<DiscoInfo>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp
index f537f40..1b734dc 100644
--- a/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -16,13 +16,13 @@ namespace Swift {
DiscoItemsSerializer::DiscoItemsSerializer() : GenericPayloadSerializer<DiscoItems>() {
}
-std::string DiscoItemsSerializer::serializePayload(boost::shared_ptr<DiscoItems> discoItems) const {
+std::string DiscoItemsSerializer::serializePayload(std::shared_ptr<DiscoItems> discoItems) const {
XMLElement queryElement("query", "http://jabber.org/protocol/disco#items");
if (!discoItems->getNode().empty()) {
queryElement.setAttribute("node", discoItems->getNode());
}
foreach(const DiscoItems::Item& item, discoItems->getItems()) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ std::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
itemElement->setAttribute("name", item.getName());
itemElement->setAttribute("jid", item.getJID());
if (!item.getNode().empty()) {
diff --git a/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.h b/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.h
index acc5a7b..ca88cb0 100644
--- a/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/DiscoItemsSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
DiscoItemsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<DiscoItems>) const;
+ virtual std::string serializePayload(std::shared_ptr<DiscoItems>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp
index 1ed60d1..26686f0 100644
--- a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.cpp
@@ -14,7 +14,7 @@ namespace Swift {
ErrorSerializer::ErrorSerializer(PayloadSerializerCollection* serializers) : GenericPayloadSerializer<ErrorPayload>(), serializers(serializers) {
}
-std::string ErrorSerializer::serializePayload(boost::shared_ptr<ErrorPayload> error) const {
+std::string ErrorSerializer::serializePayload(std::shared_ptr<ErrorPayload> error) const {
std::string result("<error type=\"");
switch (error->getType()) {
case ErrorPayload::Continue: result += "continue"; break;
diff --git a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.h b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.h
index 2ccd5df..df7791e 100644
--- a/Swiften/Serializer/PayloadSerializers/ErrorSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ErrorSerializer.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
ErrorSerializer(PayloadSerializerCollection* serializers);
- virtual std::string serializePayload(boost::shared_ptr<ErrorPayload> error) const;
+ virtual std::string serializePayload(std::shared_ptr<ErrorPayload> error) const;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp b/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp
index cc6339c..9a05431 100644
--- a/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/FormSerializer.cpp
@@ -7,11 +7,9 @@
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
#include <iostream>
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
#include <Swiften/Base/Algorithm.h>
#include <Swiften/Base/String.h>
#include <Swiften/Base/foreach.h>
@@ -21,10 +19,10 @@
using namespace Swift;
namespace {
- template<typename T> void serializeValueAsString(boost::shared_ptr<FormField> field, boost::shared_ptr<XMLElement> parent) {
- std::string value = boost::dynamic_pointer_cast<T>(field)->getValue();
+ template<typename T> void serializeValueAsString(std::shared_ptr<FormField> field, std::shared_ptr<XMLElement> parent) {
+ std::string value = std::dynamic_pointer_cast<T>(field)->getValue();
if (!value.empty()) {
- boost::shared_ptr<XMLElement> valueElement(new XMLElement("value"));
+ std::shared_ptr<XMLElement> valueElement(new XMLElement("value"));
valueElement->addNode(XMLTextNode::create(value));
parent->addNode(valueElement);
}
@@ -35,12 +33,12 @@ namespace Swift {
FormSerializer::FormSerializer() : GenericPayloadSerializer<Form>() {}
-std::string FormSerializer::serializePayload(boost::shared_ptr<Form> form) const {
+std::string FormSerializer::serializePayload(std::shared_ptr<Form> form) const {
if (!form) {
return "";
}
- boost::shared_ptr<XMLElement> formElement(new XMLElement("x", "jabber:x:data"));
+ std::shared_ptr<XMLElement> formElement(new XMLElement("x", "jabber:x:data"));
std::string type;
switch (form->getType()) {
case Form::FormType: type = "form"; break;
@@ -55,14 +53,14 @@ std::string FormSerializer::serializePayload(boost::shared_ptr<Form> form) cons
if (!form->getInstructions().empty()) {
multiLineify(form->getInstructions(), "instructions", formElement);
}
- foreach(boost::shared_ptr<FormPage> page, form->getPages()) {
+ foreach(std::shared_ptr<FormPage> page, form->getPages()) {
formElement->addNode(pageToXML(page));
}
- foreach(boost::shared_ptr<FormField> field, form->getFields()) {
+ foreach(std::shared_ptr<FormField> field, form->getFields()) {
formElement->addNode(fieldToXML(field, true));
}
if (!form->getReportedFields().empty()) {
- boost::shared_ptr<XMLElement> reportedElement(new XMLElement("reported"));
+ std::shared_ptr<XMLElement> reportedElement(new XMLElement("reported"));
foreach(FormField::ref field, form->getReportedFields()) {
reportedElement->addNode(fieldToXML(field, true));
}
@@ -70,7 +68,7 @@ std::string FormSerializer::serializePayload(boost::shared_ptr<Form> form) cons
}
foreach(Form::FormItem item, form->getItems()) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ std::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
foreach(FormField::ref field, item) {
itemElement->addNode(fieldToXML(field, false));
}
@@ -81,27 +79,27 @@ std::string FormSerializer::serializePayload(boost::shared_ptr<Form> form) cons
formElement->addNode(textToXML(text));
}
- foreach (boost::shared_ptr<FormField> field, fields_) {
+ foreach (std::shared_ptr<FormField> field, fields_) {
formElement->addNode(fieldToXML(field,true));
}
return formElement->serialize();
}
-boost::shared_ptr<XMLElement> FormSerializer::textToXML(boost::shared_ptr<FormText> text) const {
- boost::shared_ptr<XMLElement> textElement (new XMLElement("text"));
- textElement->addNode(boost::make_shared<XMLTextNode>(text->getTextString()));
+std::shared_ptr<XMLElement> FormSerializer::textToXML(std::shared_ptr<FormText> text) const {
+ std::shared_ptr<XMLElement> textElement (new XMLElement("text"));
+ textElement->addNode(std::make_shared<XMLTextNode>(text->getTextString()));
return textElement;
}
-boost::shared_ptr<XMLElement> FormSerializer::fieldRefToXML(const std::string& ref) const {
- boost::shared_ptr<XMLElement> fieldRefElement(new XMLElement("fieldref"));
+std::shared_ptr<XMLElement> FormSerializer::fieldRefToXML(const std::string& ref) const {
+ std::shared_ptr<XMLElement> fieldRefElement(new XMLElement("fieldref"));
fieldRefElement->setAttribute("var", ref);
return fieldRefElement;
}
-boost::shared_ptr<XMLElement> FormSerializer::pageToXML(boost::shared_ptr<FormPage> page) const {
- boost::shared_ptr<XMLElement> pageElement(new XMLElement("page"));
+std::shared_ptr<XMLElement> FormSerializer::pageToXML(std::shared_ptr<FormPage> page) const {
+ std::shared_ptr<XMLElement> pageElement(new XMLElement("page"));
pageElement->setAttribute("xmlns", "http://jabber.org/protocol/xdata-layout");
if (!page->getLabel().empty()) {
pageElement->setAttribute("label", page->getLabel());
@@ -109,12 +107,12 @@ boost::shared_ptr<XMLElement> FormSerializer::pageToXML(boost::shared_ptr<FormPa
foreach(const FormText::text text, page->getTextElements()) {
pageElement->addNode(textToXML(text));
}
- foreach (const boost::shared_ptr<FormField> field, page->getFields()) {
+ foreach (const std::shared_ptr<FormField> field, page->getFields()) {
pageElement->addNode(fieldRefToXML(field->getName()));
fields_.push_back(field);
}
foreach(const FormReportedRef::ref reportedRef, page->getReportedRefs()) {
- pageElement->addNode(boost::make_shared<XMLElement>("reportedref"));
+ pageElement->addNode(std::make_shared<XMLElement>("reportedref"));
}
foreach(const FormSection::section section, page->getChildSections()) {
pageElement->addNode(sectionToXML(section));
@@ -122,20 +120,20 @@ boost::shared_ptr<XMLElement> FormSerializer::pageToXML(boost::shared_ptr<FormPa
return pageElement;
}
-boost::shared_ptr<XMLElement> FormSerializer::sectionToXML(boost::shared_ptr<FormSection> section) const {
- boost::shared_ptr<XMLElement> sectionElement(new XMLElement("section"));
+std::shared_ptr<XMLElement> FormSerializer::sectionToXML(std::shared_ptr<FormSection> section) const {
+ std::shared_ptr<XMLElement> sectionElement(new XMLElement("section"));
if (!section->getLabel().empty()) {
sectionElement->setAttribute("label", section->getLabel());
}
foreach(const FormText::text text, section->getTextElements()) {
sectionElement->addNode(textToXML(text));
}
- foreach(const boost::shared_ptr<FormField> field, section->getFields()) {
+ foreach(const std::shared_ptr<FormField> field, section->getFields()) {
sectionElement->addNode(fieldRefToXML(field->getName()));
fields_.push_back(field);
}
foreach(const FormReportedRef::ref reportedRef, section->getReportedRefs()) {
- sectionElement->addNode(boost::make_shared<XMLElement>("reportedref"));
+ sectionElement->addNode(std::make_shared<XMLElement>("reportedref"));
}
foreach(const FormSection::section childSection, section->getChildSections()) {
sectionElement->addNode(sectionToXML(childSection));
@@ -143,8 +141,8 @@ boost::shared_ptr<XMLElement> FormSerializer::sectionToXML(boost::shared_ptr<For
return sectionElement;
}
-boost::shared_ptr<XMLElement> FormSerializer::fieldToXML(boost::shared_ptr<FormField> field, bool withTypeAttribute) const {
- boost::shared_ptr<XMLElement> fieldElement(new XMLElement("field"));
+std::shared_ptr<XMLElement> FormSerializer::fieldToXML(std::shared_ptr<FormField> field, bool withTypeAttribute) const {
+ std::shared_ptr<XMLElement> fieldElement(new XMLElement("field"));
if (!field->getName().empty()) {
fieldElement->setAttribute("var", field->getName());
}
@@ -152,11 +150,11 @@ boost::shared_ptr<XMLElement> FormSerializer::fieldToXML(boost::shared_ptr<FormF
fieldElement->setAttribute("label", field->getLabel());
}
if (field->getRequired()) {
- fieldElement->addNode(boost::make_shared<XMLElement>("required"));
+ fieldElement->addNode(std::make_shared<XMLElement>("required"));
}
if (!field->getDescription().empty()) {
- boost::shared_ptr<XMLElement> descriptionElement(new XMLElement("desc"));
- descriptionElement->addNode(boost::make_shared<XMLTextNode>(field->getDescription()));
+ std::shared_ptr<XMLElement> descriptionElement(new XMLElement("desc"));
+ descriptionElement->addNode(std::make_shared<XMLTextNode>(field->getDescription()));
fieldElement->addNode(descriptionElement);
}
@@ -179,18 +177,18 @@ boost::shared_ptr<XMLElement> FormSerializer::fieldToXML(boost::shared_ptr<FormF
fieldElement->setAttribute("type", fieldType);
}
foreach (const std::string& value, field->getValues()) {
- boost::shared_ptr<XMLElement> valueElement = boost::make_shared<XMLElement>("value");
- valueElement->addNode(boost::make_shared<XMLTextNode>(value));
+ std::shared_ptr<XMLElement> valueElement = std::make_shared<XMLElement>("value");
+ valueElement->addNode(std::make_shared<XMLTextNode>(value));
fieldElement->addNode(valueElement);
}
foreach (const FormField::Option& option, field->getOptions()) {
- boost::shared_ptr<XMLElement> optionElement(new XMLElement("option"));
+ std::shared_ptr<XMLElement> optionElement(new XMLElement("option"));
if (!option.label.empty()) {
optionElement->setAttribute("label", option.label);
}
- boost::shared_ptr<XMLElement> valueElement(new XMLElement("value"));
+ std::shared_ptr<XMLElement> valueElement(new XMLElement("value"));
valueElement->addNode(XMLTextNode::create(option.value));
optionElement->addNode(valueElement);
fieldElement->addNode(optionElement);
@@ -198,13 +196,13 @@ boost::shared_ptr<XMLElement> FormSerializer::fieldToXML(boost::shared_ptr<FormF
return fieldElement;
}
-void FormSerializer::multiLineify(const std::string& text, const std::string& elementName, boost::shared_ptr<XMLElement> element) const {
+void FormSerializer::multiLineify(const std::string& text, const std::string& elementName, std::shared_ptr<XMLElement> element) const {
std::string unRdText(text);
erase(unRdText, '\r');
std::vector<std::string> lines = String::split(unRdText, '\n');
foreach (std::string line, lines) {
- boost::shared_ptr<XMLElement> lineElement(new XMLElement(elementName));
- lineElement->addNode(boost::make_shared<XMLTextNode>(line));
+ std::shared_ptr<XMLElement> lineElement(new XMLElement(elementName));
+ lineElement->addNode(std::make_shared<XMLTextNode>(line));
element->addNode(lineElement);
}
}
diff --git a/Swiften/Serializer/PayloadSerializers/FormSerializer.h b/Swiften/Serializer/PayloadSerializers/FormSerializer.h
index 62f6484..590fce4 100644
--- a/Swiften/Serializer/PayloadSerializers/FormSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/FormSerializer.h
@@ -18,16 +18,16 @@ namespace Swift {
class SWIFTEN_API FormSerializer : public GenericPayloadSerializer<Form> {
public:
FormSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Form>) const;
+ virtual std::string serializePayload(std::shared_ptr<Form>) const;
private:
- boost::shared_ptr<XMLElement> textToXML(boost::shared_ptr<FormText> textElement) const;
- boost::shared_ptr<XMLElement> fieldRefToXML(const std::string& ref) const;
- boost::shared_ptr<XMLElement> reportedRefToXML(boost::shared_ptr<FormReportedRef> reportedRef) const;
- boost::shared_ptr<XMLElement> pageToXML(boost::shared_ptr<FormPage> page) const;
- boost::shared_ptr<XMLElement> sectionToXML(boost::shared_ptr<FormSection> section) const;
- boost::shared_ptr<XMLElement> fieldToXML(boost::shared_ptr<FormField> field, bool withTypeAttribute) const;
- void multiLineify(const std::string& text, const std::string& elementName, boost::shared_ptr<XMLElement> parent) const;
- mutable std::vector<boost::shared_ptr<FormField> > fields_;
+ std::shared_ptr<XMLElement> textToXML(std::shared_ptr<FormText> textElement) const;
+ std::shared_ptr<XMLElement> fieldRefToXML(const std::string& ref) const;
+ std::shared_ptr<XMLElement> reportedRefToXML(std::shared_ptr<FormReportedRef> reportedRef) const;
+ std::shared_ptr<XMLElement> pageToXML(std::shared_ptr<FormPage> page) const;
+ std::shared_ptr<XMLElement> sectionToXML(std::shared_ptr<FormSection> section) const;
+ std::shared_ptr<XMLElement> fieldToXML(std::shared_ptr<FormField> field, bool withTypeAttribute) const;
+ void multiLineify(const std::string& text, const std::string& elementName, std::shared_ptr<XMLElement> parent) const;
+ mutable std::vector<std::shared_ptr<FormField> > fields_;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.cpp
index 8df5793..58660d7 100644
--- a/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Elements/Delay.h>
#include <Swiften/Elements/IQ.h>
@@ -30,7 +31,7 @@ ForwardedSerializer::ForwardedSerializer(PayloadSerializerCollection* serializer
ForwardedSerializer::~ForwardedSerializer() {
}
-std::string ForwardedSerializer::serializePayload(boost::shared_ptr<Forwarded> payload) const {
+std::string ForwardedSerializer::serializePayload(std::shared_ptr<Forwarded> payload) const {
if (!payload) {
return "";
}
@@ -38,20 +39,20 @@ std::string ForwardedSerializer::serializePayload(boost::shared_ptr<Forwarded> p
XMLElement element("forwarded", "urn:xmpp:forward:0");
if (payload->getDelay()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(DelaySerializer().serialize(payload->getDelay())));
+ element.addNode(std::make_shared<XMLRawTextNode>(DelaySerializer().serialize(payload->getDelay())));
}
if (payload->getStanza()) { /* find out what type of stanza we are dealing with and branch into the correct serializer*/
- boost::shared_ptr<IQ> iq;
- boost::shared_ptr<Message> message;
- boost::shared_ptr<Presence> presence;
+ std::shared_ptr<IQ> iq;
+ std::shared_ptr<Message> message;
+ std::shared_ptr<Presence> presence;
const std::string ns = "jabber:client";
- if ((iq = boost::dynamic_pointer_cast<IQ>(payload->getStanza()))) {
- element.addNode(boost::make_shared<XMLRawTextNode>(safeByteArrayToString(IQSerializer(serializers_).serialize(iq, ns))));
- } else if ((message = boost::dynamic_pointer_cast<Message>(payload->getStanza()))) {
- element.addNode(boost::make_shared<XMLRawTextNode>(safeByteArrayToString(MessageSerializer(serializers_).serialize(message, ns))));
- } else if ((presence = boost::dynamic_pointer_cast<Presence>(payload->getStanza()))) {
- element.addNode(boost::make_shared<XMLRawTextNode>(safeByteArrayToString(PresenceSerializer(serializers_).serialize(presence, ns))));
+ if ((iq = std::dynamic_pointer_cast<IQ>(payload->getStanza()))) {
+ element.addNode(std::make_shared<XMLRawTextNode>(safeByteArrayToString(IQSerializer(serializers_).serialize(iq, ns))));
+ } else if ((message = std::dynamic_pointer_cast<Message>(payload->getStanza()))) {
+ element.addNode(std::make_shared<XMLRawTextNode>(safeByteArrayToString(MessageSerializer(serializers_).serialize(message, ns))));
+ } else if ((presence = std::dynamic_pointer_cast<Presence>(payload->getStanza()))) {
+ element.addNode(std::make_shared<XMLRawTextNode>(safeByteArrayToString(PresenceSerializer(serializers_).serialize(presence, ns))));
}
}
diff --git a/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h b/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h
index 08b82b9..f3eb6fb 100644
--- a/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
ForwardedSerializer(PayloadSerializerCollection* serializers);
virtual ~ForwardedSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Forwarded>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<Forwarded>) const SWIFTEN_OVERRIDE;
private:
PayloadSerializerCollection* serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp b/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp
index 53ae0d2..36d82a2 100644
--- a/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/IBBSerializer.cpp
@@ -7,10 +7,9 @@
#include <Swiften/Serializer/PayloadSerializers/IBBSerializer.h>
#include <cassert>
+#include <memory>
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -22,7 +21,7 @@ namespace Swift {
IBBSerializer::IBBSerializer() {
}
-std::string IBBSerializer::serializePayload(boost::shared_ptr<IBB> ibb) const {
+std::string IBBSerializer::serializePayload(std::shared_ptr<IBB> ibb) const {
switch(ibb->getAction()) {
case IBB::Data: {
XMLElement ibbElement("data", "http://jabber.org/protocol/ibb");
@@ -30,7 +29,7 @@ std::string IBBSerializer::serializePayload(boost::shared_ptr<IBB> ibb) const {
if (ibb->getSequenceNumber() >= 0) {
ibbElement.setAttribute("seq", boost::lexical_cast<std::string>(ibb->getSequenceNumber()));
}
- ibbElement.addNode(boost::make_shared<XMLTextNode>(Base64::encode(ibb->getData())));
+ ibbElement.addNode(std::make_shared<XMLTextNode>(Base64::encode(ibb->getData())));
return ibbElement.serialize();
}
case IBB::Open: {
diff --git a/Swiften/Serializer/PayloadSerializers/IBBSerializer.h b/Swiften/Serializer/PayloadSerializers/IBBSerializer.h
index fe45eac..0ef1680 100644
--- a/Swiften/Serializer/PayloadSerializers/IBBSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/IBBSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
IBBSerializer();
- virtual std::string serializePayload(boost::shared_ptr<IBB>) const;
+ virtual std::string serializePayload(std::shared_ptr<IBB>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/IdleSerializer.h b/Swiften/Serializer/PayloadSerializers/IdleSerializer.h
index 1a832a1..4e1a953 100644
--- a/Swiften/Serializer/PayloadSerializers/IdleSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/IdleSerializer.h
@@ -22,7 +22,7 @@ namespace Swift {
public:
IdleSerializer() : GenericPayloadSerializer<Idle>() {}
- virtual std::string serializePayload(boost::shared_ptr<Idle> idle) const {
+ virtual std::string serializePayload(std::shared_ptr<Idle> idle) const {
return "<idle xmlns='urn:xmpp:idle:1' since='" + dateTimeToString(idle->getSince()) + "'/>";
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.cpp
index 5f275f1..31b023f 100644
--- a/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -19,7 +18,7 @@ namespace Swift {
InBandRegistrationPayloadSerializer::InBandRegistrationPayloadSerializer() {
}
-std::string InBandRegistrationPayloadSerializer::serializePayload(boost::shared_ptr<InBandRegistrationPayload> registration) const {
+std::string InBandRegistrationPayloadSerializer::serializePayload(std::shared_ptr<InBandRegistrationPayload> registration) const {
XMLElement registerElement("query", "jabber:iq:register");
if (registration->isRegistered()) {
@@ -104,7 +103,7 @@ std::string InBandRegistrationPayloadSerializer::serializePayload(boost::shared_
}
if (Form::ref form = registration->getForm()) {
- registerElement.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
+ registerElement.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
}
return registerElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h
index 45eb2f5..d5f6cce 100644
--- a/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/InBandRegistrationPayloadSerializer.h
@@ -16,6 +16,6 @@ namespace Swift {
public:
InBandRegistrationPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<InBandRegistrationPayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<InBandRegistrationPayload>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.cpp
index 243ebc0..000c1bf 100644
--- a/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.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.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/XML/XMLRawTextNode.h>
@@ -21,12 +21,12 @@ IsodeIQDelegationSerializer::IsodeIQDelegationSerializer(PayloadSerializerCollec
IsodeIQDelegationSerializer::~IsodeIQDelegationSerializer() {
}
-std::string IsodeIQDelegationSerializer::serializePayload(boost::shared_ptr<IsodeIQDelegation> payload) const {
+std::string IsodeIQDelegationSerializer::serializePayload(std::shared_ptr<IsodeIQDelegation> payload) const {
if (!payload) {
return "";
}
XMLElement element("delegate", "http://isode.com/iq_delegation");
- element.addNode(boost::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(payload->getForward())->serialize(payload->getForward())));
+ element.addNode(std::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(payload->getForward())->serialize(payload->getForward())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h b/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h
index 47a9ddc..e7cfef9 100644
--- a/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/IsodeIQDelegationSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
IsodeIQDelegationSerializer(PayloadSerializerCollection* serializers);
virtual ~IsodeIQDelegationSerializer();
- virtual std::string serializePayload(boost::shared_ptr<IsodeIQDelegation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<IsodeIQDelegation>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp
index c006a93..02e0f2a 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp
@@ -12,9 +12,7 @@
#include <Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/intrusive_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/foreach.h>
@@ -30,7 +28,7 @@ namespace Swift {
JingleContentPayloadSerializer::JingleContentPayloadSerializer() {
}
-std::string JingleContentPayloadSerializer::serializePayload(boost::shared_ptr<JingleContentPayload> payload) const {
+std::string JingleContentPayloadSerializer::serializePayload(std::shared_ptr<JingleContentPayload> payload) const {
XMLElement payloadXML("content");
payloadXML.setAttribute("creator", creatorToString(payload->getCreator()));
payloadXML.setAttribute("name", payload->getName());
@@ -41,8 +39,8 @@ std::string JingleContentPayloadSerializer::serializePayload(boost::shared_ptr<J
JingleFileTransferDescription::ref filetransfer;
foreach(JingleDescription::ref desc, payload->getDescriptions()) {
- if ((filetransfer = boost::dynamic_pointer_cast<JingleFileTransferDescription>(desc))) {
- payloadXML.addNode(boost::make_shared<XMLRawTextNode>(ftSerializer.serializePayload(filetransfer)));
+ if ((filetransfer = std::dynamic_pointer_cast<JingleFileTransferDescription>(desc))) {
+ payloadXML.addNode(std::make_shared<XMLRawTextNode>(ftSerializer.serializePayload(filetransfer)));
}
}
}
@@ -57,10 +55,10 @@ std::string JingleContentPayloadSerializer::serializePayload(boost::shared_ptr<J
JingleS5BTransportPayload::ref s5b;
foreach(JingleTransportPayload::ref transport, payload->getTransports()) {
- if ((ibb = boost::dynamic_pointer_cast<JingleIBBTransportPayload>(transport))) {
- payloadXML.addNode(boost::make_shared<XMLRawTextNode>(ibbSerializer.serializePayload(ibb)));
- } else if ((s5b = boost::dynamic_pointer_cast<JingleS5BTransportPayload>(transport))) {
- payloadXML.addNode(boost::make_shared<XMLRawTextNode>(s5bSerializer.serializePayload(s5b)));
+ if ((ibb = std::dynamic_pointer_cast<JingleIBBTransportPayload>(transport))) {
+ payloadXML.addNode(std::make_shared<XMLRawTextNode>(ibbSerializer.serializePayload(ibb)));
+ } else if ((s5b = std::dynamic_pointer_cast<JingleS5BTransportPayload>(transport))) {
+ payloadXML.addNode(std::make_shared<XMLRawTextNode>(s5bSerializer.serializePayload(s5b)));
}
}
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h
index ff0185e..825a67c 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.h
@@ -24,7 +24,7 @@ namespace Swift {
public:
JingleContentPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<JingleContentPayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<JingleContentPayload>) const;
private:
std::string creatorToString(JingleContentPayload::Creator creator) const;
diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.cpp
index b0bb78d..b002482 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.cpp
@@ -12,9 +12,9 @@
#include <Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/DateTime.h>
#include <Swiften/Base/foreach.h>
@@ -29,11 +29,11 @@ namespace Swift {
JingleFileTransferDescriptionSerializer::JingleFileTransferDescriptionSerializer() {
}
-std::string JingleFileTransferDescriptionSerializer::serializePayload(boost::shared_ptr<JingleFileTransferDescription> payload) const {
+std::string JingleFileTransferDescriptionSerializer::serializePayload(std::shared_ptr<JingleFileTransferDescription> payload) const {
XMLElement description("description", "urn:xmpp:jingle:apps:file-transfer:4");
JingleFileTransferFileInfoSerializer fileInfoSerializer;
- boost::shared_ptr<XMLRawTextNode> fileInfoXML = boost::make_shared<XMLRawTextNode>(fileInfoSerializer.serialize(boost::make_shared<JingleFileTransferFileInfo>(payload->getFileInfo())));
+ std::shared_ptr<XMLRawTextNode> fileInfoXML = std::make_shared<XMLRawTextNode>(fileInfoSerializer.serialize(std::make_shared<JingleFileTransferFileInfo>(payload->getFileInfo())));
description.addNode(fileInfoXML);
return description.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h
index 53199f6..65e757b 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferDescriptionSerializer.h
@@ -25,6 +25,6 @@ namespace Swift {
public:
JingleFileTransferDescriptionSerializer();
- virtual std::string serializePayload(boost::shared_ptr<JingleFileTransferDescription>) const;
+ virtual std::string serializePayload(std::shared_ptr<JingleFileTransferDescription>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.cpp
index 7fcf452..d78d7df 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.cpp
@@ -6,9 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/DateTime.h>
#include <Swiften/Base/foreach.h>
@@ -22,28 +22,28 @@ namespace Swift {
JingleFileTransferFileInfoSerializer::JingleFileTransferFileInfoSerializer() {
}
-std::string JingleFileTransferFileInfoSerializer::serializePayload(boost::shared_ptr<JingleFileTransferFileInfo> fileInfo) const {
+std::string JingleFileTransferFileInfoSerializer::serializePayload(std::shared_ptr<JingleFileTransferFileInfo> fileInfo) const {
XMLElement fileElement("file", "");
if (fileInfo->getDate() != stringToDateTime("")) {
- fileElement.addNode(boost::make_shared<XMLElement>("date", "", dateTimeToString(fileInfo->getDate())));
+ fileElement.addNode(std::make_shared<XMLElement>("date", "", dateTimeToString(fileInfo->getDate())));
}
if (!fileInfo->getDescription().empty()) {
- fileElement.addNode(boost::make_shared<XMLElement>("desc", "", fileInfo->getDescription()));
+ fileElement.addNode(std::make_shared<XMLElement>("desc", "", fileInfo->getDescription()));
}
if (!fileInfo->getMediaType().empty()) {
- fileElement.addNode(boost::make_shared<XMLElement>("media-type", "", fileInfo->getMediaType()));
+ fileElement.addNode(std::make_shared<XMLElement>("media-type", "", fileInfo->getMediaType()));
}
if (!fileInfo->getName().empty()) {
- fileElement.addNode(boost::make_shared<XMLElement>("name", "", fileInfo->getName()));
+ fileElement.addNode(std::make_shared<XMLElement>("name", "", fileInfo->getName()));
}
if (fileInfo->getSupportsRangeRequests()) {
- boost::shared_ptr<XMLElement> range = boost::make_shared<XMLElement>("range");
+ std::shared_ptr<XMLElement> range = std::make_shared<XMLElement>("range");
if (fileInfo->getRangeOffset() != 0) {
range->setAttribute("offset", boost::lexical_cast<std::string>(fileInfo->getRangeOffset()));
}
@@ -51,11 +51,11 @@ std::string JingleFileTransferFileInfoSerializer::serializePayload(boost::shared
}
if (fileInfo->getSize() > 0) {
- fileElement.addNode(boost::make_shared<XMLElement>("size", "", boost::lexical_cast<std::string>(fileInfo->getSize())));
+ fileElement.addNode(std::make_shared<XMLElement>("size", "", boost::lexical_cast<std::string>(fileInfo->getSize())));
}
foreach (JingleFileTransferFileInfo::HashElementMap::value_type hashElement, fileInfo->getHashes()) {
- boost::shared_ptr<XMLElement> hash = boost::make_shared<XMLElement>("hash", "urn:xmpp:hashes:1", Base64::encode(hashElement.second));
+ std::shared_ptr<XMLElement> hash = std::make_shared<XMLElement>("hash", "urn:xmpp:hashes:1", Base64::encode(hashElement.second));
hash->setAttribute("algo", hashElement.first);
fileElement.addNode(hash);
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h
index bd4d8cd..6b80235 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h
@@ -18,6 +18,6 @@ namespace Swift {
public:
JingleFileTransferFileInfoSerializer();
- virtual std::string serializePayload(boost::shared_ptr<JingleFileTransferFileInfo>) const;
+ virtual std::string serializePayload(std::shared_ptr<JingleFileTransferFileInfo>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.cpp
index 4db5f0c..1f6ead7 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.cpp
@@ -13,11 +13,9 @@
#include <Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.h>
#include <map>
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/JingleFileTransferFileInfoSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -29,7 +27,7 @@ namespace Swift {
JingleFileTransferHashSerializer::JingleFileTransferHashSerializer() {
}
-std::string JingleFileTransferHashSerializer::serializePayload(boost::shared_ptr<JingleFileTransferHash> payload) const {
+std::string JingleFileTransferHashSerializer::serializePayload(std::shared_ptr<JingleFileTransferHash> payload) const {
// code for version urn:xmpp:jingle:apps:file-transfer:2
//XMLElement hash("hash", "urn:xmpp:jingle:apps:file-transfer:info:2", payload->getHash());
@@ -38,7 +36,7 @@ std::string JingleFileTransferHashSerializer::serializePayload(boost::shared_ptr
JingleFileTransferFileInfoSerializer fileSerializer;
- boost::shared_ptr<XMLRawTextNode> file = boost::make_shared<XMLRawTextNode>(fileSerializer.serialize(boost::make_shared<JingleFileTransferFileInfo>(payload->getFileInfo())));
+ std::shared_ptr<XMLRawTextNode> file = std::make_shared<XMLRawTextNode>(fileSerializer.serialize(std::make_shared<JingleFileTransferFileInfo>(payload->getFileInfo())));
checksum.addNode(file);
diff --git a/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.h
index 5434c17..bb6eabc 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JingleFileTransferHashSerializer.h
@@ -25,6 +25,6 @@ namespace Swift {
public:
JingleFileTransferHashSerializer();
- virtual std::string serializePayload(boost::shared_ptr<JingleFileTransferHash>) const;
+ virtual std::string serializePayload(std::shared_ptr<JingleFileTransferHash>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.cpp
index 0574ea7..52e6c16 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.cpp
@@ -12,9 +12,9 @@
#include <Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -26,7 +26,7 @@ namespace Swift {
JingleIBBTransportPayloadSerializer::JingleIBBTransportPayloadSerializer() {
}
-std::string JingleIBBTransportPayloadSerializer::serializePayload(boost::shared_ptr<JingleIBBTransportPayload> payload) const {
+std::string JingleIBBTransportPayloadSerializer::serializePayload(std::shared_ptr<JingleIBBTransportPayload> payload) const {
XMLElement payloadXML("transport", "urn:xmpp:jingle:transports:ibb:1");
if (payload->getBlockSize()) {
payloadXML.setAttribute("block-size", boost::lexical_cast<std::string>(*payload->getBlockSize()));
diff --git a/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h
index 1b77666..e94fb52 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h
@@ -25,6 +25,6 @@ namespace Swift {
public:
JingleIBBTransportPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<JingleIBBTransportPayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<JingleIBBTransportPayload>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp
index a5bd60a..8b37929 100644
--- a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.cpp
@@ -12,9 +12,7 @@
#include <Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/intrusive_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/foreach.h>
@@ -35,27 +33,27 @@ namespace Swift {
JinglePayloadSerializer::JinglePayloadSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) {
}
-std::string JinglePayloadSerializer::serializePayload(boost::shared_ptr<JinglePayload> payload) const {
+std::string JinglePayloadSerializer::serializePayload(std::shared_ptr<JinglePayload> payload) const {
XMLElement jinglePayload("jingle", "urn:xmpp:jingle:1");
jinglePayload.setAttribute("action", actionToString(payload->getAction()));
jinglePayload.setAttribute("initiator", payload->getInitiator());
jinglePayload.setAttribute("sid", payload->getSessionID());
- std::vector<boost::shared_ptr<Payload> > payloads = payload->getPayloads();
+ std::vector<std::shared_ptr<Payload> > payloads = payload->getPayloads();
if (!payloads.empty()) {
- foreach(boost::shared_ptr<Payload> subPayload, payloads) {
+ foreach(std::shared_ptr<Payload> subPayload, payloads) {
PayloadSerializer* serializer = serializers->getPayloadSerializer(subPayload);
if (serializer) {
- jinglePayload.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(subPayload)));
+ jinglePayload.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(subPayload)));
}
}
}
if (payload->getReason().is_initialized()) {
- boost::shared_ptr<XMLElement> reason = boost::make_shared<XMLElement>("reason");
- reason->addNode(boost::make_shared<XMLElement>(reasonTypeToString(payload->getReason()->type)));
+ std::shared_ptr<XMLElement> reason = std::make_shared<XMLElement>("reason");
+ reason->addNode(std::make_shared<XMLElement>(reasonTypeToString(payload->getReason()->type)));
if (!payload->getReason()->text.empty()) {
- reason->addNode(boost::make_shared<XMLElement>("desc", "", payload->getReason()->text));
+ reason->addNode(std::make_shared<XMLElement>("desc", "", payload->getReason()->text));
}
jinglePayload.addNode(reason);
}
diff --git a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h
index 9b36626..a846ebe 100644
--- a/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JinglePayloadSerializer.h
@@ -25,7 +25,7 @@ namespace Swift {
public:
JinglePayloadSerializer(PayloadSerializerCollection*);
- virtual std::string serializePayload(boost::shared_ptr<JinglePayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<JinglePayload>) const;
private:
std::string actionToString(JinglePayload::Action action) const;
diff --git a/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.cpp
index 66e6515..61447cd 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.cpp
@@ -12,9 +12,9 @@
#include <Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/foreach.h>
@@ -27,7 +27,7 @@ namespace Swift {
JingleS5BTransportPayloadSerializer::JingleS5BTransportPayloadSerializer() {
}
-std::string JingleS5BTransportPayloadSerializer::serializePayload(boost::shared_ptr<JingleS5BTransportPayload> payload) const {
+std::string JingleS5BTransportPayloadSerializer::serializePayload(std::shared_ptr<JingleS5BTransportPayload> payload) const {
XMLElement payloadXML("transport", "urn:xmpp:jingle:transports:s5b:1");
payloadXML.setAttribute("sid", payload->getSessionID());
payloadXML.setAttribute("mode", modeToString(payload->getMode()));
@@ -36,7 +36,7 @@ std::string JingleS5BTransportPayloadSerializer::serializePayload(boost::shared_
}
foreach(JingleS5BTransportPayload::Candidate candidate, payload->getCandidates()) {
- boost::shared_ptr<XMLElement> candidateXML = boost::make_shared<XMLElement>("candidate");
+ std::shared_ptr<XMLElement> candidateXML = std::make_shared<XMLElement>("candidate");
candidateXML->setAttribute("cid", candidate.cid);
candidateXML->setAttribute("host", candidate.hostPort.getAddress().toString());
candidateXML->setAttribute("jid", candidate.jid.toString());
@@ -47,19 +47,19 @@ std::string JingleS5BTransportPayloadSerializer::serializePayload(boost::shared_
}
if (payload->hasCandidateError()) {
- payloadXML.addNode(boost::make_shared<XMLElement>("candidate-error"));
+ payloadXML.addNode(std::make_shared<XMLElement>("candidate-error"));
}
if (payload->hasProxyError()) {
- payloadXML.addNode(boost::make_shared<XMLElement>("proxy-error"));
+ payloadXML.addNode(std::make_shared<XMLElement>("proxy-error"));
}
if (!payload->getActivated().empty()) {
- boost::shared_ptr<XMLElement> activatedXML = boost::make_shared<XMLElement>("activated");
+ std::shared_ptr<XMLElement> activatedXML = std::make_shared<XMLElement>("activated");
activatedXML->setAttribute("cid", payload->getActivated());
payloadXML.addNode(activatedXML);
}
if (!payload->getCandidateUsed().empty()) {
- boost::shared_ptr<XMLElement> candusedXML = boost::make_shared<XMLElement>("candidate-used");
+ std::shared_ptr<XMLElement> candusedXML = std::make_shared<XMLElement>("candidate-used");
candusedXML->setAttribute("cid", payload->getCandidateUsed());
payloadXML.addNode(candusedXML);
}
diff --git a/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h
index 684423e..cca2f4e 100644
--- a/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h
@@ -25,7 +25,7 @@ namespace Swift {
public:
JingleS5BTransportPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<JingleS5BTransportPayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<JingleS5BTransportPayload>) const;
private:
std::string modeToString(JingleS5BTransportPayload::Mode) const;
diff --git a/Swiften/Serializer/PayloadSerializers/LastSerializer.h b/Swiften/Serializer/PayloadSerializers/LastSerializer.h
index 6c831eb..1710bc0 100644
--- a/Swiften/Serializer/PayloadSerializers/LastSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/LastSerializer.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
LastSerializer() : GenericPayloadSerializer<Last>() {}
- virtual std::string serializePayload(boost::shared_ptr<Last> last) const {
+ virtual std::string serializePayload(std::shared_ptr<Last> last) const {
return "<query xmlns='jabber:iq:last' seconds='" + boost::lexical_cast<std::string>(last->getSeconds()) + "'/>";
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.cpp
index d15038c..6f40277 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h>
@@ -22,7 +23,7 @@ MAMFinSerializer::MAMFinSerializer() {
MAMFinSerializer::~MAMFinSerializer() {
}
-std::string MAMFinSerializer::serializePayload(boost::shared_ptr<MAMFin> payload) const {
+std::string MAMFinSerializer::serializePayload(std::shared_ptr<MAMFin> payload) const {
if (!payload) {
return "";
}
@@ -42,7 +43,7 @@ std::string MAMFinSerializer::serializePayload(boost::shared_ptr<MAMFin> payload
}
if (payload->getResultSet()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(ResultSetSerializer().serialize(payload->getResultSet())));
+ element.addNode(std::make_shared<XMLRawTextNode>(ResultSetSerializer().serialize(payload->getResultSet())));
}
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h b/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h
index 2be6981..7e2a7c7 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMFinSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,6 +21,6 @@ namespace Swift {
MAMFinSerializer();
virtual ~MAMFinSerializer();
- virtual std::string serializePayload(boost::shared_ptr<MAMFin>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MAMFin>) const SWIFTEN_OVERRIDE;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
index d503d0b..0b61c04 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -24,7 +25,7 @@ MAMQuerySerializer::MAMQuerySerializer() {
MAMQuerySerializer::~MAMQuerySerializer() {
}
-std::string MAMQuerySerializer::serializePayload(boost::shared_ptr<MAMQuery> payload) const {
+std::string MAMQuerySerializer::serializePayload(std::shared_ptr<MAMQuery> payload) const {
if (!payload) {
return "";
}
@@ -40,11 +41,11 @@ std::string MAMQuerySerializer::serializePayload(boost::shared_ptr<MAMQuery> pay
}
if (payload->getForm()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getForm())));
+ element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getForm())));
}
if (payload->getResultSet()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(ResultSetSerializer().serialize(payload->getResultSet())));
+ element.addNode(std::make_shared<XMLRawTextNode>(ResultSetSerializer().serialize(payload->getResultSet())));
}
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
index 8b5e270..6af979b 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMQuerySerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,6 +21,6 @@ namespace Swift {
MAMQuerySerializer();
virtual ~MAMQuerySerializer();
- virtual std::string serializePayload(boost::shared_ptr<MAMQuery>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MAMQuery>) const SWIFTEN_OVERRIDE;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp
index 4bf25c6..7ef2102 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/ForwardedSerializer.h>
@@ -22,7 +23,7 @@ MAMResultSerializer::MAMResultSerializer(PayloadSerializerCollection* serializer
MAMResultSerializer::~MAMResultSerializer() {
}
-std::string MAMResultSerializer::serializePayload(boost::shared_ptr<MAMResult> payload) const {
+std::string MAMResultSerializer::serializePayload(std::shared_ptr<MAMResult> payload) const {
if (!payload) {
return "";
}
@@ -35,7 +36,7 @@ std::string MAMResultSerializer::serializePayload(boost::shared_ptr<MAMResult> p
element.setAttribute("queryid", *payload->getQueryID());
}
- element.addNode(boost::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(payload->getPayload())));
+ element.addNode(std::make_shared<XMLRawTextNode>(ForwardedSerializer(serializers_).serialize(payload->getPayload())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h
index 4d8168c..f4fc054 100644
--- a/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MAMResultSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
MAMResultSerializer(PayloadSerializerCollection* serializers);
virtual ~MAMResultSerializer();
- virtual std::string serializePayload(boost::shared_ptr<MAMResult>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<MAMResult>) const SWIFTEN_OVERRIDE;
private:
PayloadSerializerCollection* serializers_;
diff --git a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp
index 5bd4b01..385c181 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.cpp
@@ -6,11 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h>
+#include <memory>
#include <sstream>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -21,7 +19,7 @@ namespace Swift {
MUCAdminPayloadSerializer::MUCAdminPayloadSerializer() : GenericPayloadSerializer<MUCAdminPayload>() {
}
-std::string MUCAdminPayloadSerializer::serializePayload(boost::shared_ptr<MUCAdminPayload> payload) const {
+std::string MUCAdminPayloadSerializer::serializePayload(std::shared_ptr<MUCAdminPayload> payload) const {
XMLElement mucElement("query", "http://jabber.org/protocol/muc#admin");
foreach (const MUCItem& item, payload->getItems()) {
mucElement.addNode(MUCItemSerializer::itemToElement(item));
diff --git a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h
index b1e1ed1..c077d2e 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCAdminPayloadSerializer.h
@@ -17,7 +17,7 @@ namespace Swift {
std::string affiliationToString(MUCOccupant::Affiliation affiliation) const;
std::string roleToString(MUCOccupant::Role role) const;
- virtual std::string serializePayload(boost::shared_ptr<MUCAdminPayload> version) const;
+ virtual std::string serializePayload(std::shared_ptr<MUCAdminPayload> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.cpp
index 86d684e..3d807be 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.cpp
@@ -1,13 +1,12 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -18,11 +17,11 @@ namespace Swift {
MUCDestroyPayloadSerializer::MUCDestroyPayloadSerializer() : GenericPayloadSerializer<MUCDestroyPayload>() {
}
-std::string MUCDestroyPayloadSerializer::serializePayload(boost::shared_ptr<MUCDestroyPayload> payload) const {
+std::string MUCDestroyPayloadSerializer::serializePayload(std::shared_ptr<MUCDestroyPayload> payload) const {
XMLElement mucElement("destroy", "");
if (!payload->getReason().empty()) {
- XMLElement::ref reason = boost::make_shared<XMLElement>("reason", "");
- reason->addNode(boost::make_shared<XMLTextNode>(payload->getReason()));
+ XMLElement::ref reason = std::make_shared<XMLElement>("reason", "");
+ reason->addNode(std::make_shared<XMLTextNode>(payload->getReason()));
mucElement.addNode(reason);
}
if (payload->getNewVenue().isValid()) {
diff --git a/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h
index c6175fb..2ce8ccc 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCDestroyPayloadSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
class SWIFTEN_API MUCDestroyPayloadSerializer : public GenericPayloadSerializer<MUCDestroyPayload> {
public:
MUCDestroyPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<MUCDestroyPayload> version) const;
+ virtual std::string serializePayload(std::shared_ptr<MUCDestroyPayload> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.cpp
index 4695f63..4b978af 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h>
@@ -19,7 +18,7 @@ namespace Swift {
MUCInvitationPayloadSerializer::MUCInvitationPayloadSerializer() : GenericPayloadSerializer<MUCInvitationPayload>() {
}
-std::string MUCInvitationPayloadSerializer::serializePayload(boost::shared_ptr<MUCInvitationPayload> payload) const {
+std::string MUCInvitationPayloadSerializer::serializePayload(std::shared_ptr<MUCInvitationPayload> payload) const {
XMLElement mucElement("x", "jabber:x:conference");
if (payload->getIsContinuation()) {
mucElement.setAttribute("continue", "true");
@@ -37,7 +36,7 @@ std::string MUCInvitationPayloadSerializer::serializePayload(boost::shared_ptr<M
mucElement.setAttribute("thread", payload->getThread());
}
if (payload->getIsImpromptu()) {
- mucElement.addNode(boost::make_shared<XMLElement>("impromptu", "http://swift.im/impromptu"));
+ mucElement.addNode(std::make_shared<XMLElement>("impromptu", "http://swift.im/impromptu"));
}
return mucElement.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h
index a2d27b0..be21177 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCInvitationPayloadSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
MUCInvitationPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<MUCInvitationPayload> version) const;
+ virtual std::string serializePayload(std::shared_ptr<MUCInvitationPayload> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h
index 016caf4..22f7859 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Elements/MUCItem.h>
#include <Swiften/Serializer/GenericPayloadSerializer.h>
@@ -40,8 +40,8 @@ namespace Swift {
}
- static boost::shared_ptr<XMLElement> itemToElement(const MUCItem& item) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ static std::shared_ptr<XMLElement> itemToElement(const MUCItem& item) {
+ std::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
if (item.affiliation) {
itemElement->setAttribute("affiliation", affiliationToString(item.affiliation.get()));
}
@@ -55,13 +55,13 @@ namespace Swift {
itemElement->setAttribute("nick", item.nick.get());
}
if (item.actor) {
- boost::shared_ptr<XMLElement> actorElement(new XMLElement("actor"));
+ std::shared_ptr<XMLElement> actorElement(new XMLElement("actor"));
actorElement->setAttribute("jid", item.actor->toString());
itemElement->addNode(actorElement);
}
if (item.reason) {
- boost::shared_ptr<XMLElement> reasonElement(new XMLElement("reason"));
- reasonElement->addNode(boost::make_shared<XMLTextNode>(*item.reason));
+ std::shared_ptr<XMLElement> reasonElement(new XMLElement("reason"));
+ reasonElement->addNode(std::make_shared<XMLTextNode>(*item.reason));
itemElement->addNode(reasonElement);
}
return itemElement;
diff --git a/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.cpp
index 348f9f5..f385e91 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -17,13 +17,13 @@ namespace Swift {
MUCOwnerPayloadSerializer::MUCOwnerPayloadSerializer(PayloadSerializerCollection* serializers) : GenericPayloadSerializer<MUCOwnerPayload>(), serializers(serializers) {
}
-std::string MUCOwnerPayloadSerializer::serializePayload(boost::shared_ptr<MUCOwnerPayload> mucOwner) const {
+std::string MUCOwnerPayloadSerializer::serializePayload(std::shared_ptr<MUCOwnerPayload> mucOwner) const {
XMLElement mucElement("query", "http://jabber.org/protocol/muc#owner");
- boost::shared_ptr<Payload> payload = mucOwner->getPayload();
+ std::shared_ptr<Payload> payload = mucOwner->getPayload();
if (payload) {
PayloadSerializer* serializer = serializers->getPayloadSerializer(payload);
if (serializer) {
- mucElement.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(payload)));
+ mucElement.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(payload)));
}
}
return mucElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.h
index bbe919a..8e2e856 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCOwnerPayloadSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
class SWIFTEN_API MUCOwnerPayloadSerializer : public GenericPayloadSerializer<MUCOwnerPayload> {
public:
MUCOwnerPayloadSerializer(PayloadSerializerCollection* serializers);
- virtual std::string serializePayload(boost::shared_ptr<MUCOwnerPayload> version) const;
+ virtual std::string serializePayload(std::shared_ptr<MUCOwnerPayload> version) const;
private:
PayloadSerializerCollection* serializers;
};
diff --git a/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp
index 9af2f15..4f0f637 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.cpp
@@ -6,9 +6,10 @@
#include <Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.h>
+#include <memory>
+
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/String.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -19,9 +20,9 @@ namespace Swift {
MUCPayloadSerializer::MUCPayloadSerializer() : GenericPayloadSerializer<MUCPayload>() {
}
-std::string MUCPayloadSerializer::serializePayload(boost::shared_ptr<MUCPayload> muc) const {
+std::string MUCPayloadSerializer::serializePayload(std::shared_ptr<MUCPayload> muc) const {
XMLElement mucElement("x", "http://jabber.org/protocol/muc");
- boost::shared_ptr<XMLElement> historyElement(new XMLElement("history"));
+ std::shared_ptr<XMLElement> historyElement(new XMLElement("history"));
bool history = false;
if (muc->getMaxChars() >= 0) {
historyElement->setAttribute("maxchars", boost::lexical_cast<std::string>(muc->getMaxChars()));
@@ -44,8 +45,8 @@ std::string MUCPayloadSerializer::serializePayload(boost::shared_ptr<MUCPayload>
}
if (muc->getPassword()) {
std::string password = *muc->getPassword();
- boost::shared_ptr<XMLElement> passwordElement(new XMLElement("password"));
- passwordElement->addNode(boost::make_shared<XMLTextNode>(password));
+ std::shared_ptr<XMLElement> passwordElement(new XMLElement("password"));
+ passwordElement->addNode(std::make_shared<XMLTextNode>(password));
mucElement.addNode(passwordElement);
}
if (history) {
diff --git a/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.h
index fa3a11c..6b0247d 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCPayloadSerializer.h
@@ -14,7 +14,7 @@ namespace Swift {
class SWIFTEN_API MUCPayloadSerializer : public GenericPayloadSerializer<MUCPayload> {
public:
MUCPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<MUCPayload> version) const;
+ virtual std::string serializePayload(std::shared_ptr<MUCPayload> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp
index d0c3b2b..52ab489 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.cpp
@@ -6,11 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.h>
+#include <memory>
#include <sstream>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/MUCItemSerializer.h>
@@ -23,10 +21,10 @@ namespace Swift {
MUCUserPayloadSerializer::MUCUserPayloadSerializer(PayloadSerializerCollection* serializers) : GenericPayloadSerializer<MUCUserPayload>(), serializers(serializers) {
}
-std::string MUCUserPayloadSerializer::serializePayload(boost::shared_ptr<MUCUserPayload> payload) const {
+std::string MUCUserPayloadSerializer::serializePayload(std::shared_ptr<MUCUserPayload> payload) const {
XMLElement mucElement("x", "http://jabber.org/protocol/muc#user");
foreach (const MUCUserPayload::StatusCode statusCode, payload->getStatusCodes()) {
- boost::shared_ptr<XMLElement> statusElement(new XMLElement("status"));
+ std::shared_ptr<XMLElement> statusElement(new XMLElement("status"));
std::ostringstream code;
code << statusCode.code;
statusElement->setAttribute("code", code.str());
@@ -37,13 +35,13 @@ std::string MUCUserPayloadSerializer::serializePayload(boost::shared_ptr<MUCUser
}
if (payload->getPassword()) {
- boost::shared_ptr<XMLElement> passwordElement = boost::make_shared<XMLElement>("password");
- passwordElement->addNode(boost::make_shared<XMLTextNode>(*payload->getPassword()));
+ std::shared_ptr<XMLElement> passwordElement = std::make_shared<XMLElement>("password");
+ passwordElement->addNode(std::make_shared<XMLTextNode>(*payload->getPassword()));
}
if (payload->getInvite()) {
MUCUserPayload::Invite invite = *payload->getInvite();
- boost::shared_ptr<XMLElement> inviteElement = boost::make_shared<XMLElement>("invite");
+ std::shared_ptr<XMLElement> inviteElement = std::make_shared<XMLElement>("invite");
if (invite.to.isValid()) {
inviteElement->setAttribute("to", invite.to.toString());
}
@@ -51,17 +49,17 @@ std::string MUCUserPayloadSerializer::serializePayload(boost::shared_ptr<MUCUser
inviteElement->setAttribute("from", invite.from.toString());
}
if (!invite.reason.empty()) {
- boost::shared_ptr<XMLElement> reasonElement = boost::make_shared<XMLElement>("reason");
- reasonElement->addNode(boost::make_shared<XMLTextNode>(invite.reason));
+ std::shared_ptr<XMLElement> reasonElement = std::make_shared<XMLElement>("reason");
+ reasonElement->addNode(std::make_shared<XMLTextNode>(invite.reason));
}
mucElement.addNode(inviteElement);
}
- boost::shared_ptr<Payload> childPayload = payload->getPayload();
+ std::shared_ptr<Payload> childPayload = payload->getPayload();
if (childPayload) {
PayloadSerializer* serializer = serializers->getPayloadSerializer(childPayload);
if (serializer) {
- mucElement.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(childPayload)));
+ mucElement.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(childPayload)));
}
}
return mucElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.h
index 91b2ae6..ea4b74b 100644
--- a/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/MUCUserPayloadSerializer.h
@@ -16,7 +16,7 @@ namespace Swift {
public:
MUCUserPayloadSerializer(PayloadSerializerCollection* serializers);
- virtual std::string serializePayload(boost::shared_ptr<MUCUserPayload> version) const;
+ virtual std::string serializePayload(std::shared_ptr<MUCUserPayload> version) const;
private:
PayloadSerializerCollection* serializers;
};
diff --git a/Swiften/Serializer/PayloadSerializers/NicknameSerializer.cpp b/Swiften/Serializer/PayloadSerializers/NicknameSerializer.cpp
index 3b927f4..7bd8931 100644
--- a/Swiften/Serializer/PayloadSerializers/NicknameSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/NicknameSerializer.cpp
@@ -1,13 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/NicknameSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <Swiften/Serializer/XML/XMLTextNode.h>
@@ -17,9 +16,9 @@ namespace Swift {
NicknameSerializer::NicknameSerializer() : GenericPayloadSerializer<Nickname>() {
}
-std::string NicknameSerializer::serializePayload(boost::shared_ptr<Nickname> nick) const {
+std::string NicknameSerializer::serializePayload(std::shared_ptr<Nickname> nick) const {
XMLElement nickElement("nick", "http://jabber.org/protocol/nick");
- nickElement.addNode(boost::make_shared<XMLTextNode>(nick->getNickname()));
+ nickElement.addNode(std::make_shared<XMLTextNode>(nick->getNickname()));
return nickElement.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/NicknameSerializer.h b/Swiften/Serializer/PayloadSerializers/NicknameSerializer.h
index d1b6e81..efea9c2 100644
--- a/Swiften/Serializer/PayloadSerializers/NicknameSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/NicknameSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
NicknameSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Nickname>) const;
+ virtual std::string serializePayload(std::shared_ptr<Nickname>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PrioritySerializer.h b/Swiften/Serializer/PayloadSerializers/PrioritySerializer.h
index d7f0957..687d07f 100644
--- a/Swiften/Serializer/PayloadSerializers/PrioritySerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PrioritySerializer.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
PrioritySerializer() : GenericPayloadSerializer<Priority>() {}
- virtual std::string serializePayload(boost::shared_ptr<Priority> priority) const {
+ virtual std::string serializePayload(std::shared_ptr<Priority> priority) const {
return "<priority>" + boost::lexical_cast<std::string>(priority->getPriority()) + "</priority>";
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.cpp
index 2d03e1b..87a2eeb 100644
--- a/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
@@ -20,13 +19,13 @@ namespace Swift {
PrivateStorageSerializer::PrivateStorageSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) {
}
-std::string PrivateStorageSerializer::serializePayload(boost::shared_ptr<PrivateStorage> storage) const {
+std::string PrivateStorageSerializer::serializePayload(std::shared_ptr<PrivateStorage> storage) const {
XMLElement storageElement("query", "jabber:iq:private");
- boost::shared_ptr<Payload> payload = storage->getPayload();
+ std::shared_ptr<Payload> payload = storage->getPayload();
if (payload) {
PayloadSerializer* serializer = serializers->getPayloadSerializer(payload);
if (serializer) {
- storageElement.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(payload)));
+ storageElement.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(payload)));
}
}
return storageElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.h b/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.h
index a014e52..f2f9d90 100644
--- a/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PrivateStorageSerializer.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
PrivateStorageSerializer(PayloadSerializerCollection* serializers);
- virtual std::string serializePayload(boost::shared_ptr<PrivateStorage>) const;
+ virtual std::string serializePayload(std::shared_ptr<PrivateStorage>) const;
private:
PayloadSerializerCollection* serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.cpp
index 8e58ff5..4814c59 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubAffiliationSerializer::PubSubAffiliationSerializer(PayloadSerializerCollec
PubSubAffiliationSerializer::~PubSubAffiliationSerializer() {
}
-std::string PubSubAffiliationSerializer::serializePayload(boost::shared_ptr<PubSubAffiliation> payload) const {
+std::string PubSubAffiliationSerializer::serializePayload(std::shared_ptr<PubSubAffiliation> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h
index d451745..622db09 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubAffiliationSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubAffiliationSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubAffiliation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubAffiliation>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeType(PubSubAffiliation::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp
index eba96aa..9673710 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -23,7 +23,7 @@ PubSubAffiliationsSerializer::PubSubAffiliationsSerializer(PayloadSerializerColl
PubSubAffiliationsSerializer::~PubSubAffiliationsSerializer() {
}
-std::string PubSubAffiliationsSerializer::serializePayload(boost::shared_ptr<PubSubAffiliations> payload) const {
+std::string PubSubAffiliationsSerializer::serializePayload(std::shared_ptr<PubSubAffiliations> payload) const {
if (!payload) {
return "";
}
@@ -31,8 +31,8 @@ std::string PubSubAffiliationsSerializer::serializePayload(boost::shared_ptr<Pub
if (payload->getNode()) {
element.setAttribute("node", *payload->getNode());
}
- foreach(boost::shared_ptr<PubSubAffiliation> item, payload->getAffiliations()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubAffiliationSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubAffiliation> item, payload->getAffiliations()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubAffiliationSerializer(serializers).serialize(item)));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h
index 211d957..c51d70e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubAffiliationsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubAffiliationsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubAffiliationsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubAffiliations>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubAffiliations>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.cpp
index 1853c1c..6ae4711 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -22,12 +22,12 @@ PubSubConfigureSerializer::PubSubConfigureSerializer(PayloadSerializerCollection
PubSubConfigureSerializer::~PubSubConfigureSerializer() {
}
-std::string PubSubConfigureSerializer::serializePayload(boost::shared_ptr<PubSubConfigure> payload) const {
+std::string PubSubConfigureSerializer::serializePayload(std::shared_ptr<PubSubConfigure> payload) const {
if (!payload) {
return "";
}
XMLElement element("configure", "http://jabber.org/protocol/pubsub");
- element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
+ element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h
index 3d800d8..fa0aecf 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubConfigureSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubConfigureSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubConfigure>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubConfigure>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.cpp
index 8b38fc1..e5c0e67 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubCreateSerializer::PubSubCreateSerializer(PayloadSerializerCollection* seri
PubSubCreateSerializer::~PubSubCreateSerializer() {
}
-std::string PubSubCreateSerializer::serializePayload(boost::shared_ptr<PubSubCreate> payload) const {
+std::string PubSubCreateSerializer::serializePayload(std::shared_ptr<PubSubCreate> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h
index 67b19bf..92965f2 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubCreateSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubCreateSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubCreateSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubCreate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubCreate>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp
index aba1cae..3681dd0 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubDefaultSerializer::PubSubDefaultSerializer(PayloadSerializerCollection* se
PubSubDefaultSerializer::~PubSubDefaultSerializer() {
}
-std::string PubSubDefaultSerializer::serializePayload(boost::shared_ptr<PubSubDefault> payload) const {
+std::string PubSubDefaultSerializer::serializePayload(std::shared_ptr<PubSubDefault> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h
index 5dc774f..1ec20c7 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubDefaultSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubDefaultSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubDefaultSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubDefault>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubDefault>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeType(PubSubDefault::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.cpp
index d14db49..5f85fd5 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.cpp
@@ -17,7 +17,7 @@ PubSubErrorSerializer::PubSubErrorSerializer() {
PubSubErrorSerializer::~PubSubErrorSerializer() {
}
-std::string PubSubErrorSerializer::serializePayload(boost::shared_ptr<PubSubError> payload) const {
+std::string PubSubErrorSerializer::serializePayload(std::shared_ptr<PubSubError> payload) const {
if (payload->getType() == PubSubError::UnknownType) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h
index b6750e9..6b0882e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubErrorSerializer.h
@@ -19,7 +19,7 @@ namespace Swift {
PubSubErrorSerializer();
virtual ~PubSubErrorSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubError>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubError>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeType(PubSubError::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.cpp
index c855977..25d57fe 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubEventAssociateSerializer::PubSubEventAssociateSerializer(PayloadSerializer
PubSubEventAssociateSerializer::~PubSubEventAssociateSerializer() {
}
-std::string PubSubEventAssociateSerializer::serializePayload(boost::shared_ptr<PubSubEventAssociate> payload) const {
+std::string PubSubEventAssociateSerializer::serializePayload(std::shared_ptr<PubSubEventAssociate> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h
index 03025fb..5056c63 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventAssociateSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventAssociateSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventAssociate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventAssociate>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.cpp
index df255d2..da9feb8 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubEventAssociateSerializer.h>
@@ -23,7 +23,7 @@ PubSubEventCollectionSerializer::PubSubEventCollectionSerializer(PayloadSerializ
PubSubEventCollectionSerializer::~PubSubEventCollectionSerializer() {
}
-std::string PubSubEventCollectionSerializer::serializePayload(boost::shared_ptr<PubSubEventCollection> payload) const {
+std::string PubSubEventCollectionSerializer::serializePayload(std::shared_ptr<PubSubEventCollection> payload) const {
if (!payload) {
return "";
}
@@ -31,8 +31,8 @@ std::string PubSubEventCollectionSerializer::serializePayload(boost::shared_ptr<
if (payload->getNode()) {
element.setAttribute("node", *payload->getNode());
}
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubEventDisassociateSerializer(serializers).serialize(payload->getDisassociate())));
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubEventAssociateSerializer(serializers).serialize(payload->getAssociate())));
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubEventDisassociateSerializer(serializers).serialize(payload->getDisassociate())));
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubEventAssociateSerializer(serializers).serialize(payload->getAssociate())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h
index 6e6817d..33144e9 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventCollectionSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventCollectionSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventCollectionSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventCollection>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventCollection>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.cpp
index 3e2d18b..a758ce6 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -22,13 +22,13 @@ PubSubEventConfigurationSerializer::PubSubEventConfigurationSerializer(PayloadSe
PubSubEventConfigurationSerializer::~PubSubEventConfigurationSerializer() {
}
-std::string PubSubEventConfigurationSerializer::serializePayload(boost::shared_ptr<PubSubEventConfiguration> payload) const {
+std::string PubSubEventConfigurationSerializer::serializePayload(std::shared_ptr<PubSubEventConfiguration> payload) const {
if (!payload) {
return "";
}
XMLElement element("configuration", "http://jabber.org/protocol/pubsub#event");
element.setAttribute("node", payload->getNode());
- element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
+ element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h
index 6309e04..9823292 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventConfigurationSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventConfigurationSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventConfiguration>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventConfiguration>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.cpp
index 4dcd734..cd8fc53 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h>
@@ -22,13 +22,13 @@ PubSubEventDeleteSerializer::PubSubEventDeleteSerializer(PayloadSerializerCollec
PubSubEventDeleteSerializer::~PubSubEventDeleteSerializer() {
}
-std::string PubSubEventDeleteSerializer::serializePayload(boost::shared_ptr<PubSubEventDelete> payload) const {
+std::string PubSubEventDeleteSerializer::serializePayload(std::shared_ptr<PubSubEventDelete> payload) const {
if (!payload) {
return "";
}
XMLElement element("delete", "http://jabber.org/protocol/pubsub#event");
element.setAttribute("node", payload->getNode());
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubEventRedirectSerializer(serializers).serialize(payload->getRedirects())));
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubEventRedirectSerializer(serializers).serialize(payload->getRedirects())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h
index 6d937aa..e02d44c 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDeleteSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventDeleteSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventDeleteSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventDelete>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventDelete>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp
index 0818dee..8ef62bd 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubEventDisassociateSerializer::PubSubEventDisassociateSerializer(PayloadSeri
PubSubEventDisassociateSerializer::~PubSubEventDisassociateSerializer() {
}
-std::string PubSubEventDisassociateSerializer::serializePayload(boost::shared_ptr<PubSubEventDisassociate> payload) const {
+std::string PubSubEventDisassociateSerializer::serializePayload(std::shared_ptr<PubSubEventDisassociate> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h
index 9313ab2..77ca55d 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventDisassociateSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventDisassociateSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventDisassociateSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventDisassociate>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventDisassociate>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.cpp
index 4bc8815..3d1a9cb 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -22,7 +22,7 @@ PubSubEventItemSerializer::PubSubEventItemSerializer(PayloadSerializerCollection
PubSubEventItemSerializer::~PubSubEventItemSerializer() {
}
-std::string PubSubEventItemSerializer::serializePayload(boost::shared_ptr<PubSubEventItem> payload) const {
+std::string PubSubEventItemSerializer::serializePayload(std::shared_ptr<PubSubEventItem> payload) const {
if (!payload) {
return "";
}
@@ -33,8 +33,8 @@ std::string PubSubEventItemSerializer::serializePayload(boost::shared_ptr<PubSub
if (payload->getPublisher()) {
element.setAttribute("publisher", *payload->getPublisher());
}
- foreach(boost::shared_ptr<Payload> item, payload->getData()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(item)->serialize(item)));
+ foreach(std::shared_ptr<Payload> item, payload->getData()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(item)->serialize(item)));
}
if (payload->getID()) {
element.setAttribute("id", *payload->getID());
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h
index 6666c6b..f292a53 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventItemSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventItemSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventItemSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventItem>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventItem>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.cpp
index 7128314..2e0799b 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -24,17 +24,17 @@ PubSubEventItemsSerializer::PubSubEventItemsSerializer(PayloadSerializerCollecti
PubSubEventItemsSerializer::~PubSubEventItemsSerializer() {
}
-std::string PubSubEventItemsSerializer::serializePayload(boost::shared_ptr<PubSubEventItems> payload) const {
+std::string PubSubEventItemsSerializer::serializePayload(std::shared_ptr<PubSubEventItems> payload) const {
if (!payload) {
return "";
}
XMLElement element("items", "http://jabber.org/protocol/pubsub#event");
element.setAttribute("node", payload->getNode());
- foreach(boost::shared_ptr<PubSubEventItem> item, payload->getItems()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubEventItemSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubEventItem> item, payload->getItems()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubEventItemSerializer(serializers).serialize(item)));
}
- foreach(boost::shared_ptr<PubSubEventRetract> item, payload->getRetracts()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubEventRetractSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubEventRetract> item, payload->getRetracts()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubEventRetractSerializer(serializers).serialize(item)));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h
index d174f30..7220fde 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventItemsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventItemsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventItemsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventItems>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventItems>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.cpp
index 86c7635..e0153ec 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubEventPurgeSerializer::PubSubEventPurgeSerializer(PayloadSerializerCollecti
PubSubEventPurgeSerializer::~PubSubEventPurgeSerializer() {
}
-std::string PubSubEventPurgeSerializer::serializePayload(boost::shared_ptr<PubSubEventPurge> payload) const {
+std::string PubSubEventPurgeSerializer::serializePayload(std::shared_ptr<PubSubEventPurge> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h
index c80c703..991f2c6 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventPurgeSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventPurgeSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventPurgeSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventPurge>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventPurge>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.cpp
index a7fcd20..8169205 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubEventRedirectSerializer::PubSubEventRedirectSerializer(PayloadSerializerCo
PubSubEventRedirectSerializer::~PubSubEventRedirectSerializer() {
}
-std::string PubSubEventRedirectSerializer::serializePayload(boost::shared_ptr<PubSubEventRedirect> payload) const {
+std::string PubSubEventRedirectSerializer::serializePayload(std::shared_ptr<PubSubEventRedirect> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h
index fe0f16e..26b6246 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventRedirectSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventRedirectSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventRedirectSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventRedirect>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventRedirect>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.cpp
index 6a132cc..0147648 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubEventRetractSerializer::PubSubEventRetractSerializer(PayloadSerializerColl
PubSubEventRetractSerializer::~PubSubEventRetractSerializer() {
}
-std::string PubSubEventRetractSerializer::serializePayload(boost::shared_ptr<PubSubEventRetract> payload) const {
+std::string PubSubEventRetractSerializer::serializePayload(std::shared_ptr<PubSubEventRetract> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h
index 2c393c2..088c263 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventRetractSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventRetractSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventRetractSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventRetract>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventRetract>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.cpp
index 7305d29..c084a36 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubEventConfigurationSerializer.h>
@@ -23,26 +23,26 @@
using namespace Swift;
PubSubEventSerializer::PubSubEventSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) {
- pubsubSerializers.push_back(boost::make_shared<PubSubEventSubscriptionSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubEventPurgeSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubEventCollectionSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubEventDeleteSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubEventItemsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubEventConfigurationSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubEventSubscriptionSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubEventPurgeSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubEventCollectionSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubEventDeleteSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubEventItemsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubEventConfigurationSerializer>(serializers));
}
PubSubEventSerializer::~PubSubEventSerializer() {
}
-std::string PubSubEventSerializer::serializePayload(boost::shared_ptr<PubSubEvent> payload) const {
+std::string PubSubEventSerializer::serializePayload(std::shared_ptr<PubSubEvent> payload) const {
if (!payload) {
return "";
}
XMLElement element("event", "http://jabber.org/protocol/pubsub#event");
- boost::shared_ptr<PubSubEventPayload> p = payload->getPayload();
- foreach(boost::shared_ptr<PayloadSerializer> serializer, pubsubSerializers) {
+ std::shared_ptr<PubSubEventPayload> p = payload->getPayload();
+ foreach(std::shared_ptr<PayloadSerializer> serializer, pubsubSerializers) {
if (serializer->canSerialize(p)) {
- element.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(p)));
+ element.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(p)));
}
}
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h
index 2b50e95..5d2d5d7 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventSerializer.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <vector>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEvent.h>
@@ -23,13 +22,13 @@ namespace Swift {
PubSubEventSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEvent>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEvent>) const SWIFTEN_OVERRIDE;
private:
private:
PayloadSerializerCollection* serializers;
- std::vector< boost::shared_ptr<PayloadSerializer> > pubsubSerializers;
+ std::vector< std::shared_ptr<PayloadSerializer> > pubsubSerializers;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.cpp
index 322b482..212d9ca 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubEventSubscriptionSerializer::PubSubEventSubscriptionSerializer(PayloadSeri
PubSubEventSubscriptionSerializer::~PubSubEventSubscriptionSerializer() {
}
-std::string PubSubEventSubscriptionSerializer::serializePayload(boost::shared_ptr<PubSubEventSubscription> payload) const {
+std::string PubSubEventSubscriptionSerializer::serializePayload(std::shared_ptr<PubSubEventSubscription> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h
index 74e3062..2b13ee2 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubEventSubscriptionSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubEventSubscriptionSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubEventSubscriptionSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubEventSubscription>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubEventSubscription>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeSubscriptionType(PubSubEventSubscription::SubscriptionType);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp
index e32f17a..4b9176e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -22,13 +22,13 @@ PubSubItemSerializer::PubSubItemSerializer(PayloadSerializerCollection* serializ
PubSubItemSerializer::~PubSubItemSerializer() {
}
-std::string PubSubItemSerializer::serializePayload(boost::shared_ptr<PubSubItem> payload) const {
+std::string PubSubItemSerializer::serializePayload(std::shared_ptr<PubSubItem> payload) const {
if (!payload) {
return "";
}
XMLElement element("item", "http://jabber.org/protocol/pubsub");
- foreach(boost::shared_ptr<Payload> item, payload->getData()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(item)->serialize(item)));
+ foreach(std::shared_ptr<Payload> item, payload->getData()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(serializers->getPayloadSerializer(item)->serialize(item)));
}
if (!payload->getID().empty()) {
element.setAttribute("id", payload->getID());
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h
index e6dbb83..866d09b 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubItemSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubItemSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubItem>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubItem>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp
index 75d32f5..bde7315 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.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.
*/
@@ -9,7 +9,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -25,7 +25,7 @@ PubSubItemsSerializer::PubSubItemsSerializer(PayloadSerializerCollection* serial
PubSubItemsSerializer::~PubSubItemsSerializer() {
}
-std::string PubSubItemsSerializer::serializePayload(boost::shared_ptr<PubSubItems> payload) const {
+std::string PubSubItemsSerializer::serializePayload(std::shared_ptr<PubSubItems> payload) const {
if (!payload) {
return "";
}
@@ -34,8 +34,8 @@ std::string PubSubItemsSerializer::serializePayload(boost::shared_ptr<PubSubItem
SWIFT_LOG(warning) << "Serializing PubSubItems with empty node attribute";
}
element.setAttribute("node", payload->getNode());
- foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubItem> item, payload->getItems()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));
}
if (payload->getMaximumItems()) {
element.setAttribute("max_items", boost::lexical_cast<std::string>(*payload->getMaximumItems()));
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h
index 28b923f..51b0578 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubItemsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubItemsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubItemsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubItems>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubItems>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.cpp
index 09f72ef..c291866 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -22,14 +22,14 @@ PubSubOptionsSerializer::PubSubOptionsSerializer(PayloadSerializerCollection* se
PubSubOptionsSerializer::~PubSubOptionsSerializer() {
}
-std::string PubSubOptionsSerializer::serializePayload(boost::shared_ptr<PubSubOptions> payload) const {
+std::string PubSubOptionsSerializer::serializePayload(std::shared_ptr<PubSubOptions> payload) const {
if (!payload) {
return "";
}
XMLElement element("options", "http://jabber.org/protocol/pubsub");
element.setAttribute("node", payload->getNode());
element.setAttribute("jid", payload->getJID());
- element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
+ element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
if (payload->getSubscriptionID()) {
element.setAttribute("subid", *payload->getSubscriptionID());
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h
index 91dabab..3e0fde0 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOptionsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOptionsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOptionsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOptions>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOptions>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.cpp
index 82980ff..602eb34 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubOwnerAffiliationSerializer::PubSubOwnerAffiliationSerializer(PayloadSerial
PubSubOwnerAffiliationSerializer::~PubSubOwnerAffiliationSerializer() {
}
-std::string PubSubOwnerAffiliationSerializer::serializePayload(boost::shared_ptr<PubSubOwnerAffiliation> payload) const {
+std::string PubSubOwnerAffiliationSerializer::serializePayload(std::shared_ptr<PubSubOwnerAffiliation> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h
index ef0decf..ad1c963 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerAffiliationSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerAffiliationSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerAffiliation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerAffiliation>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeType(PubSubOwnerAffiliation::Type);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.cpp
index 12873e5..3df3686 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -23,14 +23,14 @@ PubSubOwnerAffiliationsSerializer::PubSubOwnerAffiliationsSerializer(PayloadSeri
PubSubOwnerAffiliationsSerializer::~PubSubOwnerAffiliationsSerializer() {
}
-std::string PubSubOwnerAffiliationsSerializer::serializePayload(boost::shared_ptr<PubSubOwnerAffiliations> payload) const {
+std::string PubSubOwnerAffiliationsSerializer::serializePayload(std::shared_ptr<PubSubOwnerAffiliations> payload) const {
if (!payload) {
return "";
}
XMLElement element("affiliations", "http://jabber.org/protocol/pubsub#owner");
element.setAttribute("node", payload->getNode());
- foreach(boost::shared_ptr<PubSubOwnerAffiliation> item, payload->getAffiliations()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubOwnerAffiliationSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubOwnerAffiliation> item, payload->getAffiliations()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubOwnerAffiliationSerializer(serializers).serialize(item)));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h
index 70ba66f..6c53189 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerAffiliationsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerAffiliationsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerAffiliationsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerAffiliations>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerAffiliations>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.cpp
index 94e6860..51e302e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -22,7 +22,7 @@ PubSubOwnerConfigureSerializer::PubSubOwnerConfigureSerializer(PayloadSerializer
PubSubOwnerConfigureSerializer::~PubSubOwnerConfigureSerializer() {
}
-std::string PubSubOwnerConfigureSerializer::serializePayload(boost::shared_ptr<PubSubOwnerConfigure> payload) const {
+std::string PubSubOwnerConfigureSerializer::serializePayload(std::shared_ptr<PubSubOwnerConfigure> payload) const {
if (!payload) {
return "";
}
@@ -30,7 +30,7 @@ std::string PubSubOwnerConfigureSerializer::serializePayload(boost::shared_ptr<P
if (payload->getNode()) {
element.setAttribute("node", *payload->getNode());
}
- element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
+ element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h
index be75a00..c5cac8d 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerConfigureSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerConfigureSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerConfigureSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerConfigure>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerConfigure>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp
index 4b91a81..01e370b 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -22,12 +22,12 @@ PubSubOwnerDefaultSerializer::PubSubOwnerDefaultSerializer(PayloadSerializerColl
PubSubOwnerDefaultSerializer::~PubSubOwnerDefaultSerializer() {
}
-std::string PubSubOwnerDefaultSerializer::serializePayload(boost::shared_ptr<PubSubOwnerDefault> payload) const {
+std::string PubSubOwnerDefaultSerializer::serializePayload(std::shared_ptr<PubSubOwnerDefault> payload) const {
if (!payload) {
return "";
}
XMLElement element("default", "http://jabber.org/protocol/pubsub#owner");
- element.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
+ element.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(payload->getData())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h
index 9d2916f..09703e1 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDefaultSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerDefaultSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerDefaultSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerDefault>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerDefault>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp
index fbf9a24..faf991c 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h>
@@ -22,13 +22,13 @@ PubSubOwnerDeleteSerializer::PubSubOwnerDeleteSerializer(PayloadSerializerCollec
PubSubOwnerDeleteSerializer::~PubSubOwnerDeleteSerializer() {
}
-std::string PubSubOwnerDeleteSerializer::serializePayload(boost::shared_ptr<PubSubOwnerDelete> payload) const {
+std::string PubSubOwnerDeleteSerializer::serializePayload(std::shared_ptr<PubSubOwnerDelete> payload) const {
if (!payload) {
return "";
}
XMLElement element("delete", "http://jabber.org/protocol/pubsub#owner");
element.setAttribute("node", payload->getNode());
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubOwnerRedirectSerializer(serializers).serialize(payload->getRedirect())));
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubOwnerRedirectSerializer(serializers).serialize(payload->getRedirect())));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h
index 3a96e80..c06a916 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerDeleteSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerDeleteSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerDelete>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerDelete>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.cpp
index 25b38d0..f1dc2ae 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerDeleteSerializer.h>
@@ -23,26 +23,26 @@
using namespace Swift;
PubSubOwnerPubSubSerializer::PubSubOwnerPubSubSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) {
- pubsubSerializers.push_back(boost::make_shared<PubSubOwnerConfigureSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubOwnerSubscriptionsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubOwnerDefaultSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubOwnerPurgeSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubOwnerAffiliationsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubOwnerDeleteSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOwnerConfigureSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOwnerSubscriptionsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOwnerDefaultSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOwnerPurgeSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOwnerAffiliationsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOwnerDeleteSerializer>(serializers));
}
PubSubOwnerPubSubSerializer::~PubSubOwnerPubSubSerializer() {
}
-std::string PubSubOwnerPubSubSerializer::serializePayload(boost::shared_ptr<PubSubOwnerPubSub> payload) const {
+std::string PubSubOwnerPubSubSerializer::serializePayload(std::shared_ptr<PubSubOwnerPubSub> payload) const {
if (!payload) {
return "";
}
XMLElement element("pubsub", "http://jabber.org/protocol/pubsub#owner");
- boost::shared_ptr<PubSubOwnerPayload> p = payload->getPayload();
- foreach(boost::shared_ptr<PayloadSerializer> serializer, pubsubSerializers) {
+ std::shared_ptr<PubSubOwnerPayload> p = payload->getPayload();
+ foreach(std::shared_ptr<PayloadSerializer> serializer, pubsubSerializers) {
if (serializer->canSerialize(p)) {
- element.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(p)));
+ element.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(p)));
}
}
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h
index 2dd8400..c93eb04 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPubSubSerializer.h
@@ -6,10 +6,9 @@
#pragma once
+#include <memory>
#include <vector>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerPubSub.h>
@@ -23,13 +22,13 @@ namespace Swift {
PubSubOwnerPubSubSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerPubSubSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerPubSub>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerPubSub>) const SWIFTEN_OVERRIDE;
private:
private:
PayloadSerializerCollection* serializers;
- std::vector< boost::shared_ptr<PayloadSerializer> > pubsubSerializers;
+ std::vector< std::shared_ptr<PayloadSerializer> > pubsubSerializers;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.cpp
index f934c4e..8bc19e9 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubOwnerPurgeSerializer::PubSubOwnerPurgeSerializer(PayloadSerializerCollecti
PubSubOwnerPurgeSerializer::~PubSubOwnerPurgeSerializer() {
}
-std::string PubSubOwnerPurgeSerializer::serializePayload(boost::shared_ptr<PubSubOwnerPurge> payload) const {
+std::string PubSubOwnerPurgeSerializer::serializePayload(std::shared_ptr<PubSubOwnerPurge> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h
index 64be235..31f8c52 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerPurgeSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerPurgeSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerPurgeSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerPurge>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerPurge>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.cpp
index f933a06..cdd101f 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubOwnerRedirectSerializer::PubSubOwnerRedirectSerializer(PayloadSerializerCo
PubSubOwnerRedirectSerializer::~PubSubOwnerRedirectSerializer() {
}
-std::string PubSubOwnerRedirectSerializer::serializePayload(boost::shared_ptr<PubSubOwnerRedirect> payload) const {
+std::string PubSubOwnerRedirectSerializer::serializePayload(std::shared_ptr<PubSubOwnerRedirect> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h
index b183f46..826ebbe 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerRedirectSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerRedirectSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerRedirectSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerRedirect>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerRedirect>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.cpp
index 923c160..5f6b505 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubOwnerSubscriptionSerializer::PubSubOwnerSubscriptionSerializer(PayloadSeri
PubSubOwnerSubscriptionSerializer::~PubSubOwnerSubscriptionSerializer() {
}
-std::string PubSubOwnerSubscriptionSerializer::serializePayload(boost::shared_ptr<PubSubOwnerSubscription> payload) const {
+std::string PubSubOwnerSubscriptionSerializer::serializePayload(std::shared_ptr<PubSubOwnerSubscription> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h
index 1bba67f..df025e0 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerSubscriptionSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerSubscriptionSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerSubscription>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerSubscription>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeSubscriptionType(PubSubOwnerSubscription::SubscriptionType);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.cpp
index 088f6c2..106efaa 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -23,14 +23,14 @@ PubSubOwnerSubscriptionsSerializer::PubSubOwnerSubscriptionsSerializer(PayloadSe
PubSubOwnerSubscriptionsSerializer::~PubSubOwnerSubscriptionsSerializer() {
}
-std::string PubSubOwnerSubscriptionsSerializer::serializePayload(boost::shared_ptr<PubSubOwnerSubscriptions> payload) const {
+std::string PubSubOwnerSubscriptionsSerializer::serializePayload(std::shared_ptr<PubSubOwnerSubscriptions> payload) const {
if (!payload) {
return "";
}
XMLElement element("subscriptions", "http://jabber.org/protocol/pubsub#owner");
element.setAttribute("node", payload->getNode());
- foreach(boost::shared_ptr<PubSubOwnerSubscription> item, payload->getSubscriptions()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubOwnerSubscriptionSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubOwnerSubscription> item, payload->getSubscriptions()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubOwnerSubscriptionSerializer(serializers).serialize(item)));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h
index 70ea7b2..0c282b4 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubOwnerSubscriptionsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubOwnerSubscriptionsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubOwnerSubscriptionsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubOwnerSubscriptions>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubOwnerSubscriptions>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.cpp
index efae018..0b30849 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -23,14 +23,14 @@ PubSubPublishSerializer::PubSubPublishSerializer(PayloadSerializerCollection* se
PubSubPublishSerializer::~PubSubPublishSerializer() {
}
-std::string PubSubPublishSerializer::serializePayload(boost::shared_ptr<PubSubPublish> payload) const {
+std::string PubSubPublishSerializer::serializePayload(std::shared_ptr<PubSubPublish> payload) const {
if (!payload) {
return "";
}
XMLElement element("publish", "http://jabber.org/protocol/pubsub");
element.setAttribute("node", payload->getNode());
- foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubItem> item, payload->getItems()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h
index c576225..fb1af2e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubPublishSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubPublishSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubPublishSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubPublish>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubPublish>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.cpp
index 9a84959..752c234 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -23,14 +23,14 @@ PubSubRetractSerializer::PubSubRetractSerializer(PayloadSerializerCollection* se
PubSubRetractSerializer::~PubSubRetractSerializer() {
}
-std::string PubSubRetractSerializer::serializePayload(boost::shared_ptr<PubSubRetract> payload) const {
+std::string PubSubRetractSerializer::serializePayload(std::shared_ptr<PubSubRetract> payload) const {
if (!payload) {
return "";
}
XMLElement element("retract", "http://jabber.org/protocol/pubsub");
element.setAttribute("node", payload->getNode());
- foreach(boost::shared_ptr<PubSubItem> item, payload->getItems()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubItem> item, payload->getItems()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubItemSerializer(serializers).serialize(item)));
}
element.setAttribute("notify", payload->isNotify() ? "true" : "false");
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h
index 60acb6e..0cb12e4 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubRetractSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubRetractSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubRetractSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubRetract>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubRetract>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubSerializer.cpp
index 9562edb..6c110e2 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubConfigureSerializer.h>
@@ -30,36 +30,36 @@
using namespace Swift;
PubSubSerializer::PubSubSerializer(PayloadSerializerCollection* serializers) : serializers(serializers) {
- pubsubSerializers.push_back(boost::make_shared<PubSubItemsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubCreateSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubPublishSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubOptionsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubAffiliationsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubRetractSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubDefaultSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubSubscriptionsSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubSubscribeSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubUnsubscribeSerializer>(serializers));
- pubsubSerializers.push_back(boost::make_shared<PubSubSubscriptionSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubItemsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubCreateSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubPublishSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubOptionsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubAffiliationsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubRetractSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubDefaultSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubSubscriptionsSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubSubscribeSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubUnsubscribeSerializer>(serializers));
+ pubsubSerializers.push_back(std::make_shared<PubSubSubscriptionSerializer>(serializers));
}
PubSubSerializer::~PubSubSerializer() {
}
-std::string PubSubSerializer::serializePayload(boost::shared_ptr<PubSub> payload) const {
+std::string PubSubSerializer::serializePayload(std::shared_ptr<PubSub> payload) const {
if (!payload) {
return "";
}
XMLElement element("pubsub", "http://jabber.org/protocol/pubsub");
- boost::shared_ptr<PubSubPayload> p = payload->getPayload();
- foreach(boost::shared_ptr<PayloadSerializer> serializer, pubsubSerializers) {
+ std::shared_ptr<PubSubPayload> p = payload->getPayload();
+ foreach(std::shared_ptr<PayloadSerializer> serializer, pubsubSerializers) {
if (serializer->canSerialize(p)) {
- element.addNode(boost::make_shared<XMLRawTextNode>(serializer->serialize(p)));
- if (boost::shared_ptr<PubSubCreate> create = boost::dynamic_pointer_cast<PubSubCreate>(p)) {
- element.addNode(boost::make_shared<XMLRawTextNode>(boost::make_shared<PubSubConfigureSerializer>(serializers)->serialize(create->getConfigure())));
+ element.addNode(std::make_shared<XMLRawTextNode>(serializer->serialize(p)));
+ if (std::shared_ptr<PubSubCreate> create = std::dynamic_pointer_cast<PubSubCreate>(p)) {
+ element.addNode(std::make_shared<XMLRawTextNode>(std::make_shared<PubSubConfigureSerializer>(serializers)->serialize(create->getConfigure())));
}
- if (boost::shared_ptr<PubSubSubscribe> subscribe = boost::dynamic_pointer_cast<PubSubSubscribe>(p)) {
- element.addNode(boost::make_shared<XMLRawTextNode>(boost::make_shared<PubSubConfigureSerializer>(serializers)->serialize(subscribe->getOptions())));
+ if (std::shared_ptr<PubSubSubscribe> subscribe = std::dynamic_pointer_cast<PubSubSubscribe>(p)) {
+ element.addNode(std::make_shared<XMLRawTextNode>(std::make_shared<PubSubConfigureSerializer>(serializers)->serialize(subscribe->getOptions())));
}
}
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h
index 0721d13..829f827 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,10 +21,10 @@ namespace Swift {
PubSubSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSub>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSub>) const SWIFTEN_OVERRIDE;
private:
- std::vector< boost::shared_ptr<PayloadSerializer> > pubsubSerializers;
+ std::vector< std::shared_ptr<PayloadSerializer> > pubsubSerializers;
PayloadSerializerCollection* serializers;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.cpp
index 2e3987e..3fba52e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -21,12 +21,12 @@ PubSubSubscribeOptionsSerializer::PubSubSubscribeOptionsSerializer(PayloadSerial
PubSubSubscribeOptionsSerializer::~PubSubSubscribeOptionsSerializer() {
}
-std::string PubSubSubscribeOptionsSerializer::serializePayload(boost::shared_ptr<PubSubSubscribeOptions> payload) const {
+std::string PubSubSubscribeOptionsSerializer::serializePayload(std::shared_ptr<PubSubSubscribeOptions> payload) const {
if (!payload) {
return "";
}
XMLElement element("subscribe-options", "http://jabber.org/protocol/pubsub");
- element.addNode(payload->isRequired() ? boost::make_shared<XMLElement>("required", "") : boost::shared_ptr<XMLElement>());
+ element.addNode(payload->isRequired() ? std::make_shared<XMLElement>("required", "") : std::shared_ptr<XMLElement>());
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h
index 663d91b..dc9b55a 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubSubscribeOptionsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubSubscribeOptionsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubSubscribeOptions>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscribeOptions>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.cpp
index dcc7ab1..81fc71d 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubSubscribeSerializer::PubSubSubscribeSerializer(PayloadSerializerCollection
PubSubSubscribeSerializer::~PubSubSubscribeSerializer() {
}
-std::string PubSubSubscribeSerializer::serializePayload(boost::shared_ptr<PubSubSubscribe> payload) const {
+std::string PubSubSubscribeSerializer::serializePayload(std::shared_ptr<PubSubSubscribe> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h
index c655464..1c8bfaa 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscribeSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubSubscribeSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubSubscribeSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubSubscribe>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscribe>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.cpp
index cadfce9..644ac07 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/PayloadSerializers/PubSubSubscribeOptionsSerializer.h>
@@ -22,7 +22,7 @@ PubSubSubscriptionSerializer::PubSubSubscriptionSerializer(PayloadSerializerColl
PubSubSubscriptionSerializer::~PubSubSubscriptionSerializer() {
}
-std::string PubSubSubscriptionSerializer::serializePayload(boost::shared_ptr<PubSubSubscription> payload) const {
+std::string PubSubSubscriptionSerializer::serializePayload(std::shared_ptr<PubSubSubscription> payload) const {
if (!payload) {
return "";
}
@@ -34,7 +34,7 @@ std::string PubSubSubscriptionSerializer::serializePayload(boost::shared_ptr<Pub
element.setAttribute("subid", *payload->getSubscriptionID());
}
element.setAttribute("jid", payload->getJID());
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubSubscribeOptionsSerializer(serializers).serialize(payload->getOptions())));
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubSubscribeOptionsSerializer(serializers).serialize(payload->getOptions())));
element.setAttribute("subscription", serializeSubscriptionType(payload->getSubscription()));
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h
index 7d96a06..5a5f847 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubSubscriptionSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubSubscriptionSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubSubscription>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscription>) const SWIFTEN_OVERRIDE;
private:
static std::string serializeSubscriptionType(PubSubSubscription::SubscriptionType);
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.cpp
index 3347187..511c8e8 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,7 +8,7 @@
#include <Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Base/foreach.h>
@@ -23,7 +23,7 @@ PubSubSubscriptionsSerializer::PubSubSubscriptionsSerializer(PayloadSerializerCo
PubSubSubscriptionsSerializer::~PubSubSubscriptionsSerializer() {
}
-std::string PubSubSubscriptionsSerializer::serializePayload(boost::shared_ptr<PubSubSubscriptions> payload) const {
+std::string PubSubSubscriptionsSerializer::serializePayload(std::shared_ptr<PubSubSubscriptions> payload) const {
if (!payload) {
return "";
}
@@ -31,8 +31,8 @@ std::string PubSubSubscriptionsSerializer::serializePayload(boost::shared_ptr<Pu
if (payload->getNode()) {
element.setAttribute("node", *payload->getNode());
}
- foreach(boost::shared_ptr<PubSubSubscription> item, payload->getSubscriptions()) {
- element.addNode(boost::make_shared<XMLRawTextNode>(PubSubSubscriptionSerializer(serializers).serialize(item)));
+ foreach(std::shared_ptr<PubSubSubscription> item, payload->getSubscriptions()) {
+ element.addNode(std::make_shared<XMLRawTextNode>(PubSubSubscriptionSerializer(serializers).serialize(item)));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h
index cc64483..caeb3ef 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubSubscriptionsSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubSubscriptionsSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubSubscriptionsSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubSubscriptions>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubSubscriptions>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp
index e9a16d6..6296d9e 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.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.
*/
@@ -21,7 +21,7 @@ PubSubUnsubscribeSerializer::PubSubUnsubscribeSerializer(PayloadSerializerCollec
PubSubUnsubscribeSerializer::~PubSubUnsubscribeSerializer() {
}
-std::string PubSubUnsubscribeSerializer::serializePayload(boost::shared_ptr<PubSubUnsubscribe> payload) const {
+std::string PubSubUnsubscribeSerializer::serializePayload(std::shared_ptr<PubSubUnsubscribe> payload) const {
if (!payload) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h
index ab9a053..cc98cf5 100644
--- a/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/PubSubUnsubscribeSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
PubSubUnsubscribeSerializer(PayloadSerializerCollection* serializers);
virtual ~PubSubUnsubscribeSerializer();
- virtual std::string serializePayload(boost::shared_ptr<PubSubUnsubscribe>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<PubSubUnsubscribe>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h
index 21ca59f..1f07e37 100644
--- a/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/RawXMLPayloadSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
RawXMLPayloadSerializer() : GenericPayloadSerializer<RawXMLPayload>() {}
- virtual std::string serializePayload(boost::shared_ptr<RawXMLPayload> p) const {
+ virtual std::string serializePayload(std::shared_ptr<RawXMLPayload> p) const {
return p->getRawXML();
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h b/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h
index a16f52b..3487b16 100644
--- a/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ReplaceSerializer.h
@@ -22,7 +22,7 @@ namespace Swift {
public:
ReplaceSerializer() : GenericPayloadSerializer<Replace>() {}
- virtual std::string serializePayload(boost::shared_ptr<Replace> replace) const {
+ virtual std::string serializePayload(std::shared_ptr<Replace> replace) const {
return "<replace id = '" + replace->getID() + "' xmlns='urn:xmpp:message-correct:0'/>";
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp
index c737102..95a0084 100644
--- a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.cpp
@@ -1,13 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <Swiften/Serializer/XML/XMLTextNode.h>
@@ -17,16 +16,16 @@ namespace Swift {
ResourceBindSerializer::ResourceBindSerializer() : GenericPayloadSerializer<ResourceBind>() {
}
-std::string ResourceBindSerializer::serializePayload(boost::shared_ptr<ResourceBind> resourceBind) const {
+std::string ResourceBindSerializer::serializePayload(std::shared_ptr<ResourceBind> resourceBind) const {
XMLElement bindElement("bind", "urn:ietf:params:xml:ns:xmpp-bind");
if (resourceBind->getJID().isValid()) {
- boost::shared_ptr<XMLElement> jidNode(new XMLElement("jid"));
- jidNode->addNode(boost::make_shared<XMLTextNode>(resourceBind->getJID().toString()));
+ std::shared_ptr<XMLElement> jidNode(new XMLElement("jid"));
+ jidNode->addNode(std::make_shared<XMLTextNode>(resourceBind->getJID().toString()));
bindElement.addNode(jidNode);
}
else if (!resourceBind->getResource().empty()) {
- boost::shared_ptr<XMLElement> resourceNode(new XMLElement("resource"));
- resourceNode->addNode(boost::make_shared<XMLTextNode>(resourceBind->getResource()));
+ std::shared_ptr<XMLElement> resourceNode(new XMLElement("resource"));
+ resourceNode->addNode(std::make_shared<XMLTextNode>(resourceBind->getResource()));
bindElement.addNode(resourceNode);
}
return bindElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h
index 2878c34..bea3ff1 100644
--- a/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
ResourceBindSerializer();
- virtual std::string serializePayload(boost::shared_ptr<ResourceBind>) const;
+ virtual std::string serializePayload(std::shared_ptr<ResourceBind>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.cpp
index 205d9e0..3302863 100644
--- a/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <Swiften/Serializer/XML/XMLRawTextNode.h>
@@ -20,7 +21,7 @@ ResultSetSerializer::ResultSetSerializer() {
ResultSetSerializer::~ResultSetSerializer() {
}
-std::string ResultSetSerializer::serializePayload(boost::shared_ptr<ResultSet> payload) const {
+std::string ResultSetSerializer::serializePayload(std::shared_ptr<ResultSet> payload) const {
if (!payload) {
return "";
}
@@ -28,19 +29,19 @@ std::string ResultSetSerializer::serializePayload(boost::shared_ptr<ResultSet> p
XMLElement element("set", "http://jabber.org/protocol/rsm");
if (payload->getMaxItems()) {
- element.addNode(boost::make_shared<XMLElement>("max", "", boost::lexical_cast<std::string>(*payload->getMaxItems())));
+ element.addNode(std::make_shared<XMLElement>("max", "", boost::lexical_cast<std::string>(*payload->getMaxItems())));
}
if (payload->getCount()) {
- element.addNode(boost::make_shared<XMLElement>("count", "", boost::lexical_cast<std::string>(*payload->getCount())));
+ element.addNode(std::make_shared<XMLElement>("count", "", boost::lexical_cast<std::string>(*payload->getCount())));
}
if (payload->getIndex()) {
- element.addNode(boost::make_shared<XMLElement>("index", "", boost::lexical_cast<std::string>(*payload->getIndex())));
+ element.addNode(std::make_shared<XMLElement>("index", "", boost::lexical_cast<std::string>(*payload->getIndex())));
}
if (payload->getFirstID()) {
- boost::shared_ptr<XMLElement> firstElement = boost::make_shared<XMLElement>("first", "", *payload->getFirstID());
+ std::shared_ptr<XMLElement> firstElement = std::make_shared<XMLElement>("first", "", *payload->getFirstID());
if (payload->getFirstIDIndex()) {
firstElement->setAttribute("index", boost::lexical_cast<std::string>(*payload->getFirstIDIndex()));
}
@@ -48,15 +49,15 @@ std::string ResultSetSerializer::serializePayload(boost::shared_ptr<ResultSet> p
}
if (payload->getLastID()) {
- element.addNode(boost::make_shared<XMLElement>("last", "", *payload->getLastID()));
+ element.addNode(std::make_shared<XMLElement>("last", "", *payload->getLastID()));
}
if (payload->getBefore()) {
- element.addNode(boost::make_shared<XMLElement>("before", "", *payload->getBefore()));
+ element.addNode(std::make_shared<XMLElement>("before", "", *payload->getBefore()));
}
if (payload->getAfter()) {
- element.addNode(boost::make_shared<XMLElement>("after", "", *payload->getAfter()));
+ element.addNode(std::make_shared<XMLElement>("after", "", *payload->getAfter()));
}
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h b/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h
index 9d8e24d..e75b443 100644
--- a/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ResultSetSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,6 +21,6 @@ namespace Swift {
ResultSetSerializer();
virtual ~ResultSetSerializer();
- virtual std::string serializePayload(boost::shared_ptr<ResultSet>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<ResultSet>) const SWIFTEN_OVERRIDE;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.cpp b/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.cpp
index f0b19e1..24cc301 100644
--- a/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.cpp
@@ -12,8 +12,7 @@
#include <Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -25,10 +24,10 @@ namespace Swift {
RosterItemExchangeSerializer::RosterItemExchangeSerializer() : GenericPayloadSerializer<RosterItemExchangePayload>() {
}
-std::string RosterItemExchangeSerializer::serializePayload(boost::shared_ptr<RosterItemExchangePayload> roster) const {
+std::string RosterItemExchangeSerializer::serializePayload(std::shared_ptr<RosterItemExchangePayload> roster) const {
XMLElement queryElement("x", "http://jabber.org/protocol/rosterx");
foreach(const RosterItemExchangePayload::Item& item, roster->getItems()) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ std::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
itemElement->setAttribute("jid", item.getJID());
itemElement->setAttribute("name", item.getName());
@@ -39,8 +38,8 @@ std::string RosterItemExchangeSerializer::serializePayload(boost::shared_ptr<Ros
}
foreach(const std::string& group, item.getGroups()) {
- boost::shared_ptr<XMLElement> groupElement(new XMLElement("group"));
- groupElement->addNode(boost::make_shared<XMLTextNode>(group));
+ std::shared_ptr<XMLElement> groupElement(new XMLElement("group"));
+ groupElement->addNode(std::make_shared<XMLTextNode>(group));
itemElement->addNode(groupElement);
}
diff --git a/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h b/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h
index ec4e81e..6212998 100644
--- a/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/RosterItemExchangeSerializer.h
@@ -21,6 +21,6 @@ namespace Swift {
public:
RosterItemExchangeSerializer();
- virtual std::string serializePayload(boost::shared_ptr<RosterItemExchangePayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<RosterItemExchangePayload>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/RosterSerializer.cpp b/Swiften/Serializer/PayloadSerializers/RosterSerializer.cpp
index 1094f2d..8c857ab 100644
--- a/Swiften/Serializer/PayloadSerializers/RosterSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/RosterSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/RosterSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -19,13 +18,13 @@ namespace Swift {
RosterSerializer::RosterSerializer() : GenericPayloadSerializer<RosterPayload>() {
}
-std::string RosterSerializer::serializePayload(boost::shared_ptr<RosterPayload> roster) const {
+std::string RosterSerializer::serializePayload(std::shared_ptr<RosterPayload> roster) const {
XMLElement queryElement("query", "jabber:iq:roster");
if (roster->getVersion()) {
queryElement.setAttribute("ver", *roster->getVersion());
}
foreach(const RosterItemPayload& item, roster->getItems()) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ std::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
itemElement->setAttribute("jid", item.getJID());
itemElement->setAttribute("name", item.getName());
@@ -42,13 +41,13 @@ std::string RosterSerializer::serializePayload(boost::shared_ptr<RosterPayload>
}
foreach(const std::string& group, item.getGroups()) {
- boost::shared_ptr<XMLElement> groupElement(new XMLElement("group"));
- groupElement->addNode(boost::make_shared<XMLTextNode>(group));
+ std::shared_ptr<XMLElement> groupElement(new XMLElement("group"));
+ groupElement->addNode(std::make_shared<XMLTextNode>(group));
itemElement->addNode(groupElement);
}
if (!item.getUnknownContent().empty()) {
- itemElement->addNode(boost::make_shared<XMLRawTextNode>(item.getUnknownContent()));
+ itemElement->addNode(std::make_shared<XMLRawTextNode>(item.getUnknownContent()));
}
diff --git a/Swiften/Serializer/PayloadSerializers/RosterSerializer.h b/Swiften/Serializer/PayloadSerializers/RosterSerializer.h
index 799d88f..834f723 100644
--- a/Swiften/Serializer/PayloadSerializers/RosterSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/RosterSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
RosterSerializer();
- virtual std::string serializePayload(boost::shared_ptr<RosterPayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<RosterPayload>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/S5BProxyRequestSerializer.h b/Swiften/Serializer/PayloadSerializers/S5BProxyRequestSerializer.h
index f10bcfc..7058ac1 100644
--- a/Swiften/Serializer/PayloadSerializers/S5BProxyRequestSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/S5BProxyRequestSerializer.h
@@ -5,15 +5,16 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/S5BProxyRequest.h>
@@ -25,17 +26,17 @@ namespace Swift {
class SWIFTEN_API S5BProxyRequestSerializer : public GenericPayloadSerializer<S5BProxyRequest> {
public:
- virtual std::string serializePayload(boost::shared_ptr<S5BProxyRequest> s5bProxyRequest) const {
+ virtual std::string serializePayload(std::shared_ptr<S5BProxyRequest> s5bProxyRequest) const {
XMLElement queryElement("query", "http://jabber.org/protocol/bytestreams");
if (s5bProxyRequest && s5bProxyRequest->getStreamHost()) {
- boost::shared_ptr<XMLElement> streamHost = boost::make_shared<XMLElement>("streamhost");
+ std::shared_ptr<XMLElement> streamHost = std::make_shared<XMLElement>("streamhost");
streamHost->setAttribute("host", s5bProxyRequest->getStreamHost().get().host);
streamHost->setAttribute("port", boost::lexical_cast<std::string>(s5bProxyRequest->getStreamHost().get().port));
streamHost->setAttribute("jid", s5bProxyRequest->getStreamHost().get().jid.toString());
queryElement.addNode(streamHost);
} else if (s5bProxyRequest && s5bProxyRequest->getActivate()) {
queryElement.setAttribute("sid", s5bProxyRequest->getSID());
- boost::shared_ptr<XMLElement> activate = boost::make_shared<XMLElement>("activate", "", s5bProxyRequest->getActivate().get().toString());
+ std::shared_ptr<XMLElement> activate = std::make_shared<XMLElement>("activate", "", s5bProxyRequest->getActivate().get().toString());
queryElement.addNode(activate);
}
return queryElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.cpp
index de036df..6e55f46 100644
--- a/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/FormSerializer.h>
@@ -19,7 +18,7 @@ namespace Swift {
SearchPayloadSerializer::SearchPayloadSerializer() {
}
-std::string SearchPayloadSerializer::serializePayload(boost::shared_ptr<SearchPayload> searchPayload) const {
+std::string SearchPayloadSerializer::serializePayload(std::shared_ptr<SearchPayload> searchPayload) const {
XMLElement searchElement("query", "jabber:iq:search");
if (searchPayload->getInstructions()) {
@@ -54,7 +53,7 @@ std::string SearchPayloadSerializer::serializePayload(boost::shared_ptr<SearchPa
}
if (Form::ref form = searchPayload->getForm()) {
- searchElement.addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
+ searchElement.addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
}
return searchElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h b/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h
index 594e5d7..51f4227 100644
--- a/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/SearchPayloadSerializer.h
@@ -18,6 +18,6 @@ namespace Swift {
public:
SearchPayloadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<SearchPayload>) const;
+ virtual std::string serializePayload(std::shared_ptr<SearchPayload>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.cpp b/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.cpp
index 9b35952..97c5411 100644
--- a/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.cpp
@@ -6,7 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -18,27 +18,27 @@ namespace Swift {
SecurityLabelSerializer::SecurityLabelSerializer() : GenericPayloadSerializer<SecurityLabel>() {
}
-std::string SecurityLabelSerializer::serializePayload(boost::shared_ptr<SecurityLabel> label) const {
+std::string SecurityLabelSerializer::serializePayload(std::shared_ptr<SecurityLabel> label) const {
XMLElement element("securitylabel", "urn:xmpp:sec-label:0");
if (!label->getDisplayMarking().empty()) {
- boost::shared_ptr<XMLElement> displayMarking(new XMLElement("displaymarking"));
+ std::shared_ptr<XMLElement> displayMarking(new XMLElement("displaymarking"));
if (!label->getForegroundColor().empty()) {
displayMarking->setAttribute("fgcolor", label->getForegroundColor());
}
if (!label->getBackgroundColor().empty()) {
displayMarking->setAttribute("bgcolor", label->getBackgroundColor());
}
- displayMarking->addNode(boost::make_shared<XMLTextNode>(label->getDisplayMarking()));
+ displayMarking->addNode(std::make_shared<XMLTextNode>(label->getDisplayMarking()));
element.addNode(displayMarking);
}
- boost::shared_ptr<XMLElement> labelElement(new XMLElement("label"));
- labelElement->addNode(boost::make_shared<XMLRawTextNode>(label->getLabel()));
+ std::shared_ptr<XMLElement> labelElement(new XMLElement("label"));
+ labelElement->addNode(std::make_shared<XMLRawTextNode>(label->getLabel()));
element.addNode(labelElement);
foreach(const std::string& equivalentLabel, label->getEquivalentLabels()) {
- boost::shared_ptr<XMLElement> equivalentLabelElement(new XMLElement("equivalentlabel"));
- equivalentLabelElement->addNode(boost::make_shared<XMLRawTextNode>(equivalentLabel));
+ std::shared_ptr<XMLElement> equivalentLabelElement(new XMLElement("equivalentlabel"));
+ equivalentLabelElement->addNode(std::make_shared<XMLRawTextNode>(equivalentLabel));
element.addNode(equivalentLabelElement);
}
return element.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h b/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h
index 23f50f4..b1eaaed 100644
--- a/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
SecurityLabelSerializer();
- virtual std::string serializePayload(boost::shared_ptr<SecurityLabel> version) const;
+ virtual std::string serializePayload(std::shared_ptr<SecurityLabel> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.cpp b/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.cpp
index 2bf6bbb..e8d2a1b 100644
--- a/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.cpp
@@ -6,7 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/PayloadSerializers/SecurityLabelSerializer.h>
@@ -18,7 +18,7 @@ namespace Swift {
SecurityLabelsCatalogSerializer::SecurityLabelsCatalogSerializer() : GenericPayloadSerializer<SecurityLabelsCatalog>() {
}
-std::string SecurityLabelsCatalogSerializer::serializePayload(boost::shared_ptr<SecurityLabelsCatalog> catalog) const {
+std::string SecurityLabelsCatalogSerializer::serializePayload(std::shared_ptr<SecurityLabelsCatalog> catalog) const {
XMLElement element("catalog", "urn:xmpp:sec-label:catalog:2");
if (!catalog->getName().empty()) {
element.setAttribute("name", catalog->getName());
@@ -30,14 +30,14 @@ std::string SecurityLabelsCatalogSerializer::serializePayload(boost::shared_ptr<
element.setAttribute("desc", catalog->getDescription());
}
foreach (const SecurityLabelsCatalog::Item& item, catalog->getItems()) {
- boost::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
+ std::shared_ptr<XMLElement> itemElement(new XMLElement("item"));
itemElement->setAttribute("selector", item.getSelector());
if (item.getIsDefault()) {
itemElement->setAttribute("default", "true");
}
if (item.getLabel()) {
std::string serializedLabel = SecurityLabelSerializer().serialize(item.getLabel());
- itemElement->addNode(boost::make_shared<XMLRawTextNode>(serializedLabel));
+ itemElement->addNode(std::make_shared<XMLRawTextNode>(serializedLabel));
}
element.addNode(itemElement);
}
diff --git a/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h b/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h
index da3b7f3..c3efc1e 100644
--- a/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/SecurityLabelsCatalogSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
SecurityLabelsCatalogSerializer();
- virtual std::string serializePayload(boost::shared_ptr<SecurityLabelsCatalog> version) const;
+ virtual std::string serializePayload(std::shared_ptr<SecurityLabelsCatalog> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.cpp b/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.cpp
index 05beaae..2245030 100644
--- a/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.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.
*/
@@ -11,7 +11,7 @@ namespace Swift {
SoftwareVersionSerializer::SoftwareVersionSerializer() : GenericPayloadSerializer<SoftwareVersion>() {
}
-std::string SoftwareVersionSerializer::serializePayload(boost::shared_ptr<SoftwareVersion> version) const {
+std::string SoftwareVersionSerializer::serializePayload(std::shared_ptr<SoftwareVersion> version) const {
std::string result("<query xmlns=\"jabber:iq:version\">");
if (!version->getName().empty()) {
result += "<name>" + version->getName() + "</name>";
diff --git a/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h b/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h
index 6c03c84..7f0875b 100644
--- a/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/SoftwareVersionSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
SoftwareVersionSerializer();
- virtual std::string serializePayload(boost::shared_ptr<SoftwareVersion> version) const;
+ virtual std::string serializePayload(std::shared_ptr<SoftwareVersion> version) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h b/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h
index 086652f..12e6994 100644
--- a/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.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.
*/
@@ -18,7 +18,7 @@ namespace Swift {
public:
StartSessionSerializer() : GenericPayloadSerializer<StartSession>() {}
- virtual std::string serializePayload(boost::shared_ptr<StartSession>) const {
+ virtual std::string serializePayload(std::shared_ptr<StartSession>) const {
return XMLElement("session", "urn:ietf:params:xml:ns:xmpp-session").serialize();
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/StatusSerializer.h b/Swiften/Serializer/PayloadSerializers/StatusSerializer.h
index 8247e28..0e81a26 100644
--- a/Swiften/Serializer/PayloadSerializers/StatusSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/StatusSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/Status.h>
@@ -19,9 +19,9 @@ namespace Swift {
public:
StatusSerializer() : GenericPayloadSerializer<Status>() {}
- virtual std::string serializePayload(boost::shared_ptr<Status> status) const {
+ virtual std::string serializePayload(std::shared_ptr<Status> status) const {
XMLElement element("status");
- element.addNode(boost::make_shared<XMLTextNode>(status->getText()));
+ element.addNode(std::make_shared<XMLTextNode>(status->getText()));
return element.serialize();
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/StatusShowSerializer.h b/Swiften/Serializer/PayloadSerializers/StatusShowSerializer.h
index 24fbe1b..155b645 100644
--- a/Swiften/Serializer/PayloadSerializers/StatusShowSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/StatusShowSerializer.h
@@ -15,7 +15,7 @@ namespace Swift {
public:
StatusShowSerializer() : GenericPayloadSerializer<StatusShow>() {}
- virtual std::string serializePayload(boost::shared_ptr<StatusShow> statusShow) const {
+ virtual std::string serializePayload(std::shared_ptr<StatusShow> statusShow) const {
if (statusShow->getType () == StatusShow::Online || statusShow->getType() == StatusShow::None) {
return "";
}
diff --git a/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp b/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp
index 64ea62c..31720f7 100644
--- a/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp
@@ -1,13 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/StorageSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -18,29 +17,29 @@ namespace Swift {
StorageSerializer::StorageSerializer() : GenericPayloadSerializer<Storage>() {
}
-std::string StorageSerializer::serializePayload(boost::shared_ptr<Storage> storage) const {
+std::string StorageSerializer::serializePayload(std::shared_ptr<Storage> storage) const {
XMLElement storageElement("storage", "storage:bookmarks");
foreach(const Storage::Room& room, storage->getRooms()) {
- boost::shared_ptr<XMLElement> conferenceElement(new XMLElement("conference"));
+ std::shared_ptr<XMLElement> conferenceElement(new XMLElement("conference"));
conferenceElement->setAttribute("name", room.name);
conferenceElement->setAttribute("jid", room.jid);
conferenceElement->setAttribute("autojoin", room.autoJoin ? "1" : "0");
if (!room.nick.empty()) {
- boost::shared_ptr<XMLElement> nickElement(new XMLElement("nick"));
- nickElement->addNode(boost::make_shared<XMLTextNode>(room.nick));
+ std::shared_ptr<XMLElement> nickElement(new XMLElement("nick"));
+ nickElement->addNode(std::make_shared<XMLTextNode>(room.nick));
conferenceElement->addNode(nickElement);
}
if (room.password) {
- boost::shared_ptr<XMLElement> passwordElement(new XMLElement("password"));
- passwordElement->addNode(boost::make_shared<XMLTextNode>(*room.password));
+ std::shared_ptr<XMLElement> passwordElement(new XMLElement("password"));
+ passwordElement->addNode(std::make_shared<XMLTextNode>(*room.password));
conferenceElement->addNode(passwordElement);
}
storageElement.addNode(conferenceElement);
}
foreach(const Storage::URL& url, storage->getURLs()) {
- boost::shared_ptr<XMLElement> urlElement(new XMLElement("url"));
+ std::shared_ptr<XMLElement> urlElement(new XMLElement("url"));
urlElement->setAttribute("name", url.name);
urlElement->setAttribute("url", url.url);
storageElement.addNode(urlElement);
diff --git a/Swiften/Serializer/PayloadSerializers/StorageSerializer.h b/Swiften/Serializer/PayloadSerializers/StorageSerializer.h
index a3a55f4..9f88fa1 100644
--- a/Swiften/Serializer/PayloadSerializers/StorageSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/StorageSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
StorageSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Storage>) const;
+ virtual std::string serializePayload(std::shared_ptr<Storage>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.cpp b/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.cpp
index a64d7ae..e15ab77 100644
--- a/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.cpp
@@ -12,9 +12,9 @@
#include <Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/DateTime.h>
#include <Swiften/Base/foreach.h>
@@ -27,7 +27,7 @@ namespace Swift {
StreamInitiationFileInfoSerializer::StreamInitiationFileInfoSerializer() {
}
-std::string StreamInitiationFileInfoSerializer::serializePayload(boost::shared_ptr<StreamInitiationFileInfo> fileInfo) const {
+std::string StreamInitiationFileInfoSerializer::serializePayload(std::shared_ptr<StreamInitiationFileInfo> fileInfo) const {
XMLElement fileElement("file", "http://jabber.org/protocol/si/profile/file-transfer");
if (fileInfo->getDate() != stringToDateTime("")) {
@@ -44,11 +44,11 @@ std::string StreamInitiationFileInfoSerializer::serializePayload(boost::shared_p
fileElement.setAttribute("size", boost::lexical_cast<std::string>(fileInfo->getSize()));
}
if (!fileInfo->getDescription().empty()) {
- boost::shared_ptr<XMLElement> desc = boost::make_shared<XMLElement>("desc", "", fileInfo->getDescription());
+ std::shared_ptr<XMLElement> desc = std::make_shared<XMLElement>("desc", "", fileInfo->getDescription());
fileElement.addNode(desc);
}
if (fileInfo->getSupportsRangeRequests()) {
- boost::shared_ptr<XMLElement> range = boost::make_shared<XMLElement>("range");
+ std::shared_ptr<XMLElement> range = std::make_shared<XMLElement>("range");
if (fileInfo->getRangeOffset() != 0) {
range->setAttribute("offset", boost::lexical_cast<std::string>(fileInfo->getRangeOffset()));
}
diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h b/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h
index e7714f0..de54313 100644
--- a/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationFileInfoSerializer.h
@@ -25,6 +25,6 @@ namespace Swift {
public:
StreamInitiationFileInfoSerializer();
- virtual std::string serializePayload(boost::shared_ptr<StreamInitiationFileInfo>) const;
+ virtual std::string serializePayload(std::shared_ptr<StreamInitiationFileInfo>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp
index 824569a..fcfb063 100644
--- a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.cpp
@@ -1,13 +1,13 @@
/*
- * Copyright (c) 2010-2013 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
+#include <memory>
#include <boost/lexical_cast.hpp>
#include <Swiften/Base/foreach.h>
@@ -25,7 +25,7 @@ namespace Swift {
StreamInitiationSerializer::StreamInitiationSerializer() {
}
-std::string StreamInitiationSerializer::serializePayload(boost::shared_ptr<StreamInitiation> streamInitiation) const {
+std::string StreamInitiationSerializer::serializePayload(std::shared_ptr<StreamInitiation> streamInitiation) const {
assert(streamInitiation->getIsFileTransfer());
XMLElement siElement("si", "http://jabber.org/protocol/si");
@@ -36,37 +36,37 @@ std::string StreamInitiationSerializer::serializePayload(boost::shared_ptr<Strea
if (streamInitiation->getFileInfo()) {
StreamInitiationFileInfo file = *streamInitiation->getFileInfo();
- boost::shared_ptr<XMLElement> fileElement(new XMLElement("file", "http://jabber.org/protocol/si/profile/file-transfer"));
+ std::shared_ptr<XMLElement> fileElement(new XMLElement("file", "http://jabber.org/protocol/si/profile/file-transfer"));
fileElement->setAttribute("name", file.getName());
if (file.getSize() != 0) {
fileElement->setAttribute("size", boost::lexical_cast<std::string>(file.getSize()));
}
if (!file.getDescription().empty()) {
- boost::shared_ptr<XMLElement> descElement(new XMLElement("desc"));
- descElement->addNode(boost::make_shared<XMLTextNode>(file.getDescription()));
+ std::shared_ptr<XMLElement> descElement(new XMLElement("desc"));
+ descElement->addNode(std::make_shared<XMLTextNode>(file.getDescription()));
fileElement->addNode(descElement);
}
siElement.addNode(fileElement);
}
- boost::shared_ptr<XMLElement> featureElement(new XMLElement("feature", FEATURE_NEG_NS));
+ std::shared_ptr<XMLElement> featureElement(new XMLElement("feature", FEATURE_NEG_NS));
if (streamInitiation->getProvidedMethods().size() > 0) {
Form::ref form(new Form(Form::FormType));
- FormField::ref field = boost::make_shared<FormField>(FormField::ListSingleType);
+ FormField::ref field = std::make_shared<FormField>(FormField::ListSingleType);
field->setName("stream-method");
foreach(const std::string& method, streamInitiation->getProvidedMethods()) {
field->addOption(FormField::Option("", method));
}
form->addField(field);
- featureElement->addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
+ featureElement->addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
}
else if (!streamInitiation->getRequestedMethod().empty()) {
Form::ref form(new Form(Form::SubmitType));
- FormField::ref field = boost::make_shared<FormField>(FormField::ListSingleType);
+ FormField::ref field = std::make_shared<FormField>(FormField::ListSingleType);
field->addValue(streamInitiation->getRequestedMethod());
field->setName("stream-method");
form->addField(field);
- featureElement->addNode(boost::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
+ featureElement->addNode(std::make_shared<XMLRawTextNode>(FormSerializer().serialize(form)));
}
siElement.addNode(featureElement);
return siElement.serialize();
diff --git a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h
index 056806e..73dbc39 100644
--- a/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/StreamInitiationSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
StreamInitiationSerializer();
- virtual std::string serializePayload(boost::shared_ptr<StreamInitiation>) const;
+ virtual std::string serializePayload(std::shared_ptr<StreamInitiation>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/SubjectSerializer.h b/Swiften/Serializer/PayloadSerializers/SubjectSerializer.h
index 9f90ce0..20f95fd 100644
--- a/Swiften/Serializer/PayloadSerializers/SubjectSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/SubjectSerializer.h
@@ -16,7 +16,7 @@ namespace Swift {
public:
SubjectSerializer() : GenericPayloadSerializer<Subject>() {}
- virtual std::string serializePayload(boost::shared_ptr<Subject> subject) const {
+ virtual std::string serializePayload(std::shared_ptr<Subject> subject) const {
XMLTextNode textNode(subject->getText());
return "<subject>" + textNode.serialize() + "</subject>";
}
diff --git a/Swiften/Serializer/PayloadSerializers/ThreadSerializer.cpp b/Swiften/Serializer/PayloadSerializers/ThreadSerializer.cpp
index 61b91ae..5914cf2 100644
--- a/Swiften/Serializer/PayloadSerializers/ThreadSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/ThreadSerializer.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.
*/
@@ -15,7 +15,7 @@ namespace Swift {
ThreadSerializer::~ThreadSerializer() {
}
- std::string ThreadSerializer::serializePayload(boost::shared_ptr<Thread> thread) const {
+ std::string ThreadSerializer::serializePayload(std::shared_ptr<Thread> thread) const {
XMLElement threadNode("thread", "", thread->getText());
if (!thread->getParent().empty()) {
threadNode.setAttribute("parent", thread->getParent());
diff --git a/Swiften/Serializer/PayloadSerializers/ThreadSerializer.h b/Swiften/Serializer/PayloadSerializers/ThreadSerializer.h
index 264faba..07ecb82 100644
--- a/Swiften/Serializer/PayloadSerializers/ThreadSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/ThreadSerializer.h
@@ -17,6 +17,6 @@ namespace Swift {
ThreadSerializer();
virtual ~ThreadSerializer();
- virtual std::string serializePayload(boost::shared_ptr<Thread> thread) const;
+ virtual std::string serializePayload(std::shared_ptr<Thread> thread) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/BlockSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/BlockSerializerTest.cpp
index 1dc97f8..9b9e00d 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/BlockSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/BlockSerializerTest.cpp
@@ -34,7 +34,7 @@ class BlockSerializerTest : public CppUnit::TestFixture
void testExample4() {
BlockSerializer<BlockListPayload> testling("blocklist");
- boost::shared_ptr<BlockListPayload> blocklist = boost::make_shared<BlockListPayload>();
+ std::shared_ptr<BlockListPayload> blocklist = std::make_shared<BlockListPayload>();
blocklist->addItem(JID("romeo@montague.net"));
blocklist->addItem(JID("iago@shakespeare.lit"));
@@ -43,7 +43,7 @@ class BlockSerializerTest : public CppUnit::TestFixture
void testExample6() {
BlockSerializer<BlockPayload> testling("block");
- boost::shared_ptr<BlockPayload> block = boost::make_shared<BlockPayload>();
+ std::shared_ptr<BlockPayload> block = std::make_shared<BlockPayload>();
block->addItem(JID("romeo@montague.net"));
CPPUNIT_ASSERT_EQUAL(std::string("<block xmlns=\"urn:xmpp:blocking\"><item jid=\"romeo@montague.net\"/></block>"), testling.serialize(block));
@@ -51,7 +51,7 @@ class BlockSerializerTest : public CppUnit::TestFixture
void testExample10() {
BlockSerializer<UnblockPayload> testling("unblock");
- boost::shared_ptr<UnblockPayload> unblock = boost::make_shared<UnblockPayload>();
+ std::shared_ptr<UnblockPayload> unblock = std::make_shared<UnblockPayload>();
unblock->addItem(JID("romeo@montague.net"));
CPPUNIT_ASSERT_EQUAL(std::string("<unblock xmlns=\"urn:xmpp:blocking\"><item jid=\"romeo@montague.net\"/></unblock>"), testling.serialize(unblock));
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/CapsInfoSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/CapsInfoSerializerTest.cpp
index 517e98b..c4e3ad8 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/CapsInfoSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/CapsInfoSerializerTest.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.
*/
@@ -22,7 +22,7 @@ class CapsInfoSerializerTest : public CppUnit::TestFixture
void testSerialize() {
CapsInfoSerializer testling;
- boost::shared_ptr<CapsInfo> priority(new CapsInfo("http://swift.im", "myversion", "sha-1"));
+ std::shared_ptr<CapsInfo> priority(new CapsInfo("http://swift.im", "myversion", "sha-1"));
CPPUNIT_ASSERT_EQUAL(std::string("<c hash=\"sha-1\" node=\"http://swift.im\" ver=\"myversion\" xmlns=\"http://jabber.org/protocol/caps\"/>"), testling.serialize(priority));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/CarbonsSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/CarbonsSerializerTest.cpp
index a0c49a6..9ac8416 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/CarbonsSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/CarbonsSerializerTest.cpp
@@ -43,7 +43,7 @@ class CarbonsSerializerTest : public CppUnit::TestFixture {
void testSerializeExample3() {
CarbonsEnableSerializer testling;
- CPPUNIT_ASSERT_EQUAL(std::string("<enable xmlns=\"urn:xmpp:carbons:2\"/>"), testling.serialize(boost::make_shared<CarbonsEnable>()));
+ CPPUNIT_ASSERT_EQUAL(std::string("<enable xmlns=\"urn:xmpp:carbons:2\"/>"), testling.serialize(std::make_shared<CarbonsEnable>()));
}
/*
@@ -52,7 +52,7 @@ class CarbonsSerializerTest : public CppUnit::TestFixture {
void testSerializeExample6() {
CarbonsDisableSerializer testling;
- CPPUNIT_ASSERT_EQUAL(std::string("<disable xmlns=\"urn:xmpp:carbons:2\"/>"), testling.serialize(boost::make_shared<CarbonsDisable>()));
+ CPPUNIT_ASSERT_EQUAL(std::string("<disable xmlns=\"urn:xmpp:carbons:2\"/>"), testling.serialize(std::make_shared<CarbonsDisable>()));
}
/*
@@ -61,15 +61,15 @@ class CarbonsSerializerTest : public CppUnit::TestFixture {
void testSerializeExample12() {
CarbonsReceivedSerializer testling(&serializers);
- CarbonsReceived::ref received = boost::make_shared<CarbonsReceived>();
+ CarbonsReceived::ref received = std::make_shared<CarbonsReceived>();
- boost::shared_ptr<Forwarded> forwarded = boost::make_shared<Forwarded>();
+ std::shared_ptr<Forwarded> forwarded = std::make_shared<Forwarded>();
- Message::ref message = boost::make_shared<Message>();
+ Message::ref message = std::make_shared<Message>();
message->setFrom(JID("juliet@capulet.example/balcony"));
message->setTo(JID("romeo@montague.example/garden"));
message->setBody("What man art thou that, thus bescreen'd in night, so stumblest on my counsel?");
- message->addPayload(boost::make_shared<Thread>("0e3141cd80894871a68e6fe6b1ec56fa"));
+ message->addPayload(std::make_shared<Thread>("0e3141cd80894871a68e6fe6b1ec56fa"));
forwarded->setStanza(message);
received->setForwarded(forwarded);
@@ -94,15 +94,15 @@ class CarbonsSerializerTest : public CppUnit::TestFixture {
void testSerializeExample14() {
CarbonsSentSerializer testling(&serializers);
- CarbonsSent::ref sent = boost::make_shared<CarbonsSent>();
+ CarbonsSent::ref sent = std::make_shared<CarbonsSent>();
- boost::shared_ptr<Forwarded> forwarded = boost::make_shared<Forwarded>();
+ std::shared_ptr<Forwarded> forwarded = std::make_shared<Forwarded>();
- Message::ref message = boost::make_shared<Message>();
+ Message::ref message = std::make_shared<Message>();
message->setTo(JID("juliet@capulet.example/balcony"));
message->setFrom(JID("romeo@montague.example/home"));
message->setBody("Neither, fair saint, if either thee dislike.");
- message->addPayload(boost::make_shared<Thread>("0e3141cd80894871a68e6fe6b1ec56fa"));
+ message->addPayload(std::make_shared<Thread>("0e3141cd80894871a68e6fe6b1ec56fa"));
forwarded->setStanza(message);
sent->setForwarded(forwarded);
@@ -127,7 +127,7 @@ class CarbonsSerializerTest : public CppUnit::TestFixture {
void testSerializeExample15() {
CarbonsPrivateSerializer testling;
- CPPUNIT_ASSERT_EQUAL(std::string("<private xmlns=\"urn:xmpp:carbons:2\"/>"), testling.serialize(boost::make_shared<CarbonsPrivate>()));
+ CPPUNIT_ASSERT_EQUAL(std::string("<private xmlns=\"urn:xmpp:carbons:2\"/>"), testling.serialize(std::make_shared<CarbonsPrivate>()));
}
private:
FullPayloadSerializerCollection serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp
index 85b067f..018d2cc 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ChatStateSerializerTest.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>
@@ -26,27 +32,27 @@ class ChatStateSerializerTest : public CppUnit::TestFixture
ChatStateSerializer testling;
void testSerialize_ActiveState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Active));
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Active));
CPPUNIT_ASSERT_EQUAL(std::string("<active xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
}
void testSerialize_GoneState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Gone));
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Gone));
CPPUNIT_ASSERT_EQUAL(std::string("<gone xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
}
void testSerialize_ComposingState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Composing));
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Composing));
CPPUNIT_ASSERT_EQUAL(std::string("<composing xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
}
void testSerialize_PausedState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Paused));
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Paused));
CPPUNIT_ASSERT_EQUAL(std::string("<paused xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
}
void testSerialize_InacativeState() {
- boost::shared_ptr<ChatState> priority(new ChatState(ChatState::Inactive));
+ std::shared_ptr<ChatState> priority(new ChatState(ChatState::Inactive));
CPPUNIT_ASSERT_EQUAL(std::string("<inactive xmlns=\"http://jabber.org/protocol/chatstates\"/>"), testling.serialize(priority));
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/DeliveryReceiptSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/DeliveryReceiptSerializerTest.cpp
index bda9ab7..7ed9421 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/DeliveryReceiptSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/DeliveryReceiptSerializerTest.cpp
@@ -10,8 +10,7 @@
* See the COPYING file for more information.
*/
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -31,18 +30,18 @@ class DeliveryReceiptSerializerTest : public CppUnit::TestFixture {
void testSerialize_XEP0184Example3() {
std::string expected = "<request xmlns=\"urn:xmpp:receipts\"/>";
- DeliveryReceiptRequest::ref receipt = boost::make_shared<DeliveryReceiptRequest>();
+ DeliveryReceiptRequest::ref receipt = std::make_shared<DeliveryReceiptRequest>();
- boost::shared_ptr<DeliveryReceiptRequestSerializer> serializer = boost::make_shared<DeliveryReceiptRequestSerializer>();
+ std::shared_ptr<DeliveryReceiptRequestSerializer> serializer = std::make_shared<DeliveryReceiptRequestSerializer>();
CPPUNIT_ASSERT_EQUAL(expected, serializer->serializePayload(receipt));
}
void testSerialize_XEP0184Example4() {
std::string expected = "<received id=\"richard2-4.1.247\" xmlns=\"urn:xmpp:receipts\"/>";
- DeliveryReceipt::ref receipt = boost::make_shared<DeliveryReceipt>("richard2-4.1.247");
+ DeliveryReceipt::ref receipt = std::make_shared<DeliveryReceipt>("richard2-4.1.247");
- boost::shared_ptr<DeliveryReceiptSerializer> serializer = boost::make_shared<DeliveryReceiptSerializer>();
+ std::shared_ptr<DeliveryReceiptSerializer> serializer = std::make_shared<DeliveryReceiptSerializer>();
CPPUNIT_ASSERT_EQUAL(expected, serializer->serializePayload(receipt));
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp
index 14b1a34..318c3d7 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.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.
*/
@@ -23,7 +23,7 @@ class DiscoInfoSerializerTest : public CppUnit::TestFixture
void testSerialize() {
DiscoInfoSerializer testling;
- boost::shared_ptr<DiscoInfo> discoInfo(new DiscoInfo());
+ std::shared_ptr<DiscoInfo> discoInfo(new DiscoInfo());
discoInfo->addIdentity(DiscoInfo::Identity("Swift", "client", "pc"));
discoInfo->addIdentity(DiscoInfo::Identity("Vlug", "client", "pc", "nl"));
discoInfo->addFeature("http://jabber.org/protocol/caps");
@@ -43,10 +43,10 @@ class DiscoInfoSerializerTest : public CppUnit::TestFixture
void testSerialize_Form() {
DiscoInfoSerializer testling;
- boost::shared_ptr<DiscoInfo> discoInfo(new DiscoInfo());
+ std::shared_ptr<DiscoInfo> discoInfo(new DiscoInfo());
discoInfo->addFeature("http://jabber.org/protocol/caps");
discoInfo->addFeature("http://jabber.org/protocol/disco#info");
- boost::shared_ptr<Form> form(new Form(Form::FormType));
+ std::shared_ptr<Form> form(new Form(Form::FormType));
form->setTitle("Bot Configuration");
discoInfo->addExtension(form);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ErrorSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ErrorSerializerTest.cpp
index 13d9e3c..68a72b8 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ErrorSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ErrorSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -24,15 +24,15 @@ class ErrorSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
ErrorSerializer testling(&serializers);
- boost::shared_ptr<ErrorPayload> error(new ErrorPayload(ErrorPayload::BadRequest, ErrorPayload::Cancel, "My Error"));
+ std::shared_ptr<ErrorPayload> error(new ErrorPayload(ErrorPayload::BadRequest, ErrorPayload::Cancel, "My Error"));
CPPUNIT_ASSERT_EQUAL(std::string("<error type=\"cancel\"><bad-request xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/><text xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\">My Error</text></error>"), testling.serialize(error));
}
void testSerialize_Payload() {
ErrorSerializer testling(&serializers);
- boost::shared_ptr<ErrorPayload> error = boost::make_shared<ErrorPayload>();
- error->setPayload(boost::make_shared<Delay>());
+ std::shared_ptr<ErrorPayload> error = std::make_shared<ErrorPayload>();
+ error->setPayload(std::make_shared<Delay>());
CPPUNIT_ASSERT_EQUAL(std::string(
"<error type=\"cancel\"><undefined-condition xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/><delay stamp=\"not-a-date-timeZ\" xmlns=\"urn:xmpp:delay\"/></error>"
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp
index 8bd16cd..6534dce 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/FormSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -22,7 +22,7 @@ class FormSerializerTest : public CppUnit::TestFixture {
public:
void testSerializeFormInformation() {
FormSerializer testling;
- boost::shared_ptr<Form> form(new Form(Form::FormType));
+ std::shared_ptr<Form> form(new Form(Form::FormType));
form->setTitle("Bot Configuration");
form->setInstructions("Hello!\nFill out this form to configure your new bot!");
@@ -36,39 +36,39 @@ class FormSerializerTest : public CppUnit::TestFixture {
void testSerializeLayout() {
FormSerializer testling;
- boost::shared_ptr<Form> form(new Form(Form::FormType));
+ std::shared_ptr<Form> form(new Form(Form::FormType));
- FormPage::page page = boost::make_shared<FormPage>();
+ FormPage::page page = std::make_shared<FormPage>();
page->setLabel("P1");
- FormReportedRef::ref reportedRef = boost::make_shared<FormReportedRef>();
+ FormReportedRef::ref reportedRef = std::make_shared<FormReportedRef>();
page->addReportedRef(reportedRef);
- FormText::text formText = boost::make_shared<FormText>();
+ FormText::text formText = std::make_shared<FormText>();
formText->setTextString("P1T1");
page->addTextElement(formText);
- FormField::ref field = boost::make_shared<FormField>(FormField::TextSingleType);
+ FormField::ref field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("P1F1");
field->setLabel("field one");
page->addField(field);
- FormSection::section section = boost::make_shared<FormSection>();
+ FormSection::section section = std::make_shared<FormSection>();
section->setLabel("P1S1");
- formText = boost::make_shared<FormText>();
+ formText = std::make_shared<FormText>();
formText->setTextString("P1S1T1");
section->addTextElement(formText);
- field = boost::make_shared<FormField>(FormField::TextSingleType);
+ field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("P1S1F1");
field->setLabel("field two");
section->addField(field);
page->addChildSection(section);
form->addPage(page);
- page = boost::make_shared<FormPage>();
+ page = std::make_shared<FormPage>();
page->setLabel("P2");
- section = boost::make_shared<FormSection>();
+ section = std::make_shared<FormSection>();
section->setLabel("P2S1");
- FormSection::section subSection = boost::make_shared<FormSection>();
+ FormSection::section subSection = std::make_shared<FormSection>();
subSection->setLabel("P2S2");
- FormSection::section subSection2 = boost::make_shared<FormSection>();
+ FormSection::section subSection2 = std::make_shared<FormSection>();
subSection2->setLabel("P2S3");
subSection->addChildSection(subSection2);
section->addChildSection(subSection);
@@ -101,37 +101,37 @@ class FormSerializerTest : public CppUnit::TestFixture {
void testSerializeFields() {
FormSerializer testling;
- boost::shared_ptr<Form> form(new Form(Form::FormType));
+ std::shared_ptr<Form> form(new Form(Form::FormType));
- FormField::ref field = boost::make_shared<FormField>(FormField::HiddenType, "jabber:bot");
+ FormField::ref field = std::make_shared<FormField>(FormField::HiddenType, "jabber:bot");
field->setName("FORM_TYPE");
form->addField(field);
- form->addField(boost::make_shared<FormField>(FormField::FixedType, "Section 1: Bot Info"));
+ form->addField(std::make_shared<FormField>(FormField::FixedType, "Section 1: Bot Info"));
- field = boost::make_shared<FormField>(FormField::TextSingleType);
+ field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("botname");
field->setLabel("The name of your bot");
form->addField(field);
- field = boost::make_shared<FormField>(FormField::TextMultiType);
+ field = std::make_shared<FormField>(FormField::TextMultiType);
field->setTextMultiValue("This is a bot.\nA quite good one actually");
field->setName("description");
field->setLabel("Helpful description of your bot");
form->addField(field);
- field = boost::make_shared<FormField>(FormField::BooleanType, "1");
+ field = std::make_shared<FormField>(FormField::BooleanType, "1");
field->setName("public");
field->setLabel("Public bot?");
field->setRequired(true);
form->addField(field);
- field = boost::make_shared<FormField>(FormField::TextPrivateType);
+ field = std::make_shared<FormField>(FormField::TextPrivateType);
field->setName("password");
field->setLabel("Password for special access");
form->addField(field);
- field = boost::make_shared<FormField>(FormField::ListMultiType);
+ field = std::make_shared<FormField>(FormField::ListMultiType);
field->addValue("news");
field->addValue("search");
field->setName("features");
@@ -143,7 +143,7 @@ class FormSerializerTest : public CppUnit::TestFixture {
field->addOption(FormField::Option("Search", "search"));
form->addField(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType, "20");
+ field = std::make_shared<FormField>(FormField::ListSingleType, "20");
field->setName("maxsubs");
field->setLabel("Maximum number of subscribers");
field->addOption(FormField::Option("10", "10"));
@@ -155,7 +155,7 @@ class FormSerializerTest : public CppUnit::TestFixture {
form->addField(field);
std::vector<JID> jids;
- field = boost::make_shared<FormField>(FormField::JIDMultiType);
+ field = std::make_shared<FormField>(FormField::JIDMultiType);
field->addValue("foo@bar.com");
field->addValue("baz@fum.org");
field->setName("invitelist");
@@ -204,64 +204,64 @@ class FormSerializerTest : public CppUnit::TestFixture {
void testSerializeFormItems() {
FormSerializer testling;
- boost::shared_ptr<Form> form(new Form(Form::ResultType));
+ std::shared_ptr<Form> form(new Form(Form::ResultType));
- FormField::ref field = boost::make_shared<FormField>(FormField::HiddenType, "jabber:iq:search");
+ FormField::ref field = std::make_shared<FormField>(FormField::HiddenType, "jabber:iq:search");
field->setName("FORM_TYPE");
form->addField(field);
// reported fields
- field = boost::make_shared<FormField>(FormField::TextSingleType);
+ field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("first");
field->setLabel("Given Name");
form->addReportedField(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType);
+ field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("last");
field->setLabel("Family Name");
form->addReportedField(field);
- field = boost::make_shared<FormField>(FormField::JIDSingleType);
+ field = std::make_shared<FormField>(FormField::JIDSingleType);
field->setName("jid");
field->setLabel("Jabber ID");
form->addReportedField(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType);
+ field = std::make_shared<FormField>(FormField::ListSingleType);
field->setName("x-gender");
field->setLabel("Gender");
form->addReportedField(field);
Form::FormItem firstItem;
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Benvolio");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Benvolio");
field->setName("first");
firstItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Montague");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Montague");
field->setName("last");
firstItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::JIDSingleType, JID("benvolio@montague.net"));
+ field = std::make_shared<FormField>(FormField::JIDSingleType, JID("benvolio@montague.net"));
field->setName("jid");
firstItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType, "male");
+ field = std::make_shared<FormField>(FormField::ListSingleType, "male");
field->setName("x-gender");
firstItem.push_back(field);
Form::FormItem secondItem;
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Romeo");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Romeo");
field->setName("first");
secondItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Montague");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Montague");
field->setName("last");
secondItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::JIDSingleType, JID("romeo@montague.net"));
+ field = std::make_shared<FormField>(FormField::JIDSingleType, JID("romeo@montague.net"));
field->setName("jid");
secondItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType, "male");
+ field = std::make_shared<FormField>(FormField::ListSingleType, "male");
field->setName("x-gender");
secondItem.push_back(field);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ForwardedSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ForwardedSerializerTest.cpp
index d7aed26..b0f41d4 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ForwardedSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ForwardedSerializerTest.cpp
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -32,11 +32,11 @@ class ForwardedSerializerTest : public CppUnit::TestFixture {
void testSerializeIQ() {
ForwardedSerializer serializer(&serializers);
- boost::shared_ptr<IQ> iq = IQ::createResult(JID("juliet@capulet.lit/balcony"), JID("romeo@montague.lit/orchard"), "id0");
+ std::shared_ptr<IQ> iq = IQ::createResult(JID("juliet@capulet.lit/balcony"), JID("romeo@montague.lit/orchard"), "id0");
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(iq);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
std::string expectedResult =
"<forwarded xmlns=\"urn:xmpp:forward:0\">"
@@ -50,15 +50,15 @@ class ForwardedSerializerTest : public CppUnit::TestFixture {
void testSerializeMessage() {
ForwardedSerializer serializer(&serializers);
- boost::shared_ptr<Message> message(boost::make_shared<Message>());
+ std::shared_ptr<Message> message(std::make_shared<Message>());
message->setType(Message::Chat);
message->setTo(JID("juliet@capulet.lit/balcony"));
message->setFrom(JID("romeo@montague.lit/orchard"));
message->setBody("Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.");
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(message);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
std::string expectedResult =
"<forwarded xmlns=\"urn:xmpp:forward:0\">"
@@ -74,13 +74,13 @@ class ForwardedSerializerTest : public CppUnit::TestFixture {
void testSerializeMessageNoDelay() {
ForwardedSerializer serializer(&serializers);
- boost::shared_ptr<Message> message(boost::make_shared<Message>());
+ std::shared_ptr<Message> message(std::make_shared<Message>());
message->setType(Message::Chat);
message->setTo(JID("juliet@capulet.lit/balcony"));
message->setFrom(JID("romeo@montague.lit/orchard"));
message->setBody("Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.");
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(message);
std::string expectedResult =
@@ -96,12 +96,12 @@ class ForwardedSerializerTest : public CppUnit::TestFixture {
void testSerializePresence() {
ForwardedSerializer serializer(&serializers);
- boost::shared_ptr<Presence> presence(boost::make_shared<Presence>());
+ std::shared_ptr<Presence> presence(std::make_shared<Presence>());
presence->setType(Presence::Subscribe);
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(presence);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
std::string expectedResult =
"<forwarded xmlns=\"urn:xmpp:forward:0\">"
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/IBBSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/IBBSerializerTest.cpp
index 45badea..84412c9 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/IBBSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/IBBSerializerTest.cpp
@@ -30,7 +30,7 @@ class IBBSerializerTest : public CppUnit::TestFixture
void testSerialize_data() {
IBBSerializer testling;
- boost::shared_ptr<IBB> ibb = boost::make_shared<IBB>();
+ std::shared_ptr<IBB> ibb = std::make_shared<IBB>();
ibb->setAction(IBB::Data);
ibb->setData(createByteArray("abcdefgihjklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\x0a"));
ibb->setSequenceNumber(4);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/IdleSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/IdleSerializerTest.cpp
index 147c7be..46598da 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/IdleSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/IdleSerializerTest.cpp
@@ -10,7 +10,7 @@
* See the COPYING file for more information.
*/
-#include <boost/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -29,7 +29,7 @@ class IdleSerializerTest : public CppUnit::TestFixture {
void testSerialize() {
IdleSerializer testling;
- Idle::ref idle = boost::make_shared<Idle>(stringToDateTime("1969-07-21T02:56:15Z"));
+ Idle::ref idle = std::make_shared<Idle>(stringToDateTime("1969-07-21T02:56:15Z"));
CPPUNIT_ASSERT_EQUAL(std::string("<idle xmlns='urn:xmpp:idle:1' since='1969-07-21T02:56:15Z'/>"), testling.serialize(idle));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/InBandRegistrationPayloadSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/InBandRegistrationPayloadSerializerTest.cpp
index b1b0c45..44ac7a1 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/InBandRegistrationPayloadSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/InBandRegistrationPayloadSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -22,7 +22,7 @@ class InBandRegistrationPayloadSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
InBandRegistrationPayloadSerializer testling;
- boost::shared_ptr<InBandRegistrationPayload> registration(new InBandRegistrationPayload());
+ std::shared_ptr<InBandRegistrationPayload> registration(new InBandRegistrationPayload());
registration->setRegistered(true);
std::string expectedResult =
@@ -34,13 +34,13 @@ class InBandRegistrationPayloadSerializerTest : public CppUnit::TestFixture {
}
void testSerialize_Form() {
InBandRegistrationPayloadSerializer testling;
- boost::shared_ptr<InBandRegistrationPayload> registration(new InBandRegistrationPayload());
+ std::shared_ptr<InBandRegistrationPayload> registration(new InBandRegistrationPayload());
registration->setInstructions("Use the enclosed form to register.");
- boost::shared_ptr<Form> form(new Form(Form::FormType));
+ std::shared_ptr<Form> form(new Form(Form::FormType));
form->setTitle("Contest Registration");
- FormField::ref field = boost::make_shared<FormField>(FormField::HiddenType, "jabber:iq:register");
+ FormField::ref field = std::make_shared<FormField>(FormField::HiddenType, "jabber:iq:register");
field->setName("FORM_TYPE");
form->addField(field);
registration->setForm(form);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/IsodeIQDelegationSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/IsodeIQDelegationSerializerTest.cpp
index 8f46ca8..4a466ba 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/IsodeIQDelegationSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/IsodeIQDelegationSerializerTest.cpp
@@ -41,13 +41,13 @@ class IsodeIQDelegationSerializerTest : public CppUnit::TestFixture
void testSerialize_Forwarded_IQ() {
IsodeIQDelegationSerializer testling(&serializers);
- boost::shared_ptr<IsodeIQDelegation> isodeIQDelegation = boost::make_shared<IsodeIQDelegation>();
+ std::shared_ptr<IsodeIQDelegation> isodeIQDelegation = std::make_shared<IsodeIQDelegation>();
- boost::shared_ptr<IQ> iq = IQ::createResult(JID("juliet@capulet.lit/balcony"), JID("romeo@montague.lit/orchard"), "id0", boost::make_shared<Subject>("text"));
+ std::shared_ptr<IQ> iq = IQ::createResult(JID("juliet@capulet.lit/balcony"), JID("romeo@montague.lit/orchard"), "id0", std::make_shared<Subject>("text"));
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(iq);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
isodeIQDelegation->setForward(forwarded);
CPPUNIT_ASSERT_EQUAL(std::string("<delegate xmlns=\"http://isode.com/iq_delegation\">"
@@ -60,17 +60,17 @@ class IsodeIQDelegationSerializerTest : public CppUnit::TestFixture
void testSerialize_Forwarded_Message() {
IsodeIQDelegationSerializer testling(&serializers);
- boost::shared_ptr<IsodeIQDelegation> isodeIQDelegation = boost::make_shared<IsodeIQDelegation>();
+ std::shared_ptr<IsodeIQDelegation> isodeIQDelegation = std::make_shared<IsodeIQDelegation>();
- boost::shared_ptr<Message> message(boost::make_shared<Message>());
+ std::shared_ptr<Message> message(std::make_shared<Message>());
message->setType(Message::Chat);
message->setTo(JID("juliet@capulet.lit/balcony"));
message->setFrom(JID("romeo@montague.lit/orchard"));
message->setBody("Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.");
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(message);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
isodeIQDelegation->setForward(forwarded);
CPPUNIT_ASSERT_EQUAL(std::string("<delegate xmlns=\"http://isode.com/iq_delegation\">"
@@ -85,15 +85,15 @@ class IsodeIQDelegationSerializerTest : public CppUnit::TestFixture
void testSerialize_Forwarded_MessageNoDelay() {
IsodeIQDelegationSerializer testling(&serializers);
- boost::shared_ptr<IsodeIQDelegation> isodeIQDelegation = boost::make_shared<IsodeIQDelegation>();
+ std::shared_ptr<IsodeIQDelegation> isodeIQDelegation = std::make_shared<IsodeIQDelegation>();
- boost::shared_ptr<Message> message(boost::make_shared<Message>());
+ std::shared_ptr<Message> message(std::make_shared<Message>());
message->setType(Message::Chat);
message->setTo(JID("juliet@capulet.lit/balcony"));
message->setFrom(JID("romeo@montague.lit/orchard"));
message->setBody("Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.");
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(message);
isodeIQDelegation->setForward(forwarded);
@@ -108,14 +108,14 @@ class IsodeIQDelegationSerializerTest : public CppUnit::TestFixture
void testSerialize_Forwarded_Presence() {
IsodeIQDelegationSerializer testling(&serializers);
- boost::shared_ptr<IsodeIQDelegation> isodeIQDelegation = boost::make_shared<IsodeIQDelegation>();
+ std::shared_ptr<IsodeIQDelegation> isodeIQDelegation = std::make_shared<IsodeIQDelegation>();
- boost::shared_ptr<Presence> presence(boost::make_shared<Presence>());
+ std::shared_ptr<Presence> presence(std::make_shared<Presence>());
presence->setType(Presence::Subscribe);
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(presence);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
isodeIQDelegation->setForward(forwarded);
CPPUNIT_ASSERT_EQUAL(std::string("<delegate xmlns=\"http://isode.com/iq_delegation\">"
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp
index ecb68cd..00d79b3 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/JingleSerializersTest.cpp
@@ -10,8 +10,7 @@
* See the COPYING file for more information.
*/
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -49,8 +48,8 @@ class JingleSerializersTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE_END();
- boost::shared_ptr<JinglePayloadSerializer> createTestling() {
- return boost::make_shared<JinglePayloadSerializer>(&collection);
+ std::shared_ptr<JinglePayloadSerializer> createTestling() {
+ return std::make_shared<JinglePayloadSerializer>(&collection);
}
@@ -66,7 +65,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"<range/>"
"</file>";
- StreamInitiationFileInfo::ref fileInfo = boost::make_shared<StreamInitiationFileInfo>();
+ StreamInitiationFileInfo::ref fileInfo = std::make_shared<StreamInitiationFileInfo>();
fileInfo->setDate(stringToDateTime("1969-07-21T02:56:15Z"));
fileInfo->setHash("552da749930852c69ae5d2141d3766b1");
fileInfo->setSize(1022);
@@ -74,7 +73,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
fileInfo->setDescription("This is a test. If this were a real file...");
fileInfo->setSupportsRangeRequests(true);
- boost::shared_ptr<StreamInitiationFileInfoSerializer> serializer = boost::make_shared<StreamInitiationFileInfoSerializer>();
+ std::shared_ptr<StreamInitiationFileInfoSerializer> serializer = std::make_shared<StreamInitiationFileInfoSerializer>();
CPPUNIT_ASSERT_EQUAL(expected, serializer->serializePayload(fileInfo));
}
@@ -84,12 +83,12 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"<range offset=\"270336\"/>"
"</file>";
- StreamInitiationFileInfo::ref fileInfo = boost::make_shared<StreamInitiationFileInfo>();
+ StreamInitiationFileInfo::ref fileInfo = std::make_shared<StreamInitiationFileInfo>();
fileInfo->setHash("552da749930852c69ae5d2141d3766b1");
fileInfo->setSupportsRangeRequests(true);
fileInfo->setRangeOffset(270336);
- boost::shared_ptr<StreamInitiationFileInfoSerializer> serializer = boost::make_shared<StreamInitiationFileInfoSerializer>();
+ std::shared_ptr<StreamInitiationFileInfoSerializer> serializer = std::make_shared<StreamInitiationFileInfoSerializer>();
CPPUNIT_ASSERT_EQUAL(expected, serializer->serializePayload(fileInfo));
}
@@ -110,16 +109,16 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"</content>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::SessionInitiate);
payload->setSessionID("a73sjjvkla37jfea");
payload->setInitiator(JID("romeo@montague.lit/orchard"));
- JingleIBBTransportPayload::ref transport = boost::make_shared<JingleIBBTransportPayload>();
+ JingleIBBTransportPayload::ref transport = std::make_shared<JingleIBBTransportPayload>();
transport->setBlockSize(4096);
transport->setSessionID("ch3d9s71");
- JingleContentPayload::ref content = boost::make_shared<JingleContentPayload>();
+ JingleContentPayload::ref content = std::make_shared<JingleContentPayload>();
content->setCreator(JingleContentPayload::InitiatorCreator);
content->setName("ex");
content->addTransport(transport);
@@ -143,16 +142,16 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"</content>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::TransportInfo);
payload->setInitiator(JID("romeo@montague.lit/orchard"));
payload->setSessionID("a73sjjvkla37jfea");
- JingleContentPayload::ref content = boost::make_shared<JingleContentPayload>();
+ JingleContentPayload::ref content = std::make_shared<JingleContentPayload>();
content->setCreator(JingleContentPayload::InitiatorCreator);
content->setName("ex");
- JingleIBBTransportPayload::ref transport = boost::make_shared<JingleIBBTransportPayload>();
+ JingleIBBTransportPayload::ref transport = std::make_shared<JingleIBBTransportPayload>();
transport->setBlockSize(2048);
transport->setSessionID("bt8a71h6");
@@ -172,7 +171,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"<reason><success/></reason>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::SessionTerminate);
payload->setInitiator(JID("romeo@montague.lit/orchard"));
payload->setSessionID("a73sjjvkla37jfea");
@@ -193,7 +192,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"<hash algo=\"sha-1\" xmlns=\"urn:xmpp:hashes:1\">VS2nSZMIUsaa5dIUHTdmsQ==</hash>"
"</file>"
"</description>";
- JingleFileTransferDescription::ref desc = boost::make_shared<JingleFileTransferDescription>();
+ JingleFileTransferDescription::ref desc = std::make_shared<JingleFileTransferDescription>();
JingleFileTransferFileInfo fileInfo;
fileInfo.setDate(stringToDateTime("1969-07-21T02:56:15Z"));
@@ -205,7 +204,7 @@ class JingleSerializersTest : public CppUnit::TestFixture {
desc->setFileInfo(fileInfo);
- CPPUNIT_ASSERT_EQUAL(expected, boost::make_shared<JingleFileTransferDescriptionSerializer>()->serialize(desc));
+ CPPUNIT_ASSERT_EQUAL(expected, std::make_shared<JingleFileTransferDescriptionSerializer>()->serialize(desc));
}
// http://xmpp.org/extensions/xep-0234.html#example-3
@@ -251,16 +250,16 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"</content>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::SessionAccept);
payload->setInitiator(JID("romeo@montague.lit/orchard"));
payload->setSessionID("851ba2");
- JingleContentPayload::ref content = boost::make_shared<JingleContentPayload>();
+ JingleContentPayload::ref content = std::make_shared<JingleContentPayload>();
content->setCreator(JingleContentPayload::InitiatorCreator);
content->setName("a-file-offer");
- JingleFileTransferDescription::ref description = boost::make_shared<JingleFileTransferDescription>();
+ JingleFileTransferDescription::ref description = std::make_shared<JingleFileTransferDescription>();
JingleFileTransferFileInfo fileInfo;
fileInfo.setName("test.txt");
fileInfo.setSize(1022);
@@ -293,12 +292,12 @@ class JingleSerializersTest : public CppUnit::TestFixture {
//"</content>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::TransportInfo);
payload->setInitiator(JID("romeo@montague.lit/orchard"));
payload->setSessionID("a73sjjvkla37jfea");
- JingleContentPayload::ref content = boost::make_shared<JingleContentPayload>();
+ JingleContentPayload::ref content = std::make_shared<JingleContentPayload>();
content->setCreator(JingleContentPayload::InitiatorCreator);
content->setName("ex");
payload->addPayload(content);
@@ -321,12 +320,12 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"</checksum>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::SessionInfo);
payload->setInitiator(JID("romeo@montague.lit/orchard"));
payload->setSessionID("a73sjjvkla37jfea");
- JingleFileTransferHash::ref hash = boost::make_shared<JingleFileTransferHash>();
+ JingleFileTransferHash::ref hash = std::make_shared<JingleFileTransferHash>();
hash->getFileInfo().addHash(HashElement("sha-1", Base64::decode("VS2nSZMIUsaa5dIUHTdmsQ==")));
payload->addPayload(hash);
@@ -364,16 +363,16 @@ class JingleSerializersTest : public CppUnit::TestFixture {
"</content>"
"</jingle>";
- JinglePayload::ref payload = boost::make_shared<JinglePayload>();
+ JinglePayload::ref payload = std::make_shared<JinglePayload>();
payload->setAction(JinglePayload::SessionInitiate);
payload->setInitiator(JID("romeo@montague.lit/orchard"));
payload->setSessionID("a73sjjvkla37jfea");
- JingleContentPayload::ref content = boost::make_shared<JingleContentPayload>();
+ JingleContentPayload::ref content = std::make_shared<JingleContentPayload>();
content->setCreator(JingleContentPayload::InitiatorCreator);
content->setName("ex");
- JingleS5BTransportPayload::ref transport = boost::make_shared<JingleS5BTransportPayload>();
+ JingleS5BTransportPayload::ref transport = std::make_shared<JingleS5BTransportPayload>();
transport->setMode(JingleS5BTransportPayload::TCPMode);
transport->setDstAddr("1a12fb7bc625e55f3ed5b29a53dbe0e4aa7d80ba");
transport->setSessionID("vj3hs98y");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMFinSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMFinSerializerTest.cpp
index 0eda01c..198f73c 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMFinSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMFinSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -24,7 +24,7 @@ class MAMFinSerializerTest : public CppUnit::TestFixture {
void testSerialize_XEP0313_Exmaple1() {
MAMFinSerializer serializer;
- boost::shared_ptr<MAMFin> fin = boost::make_shared<MAMFin>();
+ std::shared_ptr<MAMFin> fin = std::make_shared<MAMFin>();
fin->setQueryID("f27");
std::string expectedResult =
@@ -35,10 +35,10 @@ class MAMFinSerializerTest : public CppUnit::TestFixture {
void testSerialize_XEP0313_Exmaple9() {
MAMFinSerializer serializer;
- boost::shared_ptr<MAMFin> fin = boost::make_shared<MAMFin>();
+ std::shared_ptr<MAMFin> fin = std::make_shared<MAMFin>();
fin->setComplete(true);
- boost::shared_ptr<ResultSet> set = boost::make_shared<ResultSet>();
+ std::shared_ptr<ResultSet> set = std::make_shared<ResultSet>();
set->setFirstID(std::string("23452-4534-1"));
set->setFirstIDIndex(0);
set->setLastID(std::string("390-2342-22"));
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
index faf788d..cc46ef9 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMQuerySerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -27,22 +27,22 @@ class MAMQuerySerializerTest : public CppUnit::TestFixture {
void testSerialize() {
MAMQuerySerializer serializer;
- boost::shared_ptr<Form> parameters(boost::make_shared<Form>());
+ std::shared_ptr<Form> parameters(std::make_shared<Form>());
- boost::shared_ptr<FormField> fieldType = boost::make_shared<FormField>(FormField::TextSingleType);
+ std::shared_ptr<FormField> fieldType = std::make_shared<FormField>(FormField::TextSingleType);
fieldType->setName("FORM_TYPE");
fieldType->addValue("urn:xmpp:mam:0");
parameters->addField(fieldType);
- boost::shared_ptr<FormField> fieldStart = boost::make_shared<FormField>(FormField::TextSingleType);
+ std::shared_ptr<FormField> fieldStart = std::make_shared<FormField>(FormField::TextSingleType);
fieldStart->setName("start");
fieldStart->addValue("2010-08-07T00:00:00Z");
parameters->addField(fieldStart);
- boost::shared_ptr<ResultSet> set = boost::make_shared<ResultSet>();
+ std::shared_ptr<ResultSet> set = std::make_shared<ResultSet>();
set->setMaxItems(10);
- boost::shared_ptr<MAMQuery> query(boost::make_shared<MAMQuery>());
+ std::shared_ptr<MAMQuery> query(std::make_shared<MAMQuery>());
query->setQueryID(std::string("id0"));
query->setNode(std::string("node1"));
query->setForm(parameters);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMResultSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMResultSerializerTest.cpp
index 40ca27d..09bec39 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MAMResultSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MAMResultSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -27,17 +27,17 @@ class MAMResultSerializerTest : public CppUnit::TestFixture {
void testSerialize() {
MAMResultSerializer serializer(&serializers);
- boost::shared_ptr<Message> message(boost::make_shared<Message>());
+ std::shared_ptr<Message> message(std::make_shared<Message>());
message->setType(Message::Chat);
message->setTo(JID("juliet@capulet.lit/balcony"));
message->setFrom(JID("romeo@montague.lit/orchard"));
message->setBody("Call me but love, and I'll be new baptized; Henceforth I never will be Romeo.");
- boost::shared_ptr<Forwarded> forwarded(boost::make_shared<Forwarded>());
+ std::shared_ptr<Forwarded> forwarded(std::make_shared<Forwarded>());
forwarded->setStanza(message);
- forwarded->setDelay(boost::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
+ forwarded->setDelay(std::make_shared<Delay>(stringToDateTime(std::string("2010-07-10T23:08:25Z"))));
- boost::shared_ptr<MAMResult> result(boost::make_shared<MAMResult>());
+ std::shared_ptr<MAMResult> result(std::make_shared<MAMResult>());
result->setID("28482-98726-73623");
result->setQueryID(std::string("f27"));
result->setPayload(forwarded);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/MUCAdminPayloadSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/MUCAdminPayloadSerializerTest.cpp
index fc6b346..5aeb9dd 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/MUCAdminPayloadSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/MUCAdminPayloadSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -24,7 +24,7 @@ class MUCAdminPayloadSerializerTest : public CppUnit::TestFixture
void testSerialize() {
MUCAdminPayloadSerializer testling;
- boost::shared_ptr<MUCAdminPayload> admin = boost::make_shared<MUCAdminPayload>();
+ std::shared_ptr<MUCAdminPayload> admin = std::make_shared<MUCAdminPayload>();
MUCItem item;
item.affiliation = MUCOccupant::Owner;
item.role = MUCOccupant::Visitor;
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.cpp
index 223e7d9..d34ea38 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.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.
*/
@@ -12,7 +12,7 @@
namespace Swift {
-std::string PayloadsSerializer::serialize(boost::shared_ptr<Payload> payload) {
+std::string PayloadsSerializer::serialize(std::shared_ptr<Payload> payload) {
PayloadSerializer* serializer = serializers.getPayloadSerializer(payload);
if (serializer) {
return serializer->serialize(payload);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.h b/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.h
index 827e9da..5e0f0c5 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PayloadsSerializer.h
@@ -6,17 +6,16 @@
#pragma once
+#include <memory>
#include <string>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Elements/Payload.h>
#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h>
namespace Swift {
class PayloadsSerializer {
public:
- std::string serialize(boost::shared_ptr<Payload> payload);
+ std::string serialize(std::shared_ptr<Payload> payload);
private:
FullPayloadSerializerCollection serializers;
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PrioritySerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/PrioritySerializerTest.cpp
index 19971c2..87d7d0f 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/PrioritySerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PrioritySerializerTest.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.
*/
@@ -22,7 +22,7 @@ class PrioritySerializerTest : public CppUnit::TestFixture
void testSerialize() {
PrioritySerializer testling;
- boost::shared_ptr<Priority> priority(new Priority(-113));
+ std::shared_ptr<Priority> priority(new Priority(-113));
CPPUNIT_ASSERT_EQUAL(std::string("<priority>-113</priority>"), testling.serialize(priority));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp
index 3b115b3..4e77e7d 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp
@@ -24,8 +24,8 @@ class PrivateStorageSerializerTest : public CppUnit::TestFixture {
void testSerialize() {
PayloadsSerializer serializer;
- boost::shared_ptr<PrivateStorage> privateStorage(new PrivateStorage());
- boost::shared_ptr<Storage> storage(new Storage());
+ std::shared_ptr<PrivateStorage> privateStorage(new PrivateStorage());
+ std::shared_ptr<Storage> storage(new Storage());
Storage::Room room;
room.name = "Swift";
room.jid = JID("swift@rooms.swift.im");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemSerializerTest.cpp
index b835421..e8673b9 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -26,10 +26,10 @@ class PubSubItemSerializerTest : public CppUnit::TestFixture {
void testSerialize() {
PubSubItemSerializer serializer(&serializers);
- boost::shared_ptr<RawXMLPayload> payload(boost::make_shared<RawXMLPayload>());
+ std::shared_ptr<RawXMLPayload> payload(std::make_shared<RawXMLPayload>());
payload->setRawXML("<payload xmlns=\"tmp\"/>");
- boost::shared_ptr<PubSubItem> item(boost::make_shared<PubSubItem>());
+ std::shared_ptr<PubSubItem> item(std::make_shared<PubSubItem>());
item->addData(payload);
item->setID("pubsub-item-1");
@@ -44,7 +44,7 @@ class PubSubItemSerializerTest : public CppUnit::TestFixture {
void testSerializeEmptyID() {
PubSubItemSerializer serializer(&serializers);
- boost::shared_ptr<PubSubItem> item(boost::make_shared<PubSubItem>());
+ std::shared_ptr<PubSubItem> item(std::make_shared<PubSubItem>());
std::string expectedResult =
"<item xmlns=\"http://jabber.org/protocol/pubsub\"/>";
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemsSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemsSerializerTest.cpp
index fa99202..0194553 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemsSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PubSubItemsSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -26,21 +26,21 @@ class PubSubItemsSerializerTest : public CppUnit::TestFixture {
void testSerialize() {
PubSubItemsSerializer serializer(&serializers);
- boost::shared_ptr<RawXMLPayload> payload1(boost::make_shared<RawXMLPayload>());
+ std::shared_ptr<RawXMLPayload> payload1(std::make_shared<RawXMLPayload>());
payload1->setRawXML("<payload xmlns=\"tmp\"/>");
- boost::shared_ptr<PubSubItem> item1(boost::make_shared<PubSubItem>());
+ std::shared_ptr<PubSubItem> item1(std::make_shared<PubSubItem>());
item1->addData(payload1);
item1->setID("pubsub-item-1");
- boost::shared_ptr<RawXMLPayload> payload2(boost::make_shared<RawXMLPayload>());
+ std::shared_ptr<RawXMLPayload> payload2(std::make_shared<RawXMLPayload>());
payload2->setRawXML("<payload xmlns=\"other-tmp\"/>");
- boost::shared_ptr<PubSubItem> item2(boost::make_shared<PubSubItem>());
+ std::shared_ptr<PubSubItem> item2(std::make_shared<PubSubItem>());
item2->addData(payload2);
item2->setID("pubsub-item-2");
- boost::shared_ptr<PubSubItems> items(boost::make_shared<PubSubItems>());
+ std::shared_ptr<PubSubItems> items(std::make_shared<PubSubItems>());
items->setNode("test-node");
items->setSubscriptionID(std::string("sub-id"));
items->addItem(item1);
@@ -62,7 +62,7 @@ class PubSubItemsSerializerTest : public CppUnit::TestFixture {
void testSerializeEmptyItems() {
PubSubItemsSerializer serializer(&serializers);
- boost::shared_ptr<PubSubItems> items(boost::make_shared<PubSubItems>());
+ std::shared_ptr<PubSubItems> items(std::make_shared<PubSubItems>());
std::string expectedResult =
"<items node=\"\" xmlns=\"http://jabber.org/protocol/pubsub\"/>";
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp
index 1f40b26..4aab334 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ReplaceSerializerTest.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2012 Isode Limited.
+ * Copyright (c) 2012-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -27,7 +27,7 @@ class ReplaceSerializerTest: public CppUnit::TestFixture {
void testSerialize() {
ReplaceSerializer testling;
- boost::shared_ptr<Replace> replace(new Replace());
+ std::shared_ptr<Replace> replace(new Replace());
replace->setID("bad1");
CPPUNIT_ASSERT_EQUAL(std::string("<replace id = 'bad1' xmlns='urn:xmpp:message-correct:0'/>"), testling.serialize(replace));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp
index 9bc637f..30cd6e7 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.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 ResourceBindSerializerTest : public CppUnit::TestFixture
void testSerialize_JID() {
ResourceBindSerializer testling;
- boost::shared_ptr<ResourceBind> resourceBind(new ResourceBind());
+ std::shared_ptr<ResourceBind> resourceBind(new ResourceBind());
resourceBind->setJID(JID("somenode@example.com/someresource"));
CPPUNIT_ASSERT_EQUAL(std::string(
@@ -35,7 +35,7 @@ class ResourceBindSerializerTest : public CppUnit::TestFixture
void testSerialize_Resource() {
ResourceBindSerializer testling;
- boost::shared_ptr<ResourceBind> resourceBind(new ResourceBind());
+ std::shared_ptr<ResourceBind> resourceBind(new ResourceBind());
resourceBind->setResource("someresource");
CPPUNIT_ASSERT_EQUAL(std::string(
@@ -46,7 +46,7 @@ class ResourceBindSerializerTest : public CppUnit::TestFixture
void testSerialize_Empty() {
ResourceBindSerializer testling;
- boost::shared_ptr<ResourceBind> resourceBind(new ResourceBind());
+ std::shared_ptr<ResourceBind> resourceBind(new ResourceBind());
CPPUNIT_ASSERT_EQUAL(std::string("<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"/>"), testling.serialize(resourceBind));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ResultSetSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ResultSetSerializerTest.cpp
index 0b0163e..fecd3c5 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/ResultSetSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/ResultSetSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -28,7 +28,7 @@ class ResultSetSerializerTest : public CppUnit::TestFixture {
void testSerializeFull() {
ResultSetSerializer serializer;
- boost::shared_ptr<ResultSet> resultSet(boost::make_shared<ResultSet>());
+ std::shared_ptr<ResultSet> resultSet(std::make_shared<ResultSet>());
resultSet->setMaxItems(100);
resultSet->setCount(800);
@@ -56,7 +56,7 @@ class ResultSetSerializerTest : public CppUnit::TestFixture {
void testSerializeMaxItems() {
ResultSetSerializer serializer;
- boost::shared_ptr<ResultSet> resultSet(boost::make_shared<ResultSet>());
+ std::shared_ptr<ResultSet> resultSet(std::make_shared<ResultSet>());
resultSet->setMaxItems(100);
@@ -71,7 +71,7 @@ class ResultSetSerializerTest : public CppUnit::TestFixture {
void testSerializeEmptyBefore() {
ResultSetSerializer serializer;
- boost::shared_ptr<ResultSet> resultSet(boost::make_shared<ResultSet>());
+ std::shared_ptr<ResultSet> resultSet(std::make_shared<ResultSet>());
resultSet->setBefore(std::string());
@@ -86,7 +86,7 @@ class ResultSetSerializerTest : public CppUnit::TestFixture {
void testSerializeFirst() {
ResultSetSerializer serializer;
- boost::shared_ptr<ResultSet> resultSet(boost::make_shared<ResultSet>());
+ std::shared_ptr<ResultSet> resultSet(std::make_shared<ResultSet>());
resultSet->setFirstID(std::string("stpeter@jabber.org"));
@@ -101,7 +101,7 @@ class ResultSetSerializerTest : public CppUnit::TestFixture {
void testSerializeFirstWithIndex() {
ResultSetSerializer serializer;
- boost::shared_ptr<ResultSet> resultSet(boost::make_shared<ResultSet>());
+ std::shared_ptr<ResultSet> resultSet(std::make_shared<ResultSet>());
resultSet->setFirstID(std::string("stpeter@jabber.org"));
resultSet->setFirstIDIndex(123);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/RosterItemExchangeSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/RosterItemExchangeSerializerTest.cpp
index 65922f7..652becb 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/RosterItemExchangeSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/RosterItemExchangeSerializerTest.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,7 +28,7 @@ class RosterItemExchangeSerializerTest : public CppUnit::TestFixture
void testSerialize() {
RosterItemExchangeSerializer testling;
- boost::shared_ptr<RosterItemExchangePayload> roster(new RosterItemExchangePayload());
+ std::shared_ptr<RosterItemExchangePayload> roster(new RosterItemExchangePayload());
RosterItemExchangePayload::Item item1;
item1.setJID("foo@bar.com");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/RosterSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/RosterSerializerTest.cpp
index 6670bb8..0c576d2 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/RosterSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/RosterSerializerTest.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.
*/
@@ -22,7 +22,7 @@ class RosterSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
RosterSerializer testling;
- boost::shared_ptr<RosterPayload> roster(new RosterPayload());
+ std::shared_ptr<RosterPayload> roster(new RosterPayload());
RosterItemPayload item1;
item1.setJID(JID("foo@bar.com"));
@@ -52,7 +52,7 @@ class RosterSerializerTest : public CppUnit::TestFixture {
void testSerialize_ItemWithUnknownContent() {
RosterSerializer testling;
- boost::shared_ptr<RosterPayload> roster(new RosterPayload());
+ std::shared_ptr<RosterPayload> roster(new RosterPayload());
RosterItemPayload item;
item.setJID(JID("baz@blo.com"));
@@ -79,7 +79,7 @@ class RosterSerializerTest : public CppUnit::TestFixture {
void testSerialize_WithVersion() {
RosterSerializer testling;
- boost::shared_ptr<RosterPayload> roster(new RosterPayload());
+ std::shared_ptr<RosterPayload> roster(new RosterPayload());
roster->setVersion("ver20");
std::string expectedResult = "<query ver=\"ver20\" xmlns=\"jabber:iq:roster\"/>";
@@ -89,7 +89,7 @@ class RosterSerializerTest : public CppUnit::TestFixture {
void testSerialize_WithEmptyVersion() {
RosterSerializer testling;
- boost::shared_ptr<RosterPayload> roster(new RosterPayload());
+ std::shared_ptr<RosterPayload> roster(new RosterPayload());
roster->setVersion("");
std::string expectedResult = "<query ver=\"\" xmlns=\"jabber:iq:roster\"/>";
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/SearchPayloadSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/SearchPayloadSerializerTest.cpp
index 0dfe0b0..3deca11 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/SearchPayloadSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/SearchPayloadSerializerTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -78,64 +78,64 @@ class SearchPayloadSerializerTest : public CppUnit::TestFixture {
SearchPayloadSerializer testling;
SearchPayload::ref payload(new SearchPayload());
- boost::shared_ptr<Form> form(new Form(Form::ResultType));
+ std::shared_ptr<Form> form(new Form(Form::ResultType));
- FormField::ref field = boost::make_shared<FormField>(FormField::HiddenType, "jabber:iq:search");
+ FormField::ref field = std::make_shared<FormField>(FormField::HiddenType, "jabber:iq:search");
field->setName("FORM_TYPE");
form->addField(field);
// reported fields
- field = boost::make_shared<FormField>(FormField::TextSingleType);
+ field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("first");
field->setLabel("Given Name");
form->addReportedField(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType);
+ field = std::make_shared<FormField>(FormField::TextSingleType);
field->setName("last");
field->setLabel("Family Name");
form->addReportedField(field);
- field = boost::make_shared<FormField>(FormField::JIDSingleType);
+ field = std::make_shared<FormField>(FormField::JIDSingleType);
field->setName("jid");
field->setLabel("Jabber ID");
form->addReportedField(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType);
+ field = std::make_shared<FormField>(FormField::ListSingleType);
field->setName("x-gender");
field->setLabel("Gender");
form->addReportedField(field);
Form::FormItem firstItem;
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Benvolio");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Benvolio");
field->setName("first");
firstItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Montague");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Montague");
field->setName("last");
firstItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType, "benvolio@montague.net");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "benvolio@montague.net");
field->setName("jid");
firstItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType, "male");
+ field = std::make_shared<FormField>(FormField::ListSingleType, "male");
field->setName("x-gender");
firstItem.push_back(field);
Form::FormItem secondItem;
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Romeo");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Romeo");
field->setName("first");
secondItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType, "Montague");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "Montague");
field->setName("last");
secondItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::TextSingleType, "romeo@montague.net");
+ field = std::make_shared<FormField>(FormField::TextSingleType, "romeo@montague.net");
field->setName("jid");
secondItem.push_back(field);
- field = boost::make_shared<FormField>(FormField::ListSingleType, "male");
+ field = std::make_shared<FormField>(FormField::ListSingleType, "male");
field->setName("x-gender");
secondItem.push_back(field);
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelSerializerTest.cpp
index db482ff..6b65fd4 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelSerializerTest.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.
*/
@@ -20,7 +20,7 @@ class SecurityLabelSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
SecurityLabelSerializer testling;
- boost::shared_ptr<SecurityLabel> securityLabel(new SecurityLabel());
+ std::shared_ptr<SecurityLabel> securityLabel(new SecurityLabel());
securityLabel->setDisplayMarking("SECRET");
securityLabel->setForegroundColor("black");
securityLabel->setBackgroundColor("red");
@@ -45,7 +45,7 @@ class SecurityLabelSerializerTest : public CppUnit::TestFixture {
void testSerialize_EmptyLabel() {
SecurityLabelSerializer testling;
- boost::shared_ptr<SecurityLabel> securityLabel(new SecurityLabel());
+ std::shared_ptr<SecurityLabel> securityLabel(new SecurityLabel());
securityLabel->setDisplayMarking("SECRET");
securityLabel->setLabel("");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelsCatalogSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelsCatalogSerializerTest.cpp
index 51c98c1..c3a72a5 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelsCatalogSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/SecurityLabelsCatalogSerializerTest.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.
*/
@@ -22,13 +22,13 @@ class SecurityLabelsCatalogSerializerTest : public CppUnit::TestFixture
void testSerialize() {
SecurityLabelsCatalogSerializer testling;
- boost::shared_ptr<SecurityLabelsCatalog> catalog(new SecurityLabelsCatalog());
+ std::shared_ptr<SecurityLabelsCatalog> catalog(new SecurityLabelsCatalog());
catalog->setTo(JID("example.com"));
catalog->setName("Default");
catalog->setDescription("an example set of labels");
SecurityLabelsCatalog::Item item1;
- boost::shared_ptr<SecurityLabel> securityLabel1(new SecurityLabel());
+ std::shared_ptr<SecurityLabel> securityLabel1(new SecurityLabel());
item1.setLabel(securityLabel1);
securityLabel1->setDisplayMarking("SECRET");
securityLabel1->setForegroundColor("black");
@@ -39,7 +39,7 @@ class SecurityLabelsCatalogSerializerTest : public CppUnit::TestFixture
catalog->addItem(item1);
SecurityLabelsCatalog::Item item2;
- boost::shared_ptr<SecurityLabel> securityLabel2(new SecurityLabel());
+ std::shared_ptr<SecurityLabel> securityLabel2(new SecurityLabel());
item2.setLabel(securityLabel2);
securityLabel2->setDisplayMarking("CONFIDENTIAL");
securityLabel2->setForegroundColor("black");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/SoftwareVersionSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/SoftwareVersionSerializerTest.cpp
index 5643e1e..a20efb7 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/SoftwareVersionSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/SoftwareVersionSerializerTest.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.
*/
@@ -22,7 +22,7 @@ class SoftwareVersionSerializerTest : public CppUnit::TestFixture
void testSerialize() {
SoftwareVersionSerializer testling;
- boost::shared_ptr<SoftwareVersion> softwareVersion(new SoftwareVersion("Swift", "0.1", "Mac OS X"));
+ std::shared_ptr<SoftwareVersion> softwareVersion(new SoftwareVersion("Swift", "0.1", "Mac OS X"));
CPPUNIT_ASSERT_EQUAL(std::string("<query xmlns=\"jabber:iq:version\"><name>Swift</name><version>0.1</version><os>Mac OS X</os></query>"), testling.serialize(softwareVersion));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/StatusSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/StatusSerializerTest.cpp
index c8c2156..03a3ef5 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/StatusSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/StatusSerializerTest.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.
*/
@@ -22,7 +22,7 @@ class StatusSerializerTest : public CppUnit::TestFixture
void testSerialize() {
StatusSerializer testling;
- boost::shared_ptr<Status> status(new Status("I am away"));
+ std::shared_ptr<Status> status(new Status("I am away"));
CPPUNIT_ASSERT_EQUAL(std::string("<status>I am away</status>"), testling.serialize(status));
}
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/StatusShowSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/StatusShowSerializerTest.cpp
index 9fda49e..eb3b221 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/StatusShowSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/StatusShowSerializerTest.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.
*/
@@ -26,37 +26,37 @@ class StatusShowSerializerTest : public CppUnit::TestFixture
void testSerialize_Online() {
StatusShowSerializer testling;
- boost::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::Online));
+ std::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::Online));
CPPUNIT_ASSERT_EQUAL(std::string(""), testling.serialize(statusShow));
}
void testSerialize_Away() {
StatusShowSerializer testling;
- boost::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::Away));
+ std::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::Away));
CPPUNIT_ASSERT_EQUAL(std::string("<show>away</show>"), testling.serialize(statusShow));
}
void testSerialize_FFC() {
StatusShowSerializer testling;
- boost::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::FFC));
+ std::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::FFC));
CPPUNIT_ASSERT_EQUAL(std::string("<show>chat</show>"), testling.serialize(statusShow));
}
void testSerialize_XA() {
StatusShowSerializer testling;
- boost::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::XA));
+ std::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::XA));
CPPUNIT_ASSERT_EQUAL(std::string("<show>xa</show>"), testling.serialize(statusShow));
}
void testSerialize_DND() {
StatusShowSerializer testling;
- boost::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::DND));
+ std::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::DND));
CPPUNIT_ASSERT_EQUAL(std::string("<show>dnd</show>"), testling.serialize(statusShow));
}
void testSerialize_None() {
StatusShowSerializer testling;
- boost::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::None));
+ std::shared_ptr<StatusShow> statusShow(new StatusShow(StatusShow::None));
CPPUNIT_ASSERT_EQUAL(std::string(""), testling.serialize(statusShow));
}
};
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp
index e98ee3a..33c63cb 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp
@@ -23,7 +23,7 @@ class StorageSerializerTest : public CppUnit::TestFixture {
void testSerialize() {
PayloadsSerializer serializer;
- boost::shared_ptr<Storage> storage(new Storage());
+ std::shared_ptr<Storage> storage(new Storage());
Storage::Room room;
room.name = "Council of Oberon";
room.autoJoin = true;
@@ -51,7 +51,7 @@ class StorageSerializerTest : public CppUnit::TestFixture {
void testSerialize_NoNickOrPassword() {
PayloadsSerializer serializer;
- boost::shared_ptr<Storage> storage(new Storage());
+ std::shared_ptr<Storage> storage(new Storage());
Storage::Room room;
room.name = "Council of Oberon";
room.autoJoin = true;
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/StreamInitiationSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/StreamInitiationSerializerTest.cpp
index ada65a9..a38295c 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/StreamInitiationSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/StreamInitiationSerializerTest.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.
*/
@@ -20,7 +20,7 @@ class StreamInitiationSerializerTest : public CppUnit::TestFixture{
public:
void testSerialize_Request() {
StreamInitiationSerializer testling;
- boost::shared_ptr<StreamInitiation> streamInitiation(new StreamInitiation());
+ std::shared_ptr<StreamInitiation> streamInitiation(new StreamInitiation());
StreamInitiationFileInfo fileInfo("test.txt", "This is info about the file.", 1022);
streamInitiation->setID("a0");
streamInitiation->setFileInfo(fileInfo);
@@ -48,7 +48,7 @@ class StreamInitiationSerializerTest : public CppUnit::TestFixture{
void testSerialize_Response() {
StreamInitiationSerializer testling;
- boost::shared_ptr<StreamInitiation> streamInitiation(new StreamInitiation());
+ std::shared_ptr<StreamInitiation> streamInitiation(new StreamInitiation());
streamInitiation->setRequestedMethod("http://jabber.org/protocol/bytestreams");
CPPUNIT_ASSERT_EQUAL(std::string(
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp
index 3aed450..4c2121f 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/UserLocationSerializerTest.cpp
@@ -10,7 +10,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -31,7 +31,7 @@ class UserLocationSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize_withAllVariablesSet() {
UserLocationSerializer testling(&serializers);
- boost::shared_ptr<UserLocation> userLocation(new UserLocation());
+ std::shared_ptr<UserLocation> userLocation(new UserLocation());
userLocation->setArea(boost::optional<std::string>("Barbaric"));
userLocation->setAltitude(5.75F);
userLocation->setLocality(boost::optional<std::string>("Near"));
@@ -70,7 +70,7 @@ class UserLocationSerializerTest : public CppUnit::TestFixture {
void testSerialize_withSomeVariablesSet() {
UserLocationSerializer testling(&serializers);
- boost::shared_ptr<UserLocation> userLocation(new UserLocation());
+ std::shared_ptr<UserLocation> userLocation(new UserLocation());
userLocation->setArea(boost::optional<std::string>("Barbaric"));
userLocation->setAltitude(5.75F);
userLocation->setLocality(boost::optional<std::string>("Near"));
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/UserTuneSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/UserTuneSerializerTest.cpp
index 50f2a54..df79f0d 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/UserTuneSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/UserTuneSerializerTest.cpp
@@ -10,7 +10,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -31,7 +31,7 @@ class UserTuneSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize_withAllVariablesSet() {
UserTuneSerializer testling(&serializers);
- boost::shared_ptr<UserTune> userTune(new UserTune());
+ std::shared_ptr<UserTune> userTune(new UserTune());
userTune->setRating(5);
userTune->setTitle(boost::optional<std::string>("Minion"));
userTune->setTrack(boost::optional<std::string>("Yellow"));
@@ -49,7 +49,7 @@ class UserTuneSerializerTest : public CppUnit::TestFixture {
void testSerialize_withSomeVariablesSet() {
UserTuneSerializer testling(&serializers);
- boost::shared_ptr<UserTune> userTune(new UserTune());
+ std::shared_ptr<UserTune> userTune(new UserTune());
userTune->setTitle(boost::optional<std::string>("Minion"));
userTune->setTrack(boost::optional<std::string>("Yellow"));
userTune->setArtist(boost::optional<std::string>("Ice"));
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
index c4a8156..49402ec 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.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.
*/
@@ -20,7 +20,7 @@ class VCardSerializerTest : public CppUnit::TestFixture
public:
void testSerialize() {
VCardSerializer testling;
- boost::shared_ptr<VCard> vcard(new VCard());
+ std::shared_ptr<VCard> vcard(new VCard());
vcard->setVersion("2.0");
vcard->setFullName("Alice In Wonderland");
vcard->setPrefix("Mrs");
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardUpdateSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardUpdateSerializerTest.cpp
index ed0500a..e3fc5ff 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardUpdateSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardUpdateSerializerTest.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.
*/
@@ -22,7 +22,7 @@ class VCardUpdateSerializerTest : public CppUnit::TestFixture
void testSerialize() {
VCardUpdateSerializer testling;
- boost::shared_ptr<VCardUpdate> update(new VCardUpdate());
+ std::shared_ptr<VCardUpdate> update(new VCardUpdate());
update->setPhotoHash("sha1-hash-of-image");
std::string expectedResult =
diff --git a/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.cpp b/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.cpp
index 2383cc8..c53342c 100644
--- a/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.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.
*/
@@ -10,7 +10,7 @@
#include <Swiften/Serializer/XML/XMLElement.h>
#include <Swiften/Base/DateTime.h>
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -23,76 +23,76 @@ UserLocationSerializer::UserLocationSerializer(PayloadSerializerCollection* seri
UserLocationSerializer::~UserLocationSerializer() {
}
-std::string UserLocationSerializer::serializePayload(boost::shared_ptr<UserLocation> payload) const {
+std::string UserLocationSerializer::serializePayload(std::shared_ptr<UserLocation> payload) const {
if (!payload) {
return "";
}
XMLElement element("geoloc", "http://jabber.org/protocol/geoloc");
if (payload->getArea()) {
- element.addNode(boost::make_shared<XMLElement>("area", "", *payload->getArea()));
+ element.addNode(std::make_shared<XMLElement>("area", "", *payload->getArea()));
}
if (payload->getAltitude()) {
- element.addNode(boost::make_shared<XMLElement>("alt", "", boost::lexical_cast<std::string>(*payload->getAltitude())));
+ element.addNode(std::make_shared<XMLElement>("alt", "", boost::lexical_cast<std::string>(*payload->getAltitude())));
}
if (payload->getLocality()) {
- element.addNode(boost::make_shared<XMLElement>("locality", "", *payload->getLocality()));
+ element.addNode(std::make_shared<XMLElement>("locality", "", *payload->getLocality()));
}
if (payload->getLatitude()) {
- element.addNode(boost::make_shared<XMLElement>("lat", "", boost::lexical_cast<std::string>(*payload->getLatitude())));
+ element.addNode(std::make_shared<XMLElement>("lat", "", boost::lexical_cast<std::string>(*payload->getLatitude())));
}
if (payload->getAccuracy()) {
- element.addNode(boost::make_shared<XMLElement>("accuracy", "", boost::lexical_cast<std::string>(*payload->getAccuracy())));
+ element.addNode(std::make_shared<XMLElement>("accuracy", "", boost::lexical_cast<std::string>(*payload->getAccuracy())));
}
if (payload->getDescription()) {
- element.addNode(boost::make_shared<XMLElement>("description", "", *payload->getDescription()));
+ element.addNode(std::make_shared<XMLElement>("description", "", *payload->getDescription()));
}
if (payload->getCountryCode()) {
- element.addNode(boost::make_shared<XMLElement>("countrycode", "", *payload->getCountryCode()));
+ element.addNode(std::make_shared<XMLElement>("countrycode", "", *payload->getCountryCode()));
}
if (payload->getTimestamp()) {
- element.addNode(boost::make_shared<XMLElement>("timestamp", "", dateTimeToString(*payload->getTimestamp())));
+ element.addNode(std::make_shared<XMLElement>("timestamp", "", dateTimeToString(*payload->getTimestamp())));
}
if (payload->getFloor()) {
- element.addNode(boost::make_shared<XMLElement>("floor", "", *payload->getFloor()));
+ element.addNode(std::make_shared<XMLElement>("floor", "", *payload->getFloor()));
}
if (payload->getBuilding()) {
- element.addNode(boost::make_shared<XMLElement>("building", "", *payload->getBuilding()));
+ element.addNode(std::make_shared<XMLElement>("building", "", *payload->getBuilding()));
}
if (payload->getRoom()) {
- element.addNode(boost::make_shared<XMLElement>("room", "", *payload->getRoom()));
+ element.addNode(std::make_shared<XMLElement>("room", "", *payload->getRoom()));
}
if (payload->getCountry()) {
- element.addNode(boost::make_shared<XMLElement>("country", "", *payload->getCountry()));
+ element.addNode(std::make_shared<XMLElement>("country", "", *payload->getCountry()));
}
if (payload->getRegion()) {
- element.addNode(boost::make_shared<XMLElement>("region", "", *payload->getRegion()));
+ element.addNode(std::make_shared<XMLElement>("region", "", *payload->getRegion()));
}
if (payload->getURI()) {
- element.addNode(boost::make_shared<XMLElement>("uri", "", *payload->getURI()));
+ element.addNode(std::make_shared<XMLElement>("uri", "", *payload->getURI()));
}
if (payload->getLongitude()) {
- element.addNode(boost::make_shared<XMLElement>("lon", "", boost::lexical_cast<std::string>(*payload->getLongitude())));
+ element.addNode(std::make_shared<XMLElement>("lon", "", boost::lexical_cast<std::string>(*payload->getLongitude())));
}
if (payload->getError()) {
- element.addNode(boost::make_shared<XMLElement>("error", "", boost::lexical_cast<std::string>(*payload->getError())));
+ element.addNode(std::make_shared<XMLElement>("error", "", boost::lexical_cast<std::string>(*payload->getError())));
}
if (payload->getPostalCode()) {
- element.addNode(boost::make_shared<XMLElement>("postalcode", "", *payload->getPostalCode()));
+ element.addNode(std::make_shared<XMLElement>("postalcode", "", *payload->getPostalCode()));
}
if (payload->getBearing()) {
- element.addNode(boost::make_shared<XMLElement>("bearing", "", boost::lexical_cast<std::string>(*payload->getBearing())));
+ element.addNode(std::make_shared<XMLElement>("bearing", "", boost::lexical_cast<std::string>(*payload->getBearing())));
}
if (payload->getText()) {
- element.addNode(boost::make_shared<XMLElement>("text", "", *payload->getText()));
+ element.addNode(std::make_shared<XMLElement>("text", "", *payload->getText()));
}
if (payload->getDatum()) {
- element.addNode(boost::make_shared<XMLElement>("datum", "", *payload->getDatum()));
+ element.addNode(std::make_shared<XMLElement>("datum", "", *payload->getDatum()));
}
if (payload->getStreet()) {
- element.addNode(boost::make_shared<XMLElement>("street", "", *payload->getStreet()));
+ element.addNode(std::make_shared<XMLElement>("street", "", *payload->getStreet()));
}
if (payload->getSpeed()) {
- element.addNode(boost::make_shared<XMLElement>("speed", "", boost::lexical_cast<std::string>(*payload->getSpeed())));
+ element.addNode(std::make_shared<XMLElement>("speed", "", boost::lexical_cast<std::string>(*payload->getSpeed())));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h b/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h
index 4b17628..a7ed772 100644
--- a/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/UserLocationSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
UserLocationSerializer(PayloadSerializerCollection* serializers);
virtual ~UserLocationSerializer();
- virtual std::string serializePayload(boost::shared_ptr<UserLocation>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<UserLocation>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.cpp b/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.cpp
index eeab2b7..bbae0a3 100644
--- a/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.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.
*/
@@ -9,7 +9,7 @@
#include <Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/PayloadSerializerCollection.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -22,31 +22,31 @@ UserTuneSerializer::UserTuneSerializer(PayloadSerializerCollection* serializers)
UserTuneSerializer::~UserTuneSerializer() {
}
-std::string UserTuneSerializer::serializePayload(boost::shared_ptr<UserTune> payload) const {
+std::string UserTuneSerializer::serializePayload(std::shared_ptr<UserTune> payload) const {
if (!payload) {
return "";
}
XMLElement element("tune", "http://jabber.org/protocol/tune");
if (payload->getRating()) {
- element.addNode(boost::make_shared<XMLElement>("rating", "", boost::lexical_cast<std::string>(*payload->getRating())));
+ element.addNode(std::make_shared<XMLElement>("rating", "", boost::lexical_cast<std::string>(*payload->getRating())));
}
if (payload->getTitle()) {
- element.addNode(boost::make_shared<XMLElement>("title", "", *payload->getTitle()));
+ element.addNode(std::make_shared<XMLElement>("title", "", *payload->getTitle()));
}
if (payload->getTrack()) {
- element.addNode(boost::make_shared<XMLElement>("track", "", *payload->getTrack()));
+ element.addNode(std::make_shared<XMLElement>("track", "", *payload->getTrack()));
}
if (payload->getArtist()) {
- element.addNode(boost::make_shared<XMLElement>("artist", "", *payload->getArtist()));
+ element.addNode(std::make_shared<XMLElement>("artist", "", *payload->getArtist()));
}
if (payload->getURI()) {
- element.addNode(boost::make_shared<XMLElement>("uri", "", *payload->getURI()));
+ element.addNode(std::make_shared<XMLElement>("uri", "", *payload->getURI()));
}
if (payload->getSource()) {
- element.addNode(boost::make_shared<XMLElement>("source", "", *payload->getSource()));
+ element.addNode(std::make_shared<XMLElement>("source", "", *payload->getSource()));
}
if (payload->getLength()) {
- element.addNode(boost::make_shared<XMLElement>("length", "", boost::lexical_cast<std::string>(*payload->getLength())));
+ element.addNode(std::make_shared<XMLElement>("length", "", boost::lexical_cast<std::string>(*payload->getLength())));
}
return element.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h b/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h
index 1d3c76b..565bd71 100644
--- a/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/UserTuneSerializer.h
@@ -6,7 +6,7 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/Override.h>
@@ -21,7 +21,7 @@ namespace Swift {
UserTuneSerializer(PayloadSerializerCollection* serializers);
virtual ~UserTuneSerializer();
- virtual std::string serializePayload(boost::shared_ptr<UserTune>) const SWIFTEN_OVERRIDE;
+ virtual std::string serializePayload(std::shared_ptr<UserTune>) const SWIFTEN_OVERRIDE;
private:
diff --git a/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
index 98597e4..a1393cb 100644
--- a/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
@@ -6,8 +6,7 @@
#include <Swiften/Serializer/PayloadSerializers/VCardSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/DateTime.h>
#include <Swiften/Base/foreach.h>
@@ -21,229 +20,229 @@ namespace Swift {
VCardSerializer::VCardSerializer() : GenericPayloadSerializer<VCard>() {
}
-std::string VCardSerializer::serializePayload(boost::shared_ptr<VCard> vcard) const {
+std::string VCardSerializer::serializePayload(std::shared_ptr<VCard> vcard) const {
XMLElement queryElement("vCard", "vcard-temp");
if (!vcard->getVersion().empty()) {
- queryElement.addNode(boost::make_shared<XMLElement>("VERSION", "", vcard->getVersion()));
+ queryElement.addNode(std::make_shared<XMLElement>("VERSION", "", vcard->getVersion()));
}
if (!vcard->getFullName().empty()) {
- queryElement.addNode(boost::make_shared<XMLElement>("FN", "", vcard->getFullName()));
+ queryElement.addNode(std::make_shared<XMLElement>("FN", "", vcard->getFullName()));
}
if (!vcard->getGivenName().empty() || !vcard->getFamilyName().empty() || !vcard->getMiddleName().empty() || !vcard->getPrefix().empty() || !vcard->getSuffix().empty()) {
- boost::shared_ptr<XMLElement> nameElement(new XMLElement("N"));
+ std::shared_ptr<XMLElement> nameElement(new XMLElement("N"));
if (!vcard->getFamilyName().empty()) {
- nameElement->addNode(boost::make_shared<XMLElement>("FAMILY", "", vcard->getFamilyName()));
+ nameElement->addNode(std::make_shared<XMLElement>("FAMILY", "", vcard->getFamilyName()));
}
if (!vcard->getGivenName().empty()) {
- nameElement->addNode(boost::make_shared<XMLElement>("GIVEN", "", vcard->getGivenName()));
+ nameElement->addNode(std::make_shared<XMLElement>("GIVEN", "", vcard->getGivenName()));
}
if (!vcard->getMiddleName().empty()) {
- nameElement->addNode(boost::make_shared<XMLElement>("MIDDLE", "", vcard->getMiddleName()));
+ nameElement->addNode(std::make_shared<XMLElement>("MIDDLE", "", vcard->getMiddleName()));
}
if (!vcard->getPrefix().empty()) {
- nameElement->addNode(boost::make_shared<XMLElement>("PREFIX", "", vcard->getPrefix()));
+ nameElement->addNode(std::make_shared<XMLElement>("PREFIX", "", vcard->getPrefix()));
}
if (!vcard->getSuffix().empty()) {
- nameElement->addNode(boost::make_shared<XMLElement>("SUFFIX", "", vcard->getSuffix()));
+ nameElement->addNode(std::make_shared<XMLElement>("SUFFIX", "", vcard->getSuffix()));
}
queryElement.addNode(nameElement);
}
foreach(const VCard::EMailAddress& emailAddress, vcard->getEMailAddresses()) {
- boost::shared_ptr<XMLElement> emailElement(new XMLElement("EMAIL"));
- emailElement->addNode(boost::make_shared<XMLElement>("USERID", "", emailAddress.address));
+ std::shared_ptr<XMLElement> emailElement(new XMLElement("EMAIL"));
+ emailElement->addNode(std::make_shared<XMLElement>("USERID", "", emailAddress.address));
if (emailAddress.isHome) {
- emailElement->addNode(boost::make_shared<XMLElement>("HOME"));
+ emailElement->addNode(std::make_shared<XMLElement>("HOME"));
}
if (emailAddress.isWork) {
- emailElement->addNode(boost::make_shared<XMLElement>("WORK"));
+ emailElement->addNode(std::make_shared<XMLElement>("WORK"));
}
if (emailAddress.isInternet) {
- emailElement->addNode(boost::make_shared<XMLElement>("INTERNET"));
+ emailElement->addNode(std::make_shared<XMLElement>("INTERNET"));
}
if (emailAddress.isPreferred) {
- emailElement->addNode(boost::make_shared<XMLElement>("PREF"));
+ emailElement->addNode(std::make_shared<XMLElement>("PREF"));
}
if (emailAddress.isX400) {
- emailElement->addNode(boost::make_shared<XMLElement>("X400"));
+ emailElement->addNode(std::make_shared<XMLElement>("X400"));
}
queryElement.addNode(emailElement);
}
if (!vcard->getNickname().empty()) {
- queryElement.addNode(boost::make_shared<XMLElement>("NICKNAME", "", vcard->getNickname()));
+ queryElement.addNode(std::make_shared<XMLElement>("NICKNAME", "", vcard->getNickname()));
}
if (!vcard->getPhoto().empty() || !vcard->getPhotoType().empty()) {
XMLElement::ref photoElement(new XMLElement("PHOTO"));
if (!vcard->getPhotoType().empty()) {
- photoElement->addNode(boost::make_shared<XMLElement>("TYPE", "", vcard->getPhotoType()));
+ photoElement->addNode(std::make_shared<XMLElement>("TYPE", "", vcard->getPhotoType()));
}
if (!vcard->getPhoto().empty()) {
- photoElement->addNode(boost::make_shared<XMLElement>("BINVAL", "", Base64::encode(vcard->getPhoto())));
+ photoElement->addNode(std::make_shared<XMLElement>("BINVAL", "", Base64::encode(vcard->getPhoto())));
}
queryElement.addNode(photoElement);
}
if (!vcard->getBirthday().is_not_a_date_time()) {
- queryElement.addNode(boost::make_shared<XMLElement>("BDAY", "", dateTimeToString(vcard->getBirthday())));
+ queryElement.addNode(std::make_shared<XMLElement>("BDAY", "", dateTimeToString(vcard->getBirthday())));
}
foreach(const VCard::Telephone& telephone, vcard->getTelephones()) {
- boost::shared_ptr<XMLElement> telElement(new XMLElement("TEL"));
- telElement->addNode(boost::make_shared<XMLElement>("NUMBER", "", telephone.number));
+ std::shared_ptr<XMLElement> telElement(new XMLElement("TEL"));
+ telElement->addNode(std::make_shared<XMLElement>("NUMBER", "", telephone.number));
if (telephone.isHome) {
- telElement->addNode(boost::make_shared<XMLElement>("HOME"));
+ telElement->addNode(std::make_shared<XMLElement>("HOME"));
}
if (telephone.isWork) {
- telElement->addNode(boost::make_shared<XMLElement>("WORK"));
+ telElement->addNode(std::make_shared<XMLElement>("WORK"));
}
if (telephone.isVoice) {
- telElement->addNode(boost::make_shared<XMLElement>("VOICE"));
+ telElement->addNode(std::make_shared<XMLElement>("VOICE"));
}
if (telephone.isFax) {
- telElement->addNode(boost::make_shared<XMLElement>("FAX"));
+ telElement->addNode(std::make_shared<XMLElement>("FAX"));
}
if (telephone.isPager) {
- telElement->addNode(boost::make_shared<XMLElement>("PAGER"));
+ telElement->addNode(std::make_shared<XMLElement>("PAGER"));
}
if (telephone.isMSG) {
- telElement->addNode(boost::make_shared<XMLElement>("MSG"));
+ telElement->addNode(std::make_shared<XMLElement>("MSG"));
}
if (telephone.isCell) {
- telElement->addNode(boost::make_shared<XMLElement>("CELL"));
+ telElement->addNode(std::make_shared<XMLElement>("CELL"));
}
if (telephone.isVideo) {
- telElement->addNode(boost::make_shared<XMLElement>("VIDEO"));
+ telElement->addNode(std::make_shared<XMLElement>("VIDEO"));
}
if (telephone.isBBS) {
- telElement->addNode(boost::make_shared<XMLElement>("BBS"));
+ telElement->addNode(std::make_shared<XMLElement>("BBS"));
}
if (telephone.isModem) {
- telElement->addNode(boost::make_shared<XMLElement>("MODEM"));
+ telElement->addNode(std::make_shared<XMLElement>("MODEM"));
}
if (telephone.isISDN) {
- telElement->addNode(boost::make_shared<XMLElement>("ISDN"));
+ telElement->addNode(std::make_shared<XMLElement>("ISDN"));
}
if (telephone.isPCS) {
- telElement->addNode(boost::make_shared<XMLElement>("PCS"));
+ telElement->addNode(std::make_shared<XMLElement>("PCS"));
}
if (telephone.isPreferred) {
- telElement->addNode(boost::make_shared<XMLElement>("PREF"));
+ telElement->addNode(std::make_shared<XMLElement>("PREF"));
}
queryElement.addNode(telElement);
}
foreach(const VCard::Address& address, vcard->getAddresses()) {
- boost::shared_ptr<XMLElement> adrElement = boost::make_shared<XMLElement>("ADR");
+ std::shared_ptr<XMLElement> adrElement = std::make_shared<XMLElement>("ADR");
if (!address.poBox.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("POBOX", "", address.poBox));
+ adrElement->addNode(std::make_shared<XMLElement>("POBOX", "", address.poBox));
}
if (!address.addressExtension.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("EXTADD", "", address.addressExtension));
+ adrElement->addNode(std::make_shared<XMLElement>("EXTADD", "", address.addressExtension));
}
if (!address.street.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("STREET", "", address.street));
+ adrElement->addNode(std::make_shared<XMLElement>("STREET", "", address.street));
}
if (!address.locality.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("LOCALITY", "", address.locality));
+ adrElement->addNode(std::make_shared<XMLElement>("LOCALITY", "", address.locality));
}
if (!address.region.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("REGION", "", address.region));
+ adrElement->addNode(std::make_shared<XMLElement>("REGION", "", address.region));
}
if (!address.postalCode.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("PCODE", "", address.postalCode));
+ adrElement->addNode(std::make_shared<XMLElement>("PCODE", "", address.postalCode));
}
if (!address.country.empty()) {
- adrElement->addNode(boost::make_shared<XMLElement>("CTRY", "", address.country));
+ adrElement->addNode(std::make_shared<XMLElement>("CTRY", "", address.country));
}
if (address.isHome) {
- adrElement->addNode(boost::make_shared<XMLElement>("HOME"));
+ adrElement->addNode(std::make_shared<XMLElement>("HOME"));
}
if (address.isWork) {
- adrElement->addNode(boost::make_shared<XMLElement>("WORK"));
+ adrElement->addNode(std::make_shared<XMLElement>("WORK"));
}
if (address.isPostal) {
- adrElement->addNode(boost::make_shared<XMLElement>("POSTAL"));
+ adrElement->addNode(std::make_shared<XMLElement>("POSTAL"));
}
if (address.isParcel) {
- adrElement->addNode(boost::make_shared<XMLElement>("PARCEL"));
+ adrElement->addNode(std::make_shared<XMLElement>("PARCEL"));
}
if (address.deliveryType == VCard::DomesticDelivery) {
- adrElement->addNode(boost::make_shared<XMLElement>("DOM"));
+ adrElement->addNode(std::make_shared<XMLElement>("DOM"));
}
if (address.deliveryType == VCard::InternationalDelivery) {
- adrElement->addNode(boost::make_shared<XMLElement>("INTL"));
+ adrElement->addNode(std::make_shared<XMLElement>("INTL"));
}
if (address.isPreferred) {
- adrElement->addNode(boost::make_shared<XMLElement>("PREF"));
+ adrElement->addNode(std::make_shared<XMLElement>("PREF"));
}
queryElement.addNode(adrElement);
}
foreach(const VCard::AddressLabel& addressLabel, vcard->getAddressLabels()) {
- boost::shared_ptr<XMLElement> labelElement = boost::make_shared<XMLElement>("LABEL");
+ std::shared_ptr<XMLElement> labelElement = std::make_shared<XMLElement>("LABEL");
foreach(const std::string& line, addressLabel.lines) {
- labelElement->addNode(boost::make_shared<XMLElement>("LINE", "", line));
+ labelElement->addNode(std::make_shared<XMLElement>("LINE", "", line));
}
if (addressLabel.isHome) {
- labelElement->addNode(boost::make_shared<XMLElement>("HOME"));
+ labelElement->addNode(std::make_shared<XMLElement>("HOME"));
}
if (addressLabel.isWork) {
- labelElement->addNode(boost::make_shared<XMLElement>("WORK"));
+ labelElement->addNode(std::make_shared<XMLElement>("WORK"));
}
if (addressLabel.isPostal) {
- labelElement->addNode(boost::make_shared<XMLElement>("POSTAL"));
+ labelElement->addNode(std::make_shared<XMLElement>("POSTAL"));
}
if (addressLabel.isParcel) {
- labelElement->addNode(boost::make_shared<XMLElement>("PARCEL"));
+ labelElement->addNode(std::make_shared<XMLElement>("PARCEL"));
}
if (addressLabel.deliveryType == VCard::DomesticDelivery) {
- labelElement->addNode(boost::make_shared<XMLElement>("DOM"));
+ labelElement->addNode(std::make_shared<XMLElement>("DOM"));
}
if (addressLabel.deliveryType == VCard::InternationalDelivery) {
- labelElement->addNode(boost::make_shared<XMLElement>("INTL"));
+ labelElement->addNode(std::make_shared<XMLElement>("INTL"));
}
if (addressLabel.isPreferred) {
- labelElement->addNode(boost::make_shared<XMLElement>("PREF"));
+ labelElement->addNode(std::make_shared<XMLElement>("PREF"));
}
queryElement.addNode(labelElement);
}
foreach(const JID& jid, vcard->getJIDs()) {
- queryElement.addNode(boost::make_shared<XMLElement>("JID", "", jid.toString()));
+ queryElement.addNode(std::make_shared<XMLElement>("JID", "", jid.toString()));
}
if (!vcard->getDescription().empty()) {
- queryElement.addNode(boost::make_shared<XMLElement>("DESC", "", vcard->getDescription()));
+ queryElement.addNode(std::make_shared<XMLElement>("DESC", "", vcard->getDescription()));
}
foreach(const VCard::Organization& org, vcard->getOrganizations()) {
- boost::shared_ptr<XMLElement> orgElement = boost::make_shared<XMLElement>("ORG");
+ std::shared_ptr<XMLElement> orgElement = std::make_shared<XMLElement>("ORG");
if (!org.name.empty()) {
- orgElement->addNode(boost::make_shared<XMLElement>("ORGNAME", "", org.name));
+ orgElement->addNode(std::make_shared<XMLElement>("ORGNAME", "", org.name));
}
if (!org.units.empty()) {
foreach(const std::string& unit, org.units) {
- orgElement->addNode(boost::make_shared<XMLElement>("ORGUNIT", "", unit));
+ orgElement->addNode(std::make_shared<XMLElement>("ORGUNIT", "", unit));
}
}
queryElement.addNode(orgElement);
}
foreach(const std::string& title, vcard->getTitles()) {
- queryElement.addNode(boost::make_shared<XMLElement>("TITLE", "", title));
+ queryElement.addNode(std::make_shared<XMLElement>("TITLE", "", title));
}
foreach(const std::string& role, vcard->getRoles()) {
- queryElement.addNode(boost::make_shared<XMLElement>("ROLE", "", role));
+ queryElement.addNode(std::make_shared<XMLElement>("ROLE", "", role));
}
foreach(const std::string& url, vcard->getURLs()) {
- queryElement.addNode(boost::make_shared<XMLElement>("URL", "", url));
+ queryElement.addNode(std::make_shared<XMLElement>("URL", "", url));
}
if (!vcard->getUnknownContent().empty()) {
- queryElement.addNode(boost::make_shared<XMLRawTextNode>(vcard->getUnknownContent()));
+ queryElement.addNode(std::make_shared<XMLRawTextNode>(vcard->getUnknownContent()));
}
return queryElement.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/VCardSerializer.h b/Swiften/Serializer/PayloadSerializers/VCardSerializer.h
index e84252d..ad83f9a 100644
--- a/Swiften/Serializer/PayloadSerializers/VCardSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/VCardSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
VCardSerializer();
- virtual std::string serializePayload(boost::shared_ptr<VCard>) const;
+ virtual std::string serializePayload(std::shared_ptr<VCard>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.cpp b/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.cpp
index 8fb1e3f..607cf72 100644
--- a/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.cpp
@@ -1,13 +1,12 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/XML/XMLElement.h>
#include <Swiften/Serializer/XML/XMLTextNode.h>
@@ -17,10 +16,10 @@ namespace Swift {
VCardUpdateSerializer::VCardUpdateSerializer() : GenericPayloadSerializer<VCardUpdate>() {
}
-std::string VCardUpdateSerializer::serializePayload(boost::shared_ptr<VCardUpdate> vcardUpdate) const {
+std::string VCardUpdateSerializer::serializePayload(std::shared_ptr<VCardUpdate> vcardUpdate) const {
XMLElement updateElement("x", "vcard-temp:x:update");
- boost::shared_ptr<XMLElement> photoElement(new XMLElement("photo"));
- photoElement->addNode(boost::make_shared<XMLTextNode>(vcardUpdate->getPhotoHash()));
+ std::shared_ptr<XMLElement> photoElement(new XMLElement("photo"));
+ photoElement->addNode(std::make_shared<XMLTextNode>(vcardUpdate->getPhotoHash()));
updateElement.addNode(photoElement);
return updateElement.serialize();
}
diff --git a/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h b/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h
index 777da3e..cea8ebd 100644
--- a/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/VCardUpdateSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
VCardUpdateSerializer();
- virtual std::string serializePayload(boost::shared_ptr<VCardUpdate>) const;
+ virtual std::string serializePayload(std::shared_ptr<VCardUpdate>) const;
};
}
diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
index 27d3f57..5aebca3 100644
--- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.cpp
@@ -13,9 +13,9 @@
#include <Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h>
#include <iostream>
+#include <memory>
#include <boost/lexical_cast.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h>
#include <Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h>
@@ -24,7 +24,7 @@
namespace Swift {
void WhiteboardElementSerializingVisitor::visit(WhiteboardLineElement& line) {
- element = boost::make_shared<XMLElement>("line");
+ element = std::make_shared<XMLElement>("line");
try {
element->setAttribute("x1", boost::lexical_cast<std::string>(line.x1()));
element->setAttribute("y1", boost::lexical_cast<std::string>(line.y1()));
@@ -39,7 +39,7 @@ namespace Swift {
}
void WhiteboardElementSerializingVisitor::visit(WhiteboardFreehandPathElement& path) {
- element = boost::make_shared<XMLElement>("path");
+ element = std::make_shared<XMLElement>("path");
element->setAttribute("id", path.getID());
element->setAttribute("stroke", path.getColor().toHex());
try {
@@ -59,7 +59,7 @@ namespace Swift {
}
void WhiteboardElementSerializingVisitor::visit(WhiteboardRectElement& rect) {
- element = boost::make_shared<XMLElement>("rect");
+ element = std::make_shared<XMLElement>("rect");
try {
element->setAttribute("x", boost::lexical_cast<std::string>(rect.getX()));
element->setAttribute("y", boost::lexical_cast<std::string>(rect.getY()));
@@ -76,7 +76,7 @@ namespace Swift {
}
void WhiteboardElementSerializingVisitor::visit(WhiteboardPolygonElement& polygon) {
- element = boost::make_shared<XMLElement>("polygon");
+ element = std::make_shared<XMLElement>("polygon");
try {
element->setAttribute("id", polygon.getID());
element->setAttribute("stroke", polygon.getPenColor().toHex());
@@ -95,7 +95,7 @@ namespace Swift {
}
void WhiteboardElementSerializingVisitor::visit(WhiteboardTextElement& text) {
- element = boost::make_shared<XMLElement>("text");
+ element = std::make_shared<XMLElement>("text");
try {
element->setAttribute("x", boost::lexical_cast<std::string>(text.getX()));
element->setAttribute("y", boost::lexical_cast<std::string>(text.getY()));
@@ -103,13 +103,13 @@ namespace Swift {
element->setAttribute("id", text.getID());
element->setAttribute("fill", text.getColor().toHex());
element->setAttribute("opacity", alphaToOpacity(text.getColor().getAlpha()));
- element->addNode(boost::make_shared<XMLTextNode>(text.getText()));
+ element->addNode(std::make_shared<XMLTextNode>(text.getText()));
} catch (boost::bad_lexical_cast&) {
}
}
void WhiteboardElementSerializingVisitor::visit(WhiteboardEllipseElement& ellipse) {
- element = boost::make_shared<XMLElement>("ellipse");
+ element = std::make_shared<XMLElement>("ellipse");
try {
element->setAttribute("cx", boost::lexical_cast<std::string>(ellipse.getCX()));
element->setAttribute("cy", boost::lexical_cast<std::string>(ellipse.getCY()));
@@ -138,13 +138,13 @@ namespace Swift {
}
}
- std::string WhiteboardSerializer::serializePayload(boost::shared_ptr<WhiteboardPayload> payload) const {
+ std::string WhiteboardSerializer::serializePayload(std::shared_ptr<WhiteboardPayload> payload) const {
XMLElement element("wb", "http://swift.im/whiteboard");
if (payload->getType() == WhiteboardPayload::Data) {
- XMLElement::ref operationNode = boost::make_shared<XMLElement>("operation");
+ XMLElement::ref operationNode = std::make_shared<XMLElement>("operation");
WhiteboardElementSerializingVisitor visitor;
// payload->getElement()->accept(visitor);
- WhiteboardInsertOperation::ref insertOp = boost::dynamic_pointer_cast<WhiteboardInsertOperation>(payload->getOperation());
+ WhiteboardInsertOperation::ref insertOp = std::dynamic_pointer_cast<WhiteboardInsertOperation>(payload->getOperation());
if (insertOp) {
try {
operationNode->setAttribute("type", "insert");
@@ -156,7 +156,7 @@ namespace Swift {
insertOp->getElement()->accept(visitor);
operationNode->addNode(visitor.getResult());
}
- WhiteboardUpdateOperation::ref updateOp = boost::dynamic_pointer_cast<WhiteboardUpdateOperation>(payload->getOperation());
+ WhiteboardUpdateOperation::ref updateOp = std::dynamic_pointer_cast<WhiteboardUpdateOperation>(payload->getOperation());
if (updateOp) {
try {
operationNode->setAttribute("type", "update");
@@ -171,7 +171,7 @@ namespace Swift {
}
- WhiteboardDeleteOperation::ref deleteOp = boost::dynamic_pointer_cast<WhiteboardDeleteOperation>(payload->getOperation());
+ WhiteboardDeleteOperation::ref deleteOp = std::dynamic_pointer_cast<WhiteboardDeleteOperation>(payload->getOperation());
if (deleteOp) {
try {
operationNode->setAttribute("type", "delete");
diff --git a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h
index 70aef1e..1fde636 100644
--- a/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h
+++ b/Swiften/Serializer/PayloadSerializers/WhiteboardSerializer.h
@@ -43,7 +43,7 @@ namespace Swift {
class SWIFTEN_API WhiteboardSerializer : public GenericPayloadSerializer<WhiteboardPayload> {
public:
- std::string serializePayload(boost::shared_ptr<WhiteboardPayload> payload) const;
+ std::string serializePayload(std::shared_ptr<WhiteboardPayload> payload) const;
private:
std::string typeToString(WhiteboardPayload::Type type) const;
diff --git a/Swiften/Serializer/PresenceSerializer.cpp b/Swiften/Serializer/PresenceSerializer.cpp
index 24c4365..fc398a4 100644
--- a/Swiften/Serializer/PresenceSerializer.cpp
+++ b/Swiften/Serializer/PresenceSerializer.cpp
@@ -6,7 +6,7 @@
#include <Swiften/Serializer/PresenceSerializer.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/Log.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -19,7 +19,7 @@ PresenceSerializer::PresenceSerializer(PayloadSerializerCollection* payloadSeria
}
void PresenceSerializer::setStanzaSpecificAttributesGeneric(
- boost::shared_ptr<Presence> presence,
+ std::shared_ptr<Presence> presence,
XMLElement& element) const {
switch (presence->getType()) {
case Presence::Unavailable: element.setAttribute("type","unavailable"); break;
diff --git a/Swiften/Serializer/PresenceSerializer.h b/Swiften/Serializer/PresenceSerializer.h
index e40b9c2..b0e1a4f 100644
--- a/Swiften/Serializer/PresenceSerializer.h
+++ b/Swiften/Serializer/PresenceSerializer.h
@@ -20,7 +20,7 @@ namespace Swift {
private:
virtual void setStanzaSpecificAttributesGeneric(
- boost::shared_ptr<Presence> presence,
+ std::shared_ptr<Presence> presence,
XMLElement& element) const;
};
}
diff --git a/Swiften/Serializer/StanzaAckRequestSerializer.h b/Swiften/Serializer/StanzaAckRequestSerializer.h
index b178db1..f738231 100644
--- a/Swiften/Serializer/StanzaAckRequestSerializer.h
+++ b/Swiften/Serializer/StanzaAckRequestSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StanzaAckRequest.h>
@@ -19,7 +19,7 @@ namespace Swift {
StanzaAckRequestSerializer() : GenericElementSerializer<StanzaAckRequest>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("r", "urn:xmpp:sm:2").serialize());
}
};
diff --git a/Swiften/Serializer/StanzaAckSerializer.h b/Swiften/Serializer/StanzaAckSerializer.h
index 7ca6ab8..f5a27dc 100644
--- a/Swiften/Serializer/StanzaAckSerializer.h
+++ b/Swiften/Serializer/StanzaAckSerializer.h
@@ -6,8 +6,9 @@
#pragma once
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StanzaAck.h>
@@ -20,8 +21,8 @@ namespace Swift {
StanzaAckSerializer() : GenericElementSerializer<StanzaAck>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const {
- StanzaAck::ref stanzaAck(boost::dynamic_pointer_cast<StanzaAck>(element));
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const {
+ StanzaAck::ref stanzaAck(std::dynamic_pointer_cast<StanzaAck>(element));
assert(stanzaAck->isValid());
XMLElement result("a", "urn:xmpp:sm:2");
result.setAttribute("h", std::string(boost::lexical_cast<std::string>(stanzaAck->getHandledStanzasCount())));
diff --git a/Swiften/Serializer/StanzaSerializer.cpp b/Swiften/Serializer/StanzaSerializer.cpp
index 002f2c3..de1e8f1 100644
--- a/Swiften/Serializer/StanzaSerializer.cpp
+++ b/Swiften/Serializer/StanzaSerializer.cpp
@@ -22,7 +22,7 @@ namespace Swift {
StanzaSerializer::StanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers, const boost::optional<std::string>& explicitNS) : tag_(tag), payloadSerializers_(payloadSerializers), explicitDefaultNS_(explicitNS) {
}
-SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
+SafeByteArray StanzaSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
if (explicitDefaultNS_) {
return serialize(element, explicitDefaultNS_.get());
}
@@ -31,8 +31,8 @@ SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> ele
}
}
-SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> element, const std::string& xmlns) const {
- boost::shared_ptr<Stanza> stanza(boost::dynamic_pointer_cast<Stanza>(element));
+SafeByteArray StanzaSerializer::serialize(std::shared_ptr<ToplevelElement> element, const std::string& xmlns) const {
+ std::shared_ptr<Stanza> stanza(std::dynamic_pointer_cast<Stanza>(element));
XMLElement stanzaElement(tag_, explicitDefaultNS_ ? explicitDefaultNS_.get() : xmlns);
if (stanza->getFrom().isValid()) {
@@ -47,7 +47,7 @@ SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> ele
setStanzaSpecificAttributes(stanza, stanzaElement);
std::string serializedPayloads;
- foreach (const boost::shared_ptr<Payload>& payload, stanza->getPayloads()) {
+ foreach (const std::shared_ptr<Payload>& payload, stanza->getPayloads()) {
PayloadSerializer* serializer = payloadSerializers_->getPayloadSerializer(payload);
if (serializer) {
serializedPayloads += serializer->serialize(payload);
@@ -57,7 +57,7 @@ SafeByteArray StanzaSerializer::serialize(boost::shared_ptr<ToplevelElement> ele
}
}
if (!serializedPayloads.empty()) {
- stanzaElement.addNode(boost::shared_ptr<XMLNode>(new XMLRawTextNode(serializedPayloads)));
+ stanzaElement.addNode(std::make_shared<XMLRawTextNode>(serializedPayloads));
}
return createSafeByteArray(stanzaElement.serialize());
diff --git a/Swiften/Serializer/StanzaSerializer.h b/Swiften/Serializer/StanzaSerializer.h
index 34aab9e..b2e051c 100644
--- a/Swiften/Serializer/StanzaSerializer.h
+++ b/Swiften/Serializer/StanzaSerializer.h
@@ -22,9 +22,9 @@ namespace Swift {
public:
StanzaSerializer(const std::string& tag, PayloadSerializerCollection* payloadSerializers, const boost::optional<std::string>& explicitNS = boost::optional<std::string>());
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element, const std::string& xmlns) const;
- virtual void setStanzaSpecificAttributes(boost::shared_ptr<ToplevelElement>, XMLElement&) const = 0;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element, const std::string& xmlns) const;
+ virtual void setStanzaSpecificAttributes(std::shared_ptr<ToplevelElement>, XMLElement&) const = 0;
private:
std::string tag_;
diff --git a/Swiften/Serializer/StartTLSFailureSerializer.h b/Swiften/Serializer/StartTLSFailureSerializer.h
index f7f7296..77f904c 100644
--- a/Swiften/Serializer/StartTLSFailureSerializer.h
+++ b/Swiften/Serializer/StartTLSFailureSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StartTLSFailure.h>
@@ -19,7 +19,7 @@ namespace Swift {
StartTLSFailureSerializer() : GenericElementSerializer<StartTLSFailure>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failure", "urn:ietf:params:xml:ns:xmpp-tls").serialize());
}
};
diff --git a/Swiften/Serializer/StartTLSRequestSerializer.h b/Swiften/Serializer/StartTLSRequestSerializer.h
index cc8e3d5..ee2a76f 100644
--- a/Swiften/Serializer/StartTLSRequestSerializer.h
+++ b/Swiften/Serializer/StartTLSRequestSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StartTLSRequest.h>
@@ -19,7 +19,7 @@ namespace Swift {
StartTLSRequestSerializer() : GenericElementSerializer<StartTLSRequest>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("starttls", "urn:ietf:params:xml:ns:xmpp-tls").serialize());
}
};
diff --git a/Swiften/Serializer/StreamErrorSerializer.cpp b/Swiften/Serializer/StreamErrorSerializer.cpp
index 3cad478..66a71ca 100644
--- a/Swiften/Serializer/StreamErrorSerializer.cpp
+++ b/Swiften/Serializer/StreamErrorSerializer.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/StreamErrorSerializer.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -15,8 +15,8 @@ namespace Swift {
StreamErrorSerializer::StreamErrorSerializer() : GenericElementSerializer<StreamError>() {
}
-SafeByteArray StreamErrorSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- StreamError::ref error = boost::dynamic_pointer_cast<StreamError>(element);
+SafeByteArray StreamErrorSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ StreamError::ref error = std::dynamic_pointer_cast<StreamError>(element);
XMLElement errorElement("error", "http://etherx.jabber.org/streams");
std::string typeTag;
@@ -47,10 +47,10 @@ SafeByteArray StreamErrorSerializer::serialize(boost::shared_ptr<ToplevelElement
case StreamError::UnsupportedStanzaType: typeTag = "unsupported-stanza-type"; break;
case StreamError::UnsupportedVersion: typeTag = "unsupported-version"; break;
}
- errorElement.addNode(boost::make_shared<XMLElement>(typeTag, "urn:ietf:params:xml:ns:xmpp-streams"));
+ errorElement.addNode(std::make_shared<XMLElement>(typeTag, "urn:ietf:params:xml:ns:xmpp-streams"));
if (!error->getText().empty()) {
- errorElement.addNode(boost::make_shared<XMLElement>("text", "urn:ietf:params:xml:ns:xmpp-streams", error->getText()));
+ errorElement.addNode(std::make_shared<XMLElement>("text", "urn:ietf:params:xml:ns:xmpp-streams", error->getText()));
}
return createSafeByteArray(errorElement.serialize());
diff --git a/Swiften/Serializer/StreamErrorSerializer.h b/Swiften/Serializer/StreamErrorSerializer.h
index f578005..7277903 100644
--- a/Swiften/Serializer/StreamErrorSerializer.h
+++ b/Swiften/Serializer/StreamErrorSerializer.h
@@ -15,6 +15,6 @@ namespace Swift {
public:
StreamErrorSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> error) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> error) const;
};
}
diff --git a/Swiften/Serializer/StreamFeaturesSerializer.cpp b/Swiften/Serializer/StreamFeaturesSerializer.cpp
index ed042ec..820b96c 100644
--- a/Swiften/Serializer/StreamFeaturesSerializer.cpp
+++ b/Swiften/Serializer/StreamFeaturesSerializer.cpp
@@ -6,7 +6,7 @@
#include <Swiften/Serializer/StreamFeaturesSerializer.h>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <Swiften/Base/foreach.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -17,42 +17,42 @@ namespace Swift {
StreamFeaturesSerializer::StreamFeaturesSerializer() {
}
-SafeByteArray StreamFeaturesSerializer::serialize(boost::shared_ptr<ToplevelElement> element) const {
- boost::shared_ptr<StreamFeatures> streamFeatures(boost::dynamic_pointer_cast<StreamFeatures>(element));
+SafeByteArray StreamFeaturesSerializer::serialize(std::shared_ptr<ToplevelElement> element) const {
+ std::shared_ptr<StreamFeatures> streamFeatures(std::dynamic_pointer_cast<StreamFeatures>(element));
XMLElement streamFeaturesElement("stream:features");
if (streamFeatures->hasStartTLS()) {
- streamFeaturesElement.addNode(boost::make_shared<XMLElement>("starttls", "urn:ietf:params:xml:ns:xmpp-tls"));
+ streamFeaturesElement.addNode(std::make_shared<XMLElement>("starttls", "urn:ietf:params:xml:ns:xmpp-tls"));
}
if (!streamFeatures->getCompressionMethods().empty()) {
- boost::shared_ptr<XMLElement> compressionElement(new XMLElement("compression", "http://jabber.org/features/compress"));
+ std::shared_ptr<XMLElement> compressionElement(new XMLElement("compression", "http://jabber.org/features/compress"));
foreach(const std::string& method, streamFeatures->getCompressionMethods()) {
- boost::shared_ptr<XMLElement> methodElement(new XMLElement("method"));
- methodElement->addNode(boost::make_shared<XMLTextNode>(method));
+ std::shared_ptr<XMLElement> methodElement(new XMLElement("method"));
+ methodElement->addNode(std::make_shared<XMLTextNode>(method));
compressionElement->addNode(methodElement);
}
streamFeaturesElement.addNode(compressionElement);
}
if (!streamFeatures->getAuthenticationMechanisms().empty()) {
- boost::shared_ptr<XMLElement> mechanismsElement(new XMLElement("mechanisms", "urn:ietf:params:xml:ns:xmpp-sasl"));
+ std::shared_ptr<XMLElement> mechanismsElement(new XMLElement("mechanisms", "urn:ietf:params:xml:ns:xmpp-sasl"));
foreach(const std::string& mechanism, streamFeatures->getAuthenticationMechanisms()) {
- boost::shared_ptr<XMLElement> mechanismElement(new XMLElement("mechanism"));
- mechanismElement->addNode(boost::make_shared<XMLTextNode>(mechanism));
+ std::shared_ptr<XMLElement> mechanismElement(new XMLElement("mechanism"));
+ mechanismElement->addNode(std::make_shared<XMLTextNode>(mechanism));
mechanismsElement->addNode(mechanismElement);
}
streamFeaturesElement.addNode(mechanismsElement);
}
if (streamFeatures->hasResourceBind()) {
- streamFeaturesElement.addNode(boost::make_shared<XMLElement>("bind", "urn:ietf:params:xml:ns:xmpp-bind"));
+ streamFeaturesElement.addNode(std::make_shared<XMLElement>("bind", "urn:ietf:params:xml:ns:xmpp-bind"));
}
if (streamFeatures->hasSession()) {
- streamFeaturesElement.addNode(boost::make_shared<XMLElement>("session", "urn:ietf:params:xml:ns:xmpp-session"));
+ streamFeaturesElement.addNode(std::make_shared<XMLElement>("session", "urn:ietf:params:xml:ns:xmpp-session"));
}
if (streamFeatures->hasStreamManagement()) {
- streamFeaturesElement.addNode(boost::make_shared<XMLElement>("sm", "urn:xmpp:sm:2"));
+ streamFeaturesElement.addNode(std::make_shared<XMLElement>("sm", "urn:xmpp:sm:2"));
}
if (streamFeatures->hasRosterVersioning()) {
- streamFeaturesElement.addNode(boost::make_shared<XMLElement>("ver", "urn:xmpp:features:rosterver"));
+ streamFeaturesElement.addNode(std::make_shared<XMLElement>("ver", "urn:xmpp:features:rosterver"));
}
return createSafeByteArray(streamFeaturesElement.serialize());
}
diff --git a/Swiften/Serializer/StreamFeaturesSerializer.h b/Swiften/Serializer/StreamFeaturesSerializer.h
index f2328a5..b1cc2f7 100644
--- a/Swiften/Serializer/StreamFeaturesSerializer.h
+++ b/Swiften/Serializer/StreamFeaturesSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StreamFeatures.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
StreamFeaturesSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement> element) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement> element) const;
};
}
diff --git a/Swiften/Serializer/StreamManagementEnabledSerializer.cpp b/Swiften/Serializer/StreamManagementEnabledSerializer.cpp
index b03196c..4f4ca2e 100644
--- a/Swiften/Serializer/StreamManagementEnabledSerializer.cpp
+++ b/Swiften/Serializer/StreamManagementEnabledSerializer.cpp
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Serializer/StreamManagementEnabledSerializer.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Elements/StreamManagementEnabled.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -16,8 +16,8 @@ using namespace Swift;
StreamManagementEnabledSerializer::StreamManagementEnabledSerializer() : GenericElementSerializer<StreamManagementEnabled>() {
}
-SafeByteArray StreamManagementEnabledSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const {
- boost::shared_ptr<StreamManagementEnabled> e(boost::dynamic_pointer_cast<StreamManagementEnabled>(el));
+SafeByteArray StreamManagementEnabledSerializer::serialize(std::shared_ptr<ToplevelElement> el) const {
+ std::shared_ptr<StreamManagementEnabled> e(std::dynamic_pointer_cast<StreamManagementEnabled>(el));
XMLElement element("enabled", "urn:xmpp:sm:2");
if (!e->getResumeID().empty()) {
element.setAttribute("id", e->getResumeID());
diff --git a/Swiften/Serializer/StreamManagementEnabledSerializer.h b/Swiften/Serializer/StreamManagementEnabledSerializer.h
index 9ffe233..f139dc8 100644
--- a/Swiften/Serializer/StreamManagementEnabledSerializer.h
+++ b/Swiften/Serializer/StreamManagementEnabledSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StreamManagementEnabled.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
StreamManagementEnabledSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const;
};
}
diff --git a/Swiften/Serializer/StreamManagementFailedSerializer.h b/Swiften/Serializer/StreamManagementFailedSerializer.h
index b189bd8..29dd0ab 100644
--- a/Swiften/Serializer/StreamManagementFailedSerializer.h
+++ b/Swiften/Serializer/StreamManagementFailedSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StreamManagementFailed.h>
@@ -19,7 +19,7 @@ namespace Swift {
StreamManagementFailedSerializer() : GenericElementSerializer<StreamManagementFailed>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("failed", "urn:xmpp:sm:2").serialize());
}
};
diff --git a/Swiften/Serializer/StreamResumeSerializer.cpp b/Swiften/Serializer/StreamResumeSerializer.cpp
index c660083..619ac9c 100644
--- a/Swiften/Serializer/StreamResumeSerializer.cpp
+++ b/Swiften/Serializer/StreamResumeSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/StreamResumeSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Elements/StreamResume.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -17,8 +18,8 @@ using namespace Swift;
StreamResumeSerializer::StreamResumeSerializer() : GenericElementSerializer<StreamResume>() {
}
-SafeByteArray StreamResumeSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const {
- boost::shared_ptr<StreamResume> e(boost::dynamic_pointer_cast<StreamResume>(el));
+SafeByteArray StreamResumeSerializer::serialize(std::shared_ptr<ToplevelElement> el) const {
+ std::shared_ptr<StreamResume> e(std::dynamic_pointer_cast<StreamResume>(el));
XMLElement element("resume", "urn:xmpp:sm:2");
element.setAttribute("previd", e->getResumeID());
if (e->getHandledStanzasCount()) {
diff --git a/Swiften/Serializer/StreamResumeSerializer.h b/Swiften/Serializer/StreamResumeSerializer.h
index 5e7c58d..ad13b2b 100644
--- a/Swiften/Serializer/StreamResumeSerializer.h
+++ b/Swiften/Serializer/StreamResumeSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2011-2015 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StreamResume.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
StreamResumeSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const;
};
}
diff --git a/Swiften/Serializer/StreamResumedSerializer.cpp b/Swiften/Serializer/StreamResumedSerializer.cpp
index 9778338..5b88ded 100644
--- a/Swiften/Serializer/StreamResumedSerializer.cpp
+++ b/Swiften/Serializer/StreamResumedSerializer.cpp
@@ -6,8 +6,9 @@
#include <Swiften/Serializer/StreamResumedSerializer.h>
+#include <memory>
+
#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Elements/StreamResumed.h>
#include <Swiften/Serializer/XML/XMLElement.h>
@@ -17,8 +18,8 @@ using namespace Swift;
StreamResumedSerializer::StreamResumedSerializer() : GenericElementSerializer<StreamResumed>() {
}
-SafeByteArray StreamResumedSerializer::serialize(boost::shared_ptr<ToplevelElement> el) const {
- boost::shared_ptr<StreamResumed> e(boost::dynamic_pointer_cast<StreamResumed>(el));
+SafeByteArray StreamResumedSerializer::serialize(std::shared_ptr<ToplevelElement> el) const {
+ std::shared_ptr<StreamResumed> e(std::dynamic_pointer_cast<StreamResumed>(el));
XMLElement element("resumed", "urn:xmpp:sm:2");
element.setAttribute("previd", e->getResumeID());
if (e->getHandledStanzasCount()) {
diff --git a/Swiften/Serializer/StreamResumedSerializer.h b/Swiften/Serializer/StreamResumedSerializer.h
index 82a66d7..324282b 100644
--- a/Swiften/Serializer/StreamResumedSerializer.h
+++ b/Swiften/Serializer/StreamResumedSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2011-2015 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StreamResumed.h>
@@ -17,6 +17,6 @@ namespace Swift {
public:
StreamResumedSerializer();
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const;
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const;
};
}
diff --git a/Swiften/Serializer/TLSProceedSerializer.h b/Swiften/Serializer/TLSProceedSerializer.h
index e9af0a2..f99aefd 100644
--- a/Swiften/Serializer/TLSProceedSerializer.h
+++ b/Swiften/Serializer/TLSProceedSerializer.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/TLSProceed.h>
@@ -19,7 +19,7 @@ namespace Swift {
TLSProceedSerializer() : GenericElementSerializer<TLSProceed>() {
}
- virtual SafeByteArray serialize(boost::shared_ptr<ToplevelElement>) const {
+ virtual SafeByteArray serialize(std::shared_ptr<ToplevelElement>) const {
return createSafeByteArray(XMLElement("proceed", "urn:ietf:params:xml:ns:xmpp-tls").serialize());
}
};
diff --git a/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp
index 1d41e81..d313b42 100644
--- a/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp
+++ b/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp
@@ -24,7 +24,7 @@ class AuthChallengeSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
AuthChallengeSerializer testling;
- boost::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge());
+ std::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge());
authChallenge->setValue(createByteArray("foo"));
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
@@ -35,7 +35,7 @@ class AuthChallengeSerializerTest : public CppUnit::TestFixture {
void testSerialize_NoMessage() {
AuthChallengeSerializer testling;
- boost::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge());
+ std::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
"<challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">"
@@ -44,7 +44,7 @@ class AuthChallengeSerializerTest : public CppUnit::TestFixture {
void testSerialize_EmptyMessage() {
AuthChallengeSerializer testling;
- boost::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge());
+ std::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge());
authChallenge->setValue(std::vector<unsigned char>());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
diff --git a/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp
index 95460b2..2dc71fb 100644
--- a/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp
+++ b/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp
@@ -24,7 +24,7 @@ class AuthRequestSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
AuthRequestSerializer testling;
- boost::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN"));
+ std::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN"));
authRequest->setMessage(createSafeByteArray("foo"));
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
@@ -35,7 +35,7 @@ class AuthRequestSerializerTest : public CppUnit::TestFixture {
void testSerialize_NoMessage() {
AuthRequestSerializer testling;
- boost::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN"));
+ std::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN"));
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
"<auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"PLAIN\">"
@@ -44,7 +44,7 @@ class AuthRequestSerializerTest : public CppUnit::TestFixture {
void testSerialize_EmptyMessage() {
AuthRequestSerializer testling;
- boost::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN"));
+ std::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN"));
authRequest->setMessage(SafeByteArray());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
diff --git a/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp
index 67c6f16..1ee4b62 100644
--- a/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp
+++ b/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp
@@ -24,7 +24,7 @@ class AuthResponseSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
AuthResponseSerializer testling;
- boost::shared_ptr<AuthResponse> authResponse(new AuthResponse());
+ std::shared_ptr<AuthResponse> authResponse(new AuthResponse());
authResponse->setValue(createSafeByteArray("foo"));
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
@@ -35,7 +35,7 @@ class AuthResponseSerializerTest : public CppUnit::TestFixture {
void testSerialize_NoMessage() {
AuthResponseSerializer testling;
- boost::shared_ptr<AuthResponse> authResponse(new AuthResponse());
+ std::shared_ptr<AuthResponse> authResponse(new AuthResponse());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
"<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">"
@@ -44,7 +44,7 @@ class AuthResponseSerializerTest : public CppUnit::TestFixture {
void testSerialize_EmptyMessage() {
AuthResponseSerializer testling;
- boost::shared_ptr<AuthResponse> authResponse(new AuthResponse());
+ std::shared_ptr<AuthResponse> authResponse(new AuthResponse());
authResponse->setValue(SafeByteArray());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
diff --git a/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp
index 228bd9b..3c4bb1b 100644
--- a/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp
+++ b/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp
@@ -24,7 +24,7 @@ class AuthSuccessSerializerTest : public CppUnit::TestFixture {
public:
void testSerialize() {
AuthSuccessSerializer testling;
- boost::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess());
+ std::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess());
authSuccess->setValue(createByteArray("foo"));
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
@@ -35,7 +35,7 @@ class AuthSuccessSerializerTest : public CppUnit::TestFixture {
void testSerialize_NoMessage() {
AuthSuccessSerializer testling;
- boost::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess());
+ std::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
"<success xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">"
@@ -44,7 +44,7 @@ class AuthSuccessSerializerTest : public CppUnit::TestFixture {
void testSerialize_EmptyMessage() {
AuthSuccessSerializer testling;
- boost::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess());
+ std::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess());
authSuccess->setValue(std::vector<unsigned char>());
CPPUNIT_ASSERT_EQUAL(createSafeByteArray(
diff --git a/Swiften/Serializer/UnitTest/StreamFeaturesSerializerTest.cpp b/Swiften/Serializer/UnitTest/StreamFeaturesSerializerTest.cpp
index 5f4f821..dd3d6c3 100644
--- a/Swiften/Serializer/UnitTest/StreamFeaturesSerializerTest.cpp
+++ b/Swiften/Serializer/UnitTest/StreamFeaturesSerializerTest.cpp
@@ -24,7 +24,7 @@ class StreamFeaturesSerializerTest : public CppUnit::TestFixture
void testSerialize() {
StreamFeaturesSerializer testling;
- boost::shared_ptr<StreamFeatures> streamFeatures(new StreamFeatures());
+ std::shared_ptr<StreamFeatures> streamFeatures(new StreamFeatures());
streamFeatures->setHasStartTLS();
streamFeatures->addCompressionMethod("zlib");
streamFeatures->addCompressionMethod("lzw");
diff --git a/Swiften/Serializer/UnitTest/XMPPSerializerTest.cpp b/Swiften/Serializer/UnitTest/XMPPSerializerTest.cpp
index 3eaeef0..93205fc 100644
--- a/Swiften/Serializer/UnitTest/XMPPSerializerTest.cpp
+++ b/Swiften/Serializer/UnitTest/XMPPSerializerTest.cpp
@@ -31,7 +31,7 @@ class XMPPSerializerTest : public CppUnit::TestFixture {
}
void testSerializeHeader_Client() {
- boost::shared_ptr<XMPPSerializer> testling(createSerializer(ClientStreamType));
+ std::shared_ptr<XMPPSerializer> testling(createSerializer(ClientStreamType));
ProtocolHeader protocolHeader;
protocolHeader.setFrom("bla@foo.com");
protocolHeader.setTo("foo.com");
@@ -42,7 +42,7 @@ class XMPPSerializerTest : public CppUnit::TestFixture {
}
void testSerializeHeader_Component() {
- boost::shared_ptr<XMPPSerializer> testling(createSerializer(ComponentStreamType));
+ std::shared_ptr<XMPPSerializer> testling(createSerializer(ComponentStreamType));
ProtocolHeader protocolHeader;
protocolHeader.setFrom("bla@foo.com");
protocolHeader.setTo("foo.com");
@@ -53,7 +53,7 @@ class XMPPSerializerTest : public CppUnit::TestFixture {
}
void testSerializeHeader_Server() {
- boost::shared_ptr<XMPPSerializer> testling(createSerializer(ServerStreamType));
+ std::shared_ptr<XMPPSerializer> testling(createSerializer(ServerStreamType));
ProtocolHeader protocolHeader;
protocolHeader.setFrom("bla@foo.com");
protocolHeader.setTo("foo.com");
diff --git a/Swiften/Serializer/XML/UnitTest/XMLElementTest.cpp b/Swiften/Serializer/XML/UnitTest/XMLElementTest.cpp
index edd1b0e..ed3f8ab 100644
--- a/Swiften/Serializer/XML/UnitTest/XMLElementTest.cpp
+++ b/Swiften/Serializer/XML/UnitTest/XMLElementTest.cpp
@@ -4,7 +4,7 @@
* See the COPYING file for more information.
*/
-#include <boost/smart_ptr/make_shared.hpp>
+#include <memory>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
@@ -29,11 +29,11 @@ class XMLElementTest : public CppUnit::TestFixture
void testSerialize() {
XMLElement testling("foo", "http://example.com");
testling.setAttribute("myatt", "myval");
- boost::shared_ptr<XMLElement> barElement(new XMLElement("bar"));
- barElement->addNode(boost::make_shared<XMLTextNode>("Blo"));
+ std::shared_ptr<XMLElement> barElement(new XMLElement("bar"));
+ barElement->addNode(std::make_shared<XMLTextNode>("Blo"));
testling.addNode(barElement);
- boost::shared_ptr<XMLElement> bazElement(new XMLElement("baz"));
- bazElement->addNode(boost::make_shared<XMLTextNode>("Bli&</stream>"));
+ std::shared_ptr<XMLElement> bazElement(new XMLElement("baz"));
+ bazElement->addNode(std::make_shared<XMLTextNode>("Bli&</stream>"));
testling.addNode(bazElement);
std::string result = testling.serialize();
diff --git a/Swiften/Serializer/XML/XMLElement.cpp b/Swiften/Serializer/XML/XMLElement.cpp
index fc5e470..4a874ab 100644
--- a/Swiften/Serializer/XML/XMLElement.cpp
+++ b/Swiften/Serializer/XML/XMLElement.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.
*/
@@ -30,7 +30,7 @@ std::string XMLElement::serialize() {
if (!childNodes_.empty()) {
result += ">";
- foreach (boost::shared_ptr<XMLNode> node, childNodes_) {
+ foreach (std::shared_ptr<XMLNode> node, childNodes_) {
result += node->serialize();
}
result += "</" + tag_ + ">";
@@ -51,7 +51,7 @@ void XMLElement::setAttribute(const std::string& attribute, const std::string& v
attributes_[attribute] = escapedValue;
}
-void XMLElement::addNode(boost::shared_ptr<XMLNode> node) {
+void XMLElement::addNode(std::shared_ptr<XMLNode> node) {
if (node) {
childNodes_.push_back(node);
}
diff --git a/Swiften/Serializer/XML/XMLElement.h b/Swiften/Serializer/XML/XMLElement.h
index e7507f2..54de041 100644
--- a/Swiften/Serializer/XML/XMLElement.h
+++ b/Swiften/Serializer/XML/XMLElement.h
@@ -7,29 +7,28 @@
#pragma once
#include <map>
+#include <memory>
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Serializer/XML/XMLNode.h>
namespace Swift {
class SWIFTEN_API XMLElement : public XMLNode {
public:
- typedef boost::shared_ptr<XMLElement> ref;
+ typedef std::shared_ptr<XMLElement> ref;
XMLElement(const std::string& tag, const std::string& xmlns = "", const std::string& text = "");
void setAttribute(const std::string& attribute, const std::string& value);
- void addNode(boost::shared_ptr<XMLNode> node);
+ void addNode(std::shared_ptr<XMLNode> node);
virtual std::string serialize();
private:
std::string tag_;
std::map<std::string, std::string> attributes_;
- std::vector< boost::shared_ptr<XMLNode> > childNodes_;
+ std::vector< std::shared_ptr<XMLNode> > childNodes_;
};
}
diff --git a/Swiften/Serializer/XML/XMLTextNode.h b/Swiften/Serializer/XML/XMLTextNode.h
index b0f8d01..44970bf 100644
--- a/Swiften/Serializer/XML/XMLTextNode.h
+++ b/Swiften/Serializer/XML/XMLTextNode.h
@@ -1,12 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <Swiften/Base/API.h>
#include <Swiften/Base/String.h>
@@ -15,7 +15,7 @@
namespace Swift {
class SWIFTEN_API XMLTextNode : public XMLNode {
public:
- typedef boost::shared_ptr<XMLTextNode> ref;
+ typedef std::shared_ptr<XMLTextNode> ref;
XMLTextNode(const std::string& text) : text_(text) {
String::replaceAll(text_, '&', "&amp;"); // Should come first
diff --git a/Swiften/Serializer/XMPPSerializer.cpp b/Swiften/Serializer/XMPPSerializer.cpp
index b17e31b..8b2fd5c 100644
--- a/Swiften/Serializer/XMPPSerializer.cpp
+++ b/Swiften/Serializer/XMPPSerializer.cpp
@@ -8,9 +8,9 @@
#include <cassert>
#include <iostream>
+#include <memory>
#include <boost/bind.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/foreach.h>
#include <Swiften/Elements/ProtocolHeader.h>
@@ -41,29 +41,29 @@
namespace Swift {
XMPPSerializer::XMPPSerializer(PayloadSerializerCollection* payloadSerializers, StreamType type, bool setExplictNSonTopLevelElements) : type_(type) {
- serializers_.push_back(boost::make_shared<PresenceSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>()));
- serializers_.push_back(boost::make_shared<IQSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>()));
- serializers_.push_back(boost::make_shared<MessageSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>()));
- serializers_.push_back(boost::make_shared<CompressRequestSerializer>());
- serializers_.push_back(boost::make_shared<CompressFailureSerializer>());
- serializers_.push_back(boost::make_shared<AuthRequestSerializer>());
- serializers_.push_back(boost::make_shared<AuthFailureSerializer>());
- serializers_.push_back(boost::make_shared<AuthSuccessSerializer>());
- serializers_.push_back(boost::make_shared<AuthChallengeSerializer>());
- serializers_.push_back(boost::make_shared<AuthResponseSerializer>());
- serializers_.push_back(boost::make_shared<StartTLSRequestSerializer>());
- serializers_.push_back(boost::make_shared<StartTLSFailureSerializer>());
- serializers_.push_back(boost::make_shared<TLSProceedSerializer>());
- serializers_.push_back(boost::make_shared<StreamFeaturesSerializer>());
- serializers_.push_back(boost::make_shared<StreamErrorSerializer>());
- serializers_.push_back(boost::make_shared<EnableStreamManagementSerializer>());
- serializers_.push_back(boost::make_shared<StreamManagementEnabledSerializer>());
- serializers_.push_back(boost::make_shared<StreamManagementFailedSerializer>());
- serializers_.push_back(boost::make_shared<StreamResumeSerializer>());
- serializers_.push_back(boost::make_shared<StreamResumedSerializer>());
- serializers_.push_back(boost::make_shared<StanzaAckSerializer>());
- serializers_.push_back(boost::make_shared<StanzaAckRequestSerializer>());
- serializers_.push_back(boost::make_shared<ComponentHandshakeSerializer>());
+ serializers_.push_back(std::make_shared<PresenceSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>()));
+ serializers_.push_back(std::make_shared<IQSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>()));
+ serializers_.push_back(std::make_shared<MessageSerializer>(payloadSerializers, setExplictNSonTopLevelElements ? getDefaultNamespace() : boost::optional<std::string>()));
+ serializers_.push_back(std::make_shared<CompressRequestSerializer>());
+ serializers_.push_back(std::make_shared<CompressFailureSerializer>());
+ serializers_.push_back(std::make_shared<AuthRequestSerializer>());
+ serializers_.push_back(std::make_shared<AuthFailureSerializer>());
+ serializers_.push_back(std::make_shared<AuthSuccessSerializer>());
+ serializers_.push_back(std::make_shared<AuthChallengeSerializer>());
+ serializers_.push_back(std::make_shared<AuthResponseSerializer>());
+ serializers_.push_back(std::make_shared<StartTLSRequestSerializer>());
+ serializers_.push_back(std::make_shared<StartTLSFailureSerializer>());
+ serializers_.push_back(std::make_shared<TLSProceedSerializer>());
+ serializers_.push_back(std::make_shared<StreamFeaturesSerializer>());
+ serializers_.push_back(std::make_shared<StreamErrorSerializer>());
+ serializers_.push_back(std::make_shared<EnableStreamManagementSerializer>());
+ serializers_.push_back(std::make_shared<StreamManagementEnabledSerializer>());
+ serializers_.push_back(std::make_shared<StreamManagementFailedSerializer>());
+ serializers_.push_back(std::make_shared<StreamResumeSerializer>());
+ serializers_.push_back(std::make_shared<StreamResumedSerializer>());
+ serializers_.push_back(std::make_shared<StanzaAckSerializer>());
+ serializers_.push_back(std::make_shared<StanzaAckRequestSerializer>());
+ serializers_.push_back(std::make_shared<ComponentHandshakeSerializer>());
}
std::string XMPPSerializer::serializeHeader(const ProtocolHeader& header) const {
@@ -84,8 +84,8 @@ std::string XMPPSerializer::serializeHeader(const ProtocolHeader& header) const
return result;
}
-SafeByteArray XMPPSerializer::serializeElement(boost::shared_ptr<ToplevelElement> element) const {
- std::vector< boost::shared_ptr<ElementSerializer> >::const_iterator i = std::find_if(serializers_.begin(), serializers_.end(), boost::bind(&ElementSerializer::canSerialize, _1, element));
+SafeByteArray XMPPSerializer::serializeElement(std::shared_ptr<ToplevelElement> element) const {
+ std::vector< std::shared_ptr<ElementSerializer> >::const_iterator i = std::find_if(serializers_.begin(), serializers_.end(), boost::bind(&ElementSerializer::canSerialize, _1, element));
if (i != serializers_.end()) {
return (*i)->serialize(element);
}
diff --git a/Swiften/Serializer/XMPPSerializer.h b/Swiften/Serializer/XMPPSerializer.h
index a771fdd..8c182e3 100644
--- a/Swiften/Serializer/XMPPSerializer.h
+++ b/Swiften/Serializer/XMPPSerializer.h
@@ -6,11 +6,10 @@
#pragma once
+#include <memory>
#include <string>
#include <vector>
-#include <boost/shared_ptr.hpp>
-
#include <Swiften/Base/API.h>
#include <Swiften/Elements/StreamType.h>
#include <Swiften/Elements/ToplevelElement.h>
@@ -26,7 +25,7 @@ namespace Swift {
XMPPSerializer(PayloadSerializerCollection*, StreamType type, bool setExplictNSonTopLevelElements);
std::string serializeHeader(const ProtocolHeader&) const;
- SafeByteArray serializeElement(boost::shared_ptr<ToplevelElement> stanza) const;
+ SafeByteArray serializeElement(std::shared_ptr<ToplevelElement> stanza) const;
std::string serializeFooter() const;
private:
@@ -34,6 +33,6 @@ namespace Swift {
private:
StreamType type_;
- std::vector< boost::shared_ptr<ElementSerializer> > serializers_;
+ std::vector< std::shared_ptr<ElementSerializer> > serializers_;
};
}