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 /Slimber/Server.h
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 'Slimber/Server.h')
-rw-r--r--Slimber/Server.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/Slimber/Server.h b/Slimber/Server.h
index 7037cdb..725ad05 100644
--- a/Slimber/Server.h
+++ b/Slimber/Server.h
@@ -6,10 +6,10 @@
#pragma once
+#include <memory>
#include <vector>
#include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
#include <Swiften/Base/IDGenerator.h>
#include <Swiften/JID/JID.h>
@@ -65,26 +65,26 @@ namespace Swift {
private:
void stop(boost::optional<ServerError>);
- void handleNewClientConnection(boost::shared_ptr<Connection> c);
+ void handleNewClientConnection(std::shared_ptr<Connection> c);
void handleSessionStarted();
- void handleSessionFinished(boost::shared_ptr<ServerFromClientSession>);
- void handleElementReceived(boost::shared_ptr<ToplevelElement> element, boost::shared_ptr<ServerFromClientSession> session);
- void handleRosterChanged(boost::shared_ptr<RosterPayload> roster);
- void handlePresenceChanged(boost::shared_ptr<Presence> presence);
+ void handleSessionFinished(std::shared_ptr<ServerFromClientSession>);
+ void handleElementReceived(std::shared_ptr<ToplevelElement> element, std::shared_ptr<ServerFromClientSession> session);
+ void handleRosterChanged(std::shared_ptr<RosterPayload> roster);
+ void handlePresenceChanged(std::shared_ptr<Presence> presence);
void handleServiceRegistered(const DNSSDServiceID& service);
- void handleNewLinkLocalConnection(boost::shared_ptr<Connection> connection);
- void handleLinkLocalSessionFinished(boost::shared_ptr<Session> session);
- void handleLinkLocalElementReceived(boost::shared_ptr<ToplevelElement> element, boost::shared_ptr<Session> session);
- void handleConnectFinished(boost::shared_ptr<LinkLocalConnector> connector, bool error);
+ void handleNewLinkLocalConnection(std::shared_ptr<Connection> connection);
+ void handleLinkLocalSessionFinished(std::shared_ptr<Session> session);
+ void handleLinkLocalElementReceived(std::shared_ptr<ToplevelElement> element, std::shared_ptr<Session> session);
+ void handleConnectFinished(std::shared_ptr<LinkLocalConnector> connector, bool error);
void handleClientConnectionServerStopped(
boost::optional<BoostConnectionServer::Error>);
void handleLinkLocalConnectionServerStopped(
boost::optional<BoostConnectionServer::Error>);
- boost::shared_ptr<Session> getLinkLocalSessionForJID(const JID& jid);
- boost::shared_ptr<LinkLocalConnector> getLinkLocalConnectorForJID(const JID& jid);
- void registerLinkLocalSession(boost::shared_ptr<Session> session);
+ std::shared_ptr<Session> getLinkLocalSessionForJID(const JID& jid);
+ std::shared_ptr<LinkLocalConnector> getLinkLocalConnectorForJID(const JID& jid);
+ void registerLinkLocalSession(std::shared_ptr<Session> session);
void unregisterService();
- LinkLocalServiceInfo getLinkLocalServiceInfo(boost::shared_ptr<Presence> presence);
+ LinkLocalServiceInfo getLinkLocalServiceInfo(std::shared_ptr<Presence> presence);
private:
class DummyUserRegistry : public UserRegistry {
@@ -112,15 +112,15 @@ namespace Swift {
EventLoop* eventLoop;
LinkLocalPresenceManager* presenceManager;
bool stopping;
- boost::shared_ptr<BoostConnectionServer> serverFromClientConnectionServer;
+ std::shared_ptr<BoostConnectionServer> serverFromClientConnectionServer;
std::vector<boost::bsignals::connection> serverFromClientConnectionServerSignalConnections;
- boost::shared_ptr<ServerFromClientSession> serverFromClientSession;
- boost::shared_ptr<Presence> lastPresence;
+ std::shared_ptr<ServerFromClientSession> serverFromClientSession;
+ std::shared_ptr<Presence> lastPresence;
JID selfJID;
- boost::shared_ptr<BoostConnectionServer> serverFromNetworkConnectionServer;
+ std::shared_ptr<BoostConnectionServer> serverFromNetworkConnectionServer;
std::vector<boost::bsignals::connection> serverFromNetworkConnectionServerSignalConnections;
- std::vector< boost::shared_ptr<Session> > linkLocalSessions;
- std::vector< boost::shared_ptr<LinkLocalConnector> > connectors;
- std::vector< boost::shared_ptr<SessionTracer> > tracers;
+ std::vector< std::shared_ptr<Session> > linkLocalSessions;
+ std::vector< std::shared_ptr<LinkLocalConnector> > connectors;
+ std::vector< std::shared_ptr<SessionTracer> > tracers;
};
}