diff options
author | Tobias Markmann <tm@ayena.de> | 2016-04-01 17:23:49 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-04-04 08:28:23 (GMT) |
commit | 741c45b74d5f634622eb5f757c49323274fb8937 (patch) | |
tree | b9cfa6c2fe2e79e03cc8cb7c1ca1e9cf45aa5328 /Swiften/Jingle/FakeJingleSession.h | |
parent | eddd92ed76ae68cb1e202602fd3ebd11b69191a2 (diff) | |
download | swift-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/Jingle/FakeJingleSession.h')
-rw-r--r-- | Swiften/Jingle/FakeJingleSession.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Swiften/Jingle/FakeJingleSession.h b/Swiften/Jingle/FakeJingleSession.h index 0107384..d961d1d 100644 --- a/Swiften/Jingle/FakeJingleSession.h +++ b/Swiften/Jingle/FakeJingleSession.h @@ -12,10 +12,10 @@ #pragma once +#include <memory> #include <string> #include <vector> -#include <boost/shared_ptr.hpp> #include <boost/variant.hpp> #include <Swiften/Base/API.h> @@ -45,8 +45,8 @@ namespace Swift { }; struct InfoCall { - InfoCall(boost::shared_ptr<Payload> info) : payload(info) {} - boost::shared_ptr<Payload> payload; + InfoCall(std::shared_ptr<Payload> info) : payload(info) {} + std::shared_ptr<Payload> payload; }; struct AcceptCall { @@ -83,14 +83,14 @@ namespace Swift { typedef boost::variant<InitiateCall, TerminateCall, AcceptCall, InfoCall, InfoTransportCall, AcceptTransportCall, RejectTransportCall, ReplaceTransportCall> Command; public: - typedef boost::shared_ptr<FakeJingleSession> ref; + typedef std::shared_ptr<FakeJingleSession> ref; FakeJingleSession(const JID& initiator, const std::string& id); virtual ~FakeJingleSession(); virtual void sendInitiate(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref) SWIFTEN_OVERRIDE; virtual void sendTerminate(JinglePayload::Reason::Type reason) SWIFTEN_OVERRIDE; - virtual void sendInfo(boost::shared_ptr<Payload>) SWIFTEN_OVERRIDE; + virtual void sendInfo(std::shared_ptr<Payload>) SWIFTEN_OVERRIDE; virtual void sendAccept(const JingleContentID&, JingleDescription::ref, JingleTransportPayload::ref = JingleTransportPayload::ref()) SWIFTEN_OVERRIDE; virtual std::string sendTransportInfo(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE; virtual void sendTransportAccept(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE; @@ -98,13 +98,13 @@ namespace Swift { virtual void sendTransportReplace(const JingleContentID&, JingleTransportPayload::ref) SWIFTEN_OVERRIDE; void handleSessionTerminateReceived(boost::optional<JinglePayload::Reason>); - void handleSessionAcceptReceived(const JingleContentID&, boost::shared_ptr<JingleDescription>, boost::shared_ptr<JingleTransportPayload>); - void handleSessionInfoReceived(boost::shared_ptr<JinglePayload>); + void handleSessionAcceptReceived(const JingleContentID&, std::shared_ptr<JingleDescription>, std::shared_ptr<JingleTransportPayload>); + void handleSessionInfoReceived(std::shared_ptr<JinglePayload>); void handleTransportReplaceReceived(const JingleContentID&, JingleTransportPayload::ref); - void handleTransportAcceptReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>); - void handleTransportInfoReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>); - void handleTransportRejectReceived(const JingleContentID&, boost::shared_ptr<JingleTransportPayload>); + void handleTransportAcceptReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>); + void handleTransportInfoReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>); + void handleTransportRejectReceived(const JingleContentID&, std::shared_ptr<JingleTransportPayload>); void handleTransportInfoAcknowledged(const std::string& id); public: |