diff options
author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Slimber/Server.h | |
parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
download | swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2 |
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Slimber/Server.h')
-rw-r--r-- | Slimber/Server.h | 194 |
1 files changed, 97 insertions, 97 deletions
diff --git a/Slimber/Server.h b/Slimber/Server.h index a87381c..7037cdb 100644 --- a/Slimber/Server.h +++ b/Slimber/Server.h @@ -26,101 +26,101 @@ #include <Slimber/ServerError.h> namespace Swift { - class DNSSDServiceID; - - class VCardCollection; - class LinkLocalConnector; - class LinkLocalServiceBrowser; - class LinkLocalPresenceManager; - class BoostConnectionServer; - class SessionTracer; - class RosterPayload; - class Presence; - class EventLoop; - - class Server { - public: - Server( - int clientConnectionPort, - int linkLocalConnectionPort, - LinkLocalServiceBrowser* browser, - VCardCollection* vCardCollection, - EventLoop* eventLoop); - ~Server(); - - void start(); - void stop(); - - int getLinkLocalPort() const { - return linkLocalConnectionPort; - } - - int getClientToServerPort() const { - return clientConnectionPort; - } - - boost::signal<void (bool)> onSelfConnected; - boost::signal<void (boost::optional<ServerError>)> onStopped; - - private: - void stop(boost::optional<ServerError>); - - void handleNewClientConnection(boost::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 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 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); - void unregisterService(); - LinkLocalServiceInfo getLinkLocalServiceInfo(boost::shared_ptr<Presence> presence); - - private: - class DummyUserRegistry : public UserRegistry { - public: - DummyUserRegistry() {} - - virtual bool isValidUserPassword(const JID&, const SafeByteArray&) const { - return true; - } - }; - - private: - IDGenerator idGenerator; - FullPayloadParserFactoryCollection payloadParserFactories; - FullPayloadSerializerCollection payloadSerializers; - BoostIOServiceThread boostIOServiceThread; - DummyUserRegistry userRegistry; - PlatformXMLParserFactory xmlParserFactory; - bool linkLocalServiceRegistered; - bool rosterRequested; - int clientConnectionPort; - int linkLocalConnectionPort; - LinkLocalServiceBrowser* linkLocalServiceBrowser; - VCardCollection* vCardCollection; - EventLoop* eventLoop; - LinkLocalPresenceManager* presenceManager; - bool stopping; - boost::shared_ptr<BoostConnectionServer> serverFromClientConnectionServer; - std::vector<boost::bsignals::connection> serverFromClientConnectionServerSignalConnections; - boost::shared_ptr<ServerFromClientSession> serverFromClientSession; - boost::shared_ptr<Presence> lastPresence; - JID selfJID; - boost::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; - }; + class DNSSDServiceID; + + class VCardCollection; + class LinkLocalConnector; + class LinkLocalServiceBrowser; + class LinkLocalPresenceManager; + class BoostConnectionServer; + class SessionTracer; + class RosterPayload; + class Presence; + class EventLoop; + + class Server { + public: + Server( + int clientConnectionPort, + int linkLocalConnectionPort, + LinkLocalServiceBrowser* browser, + VCardCollection* vCardCollection, + EventLoop* eventLoop); + ~Server(); + + void start(); + void stop(); + + int getLinkLocalPort() const { + return linkLocalConnectionPort; + } + + int getClientToServerPort() const { + return clientConnectionPort; + } + + boost::signal<void (bool)> onSelfConnected; + boost::signal<void (boost::optional<ServerError>)> onStopped; + + private: + void stop(boost::optional<ServerError>); + + void handleNewClientConnection(boost::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 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 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); + void unregisterService(); + LinkLocalServiceInfo getLinkLocalServiceInfo(boost::shared_ptr<Presence> presence); + + private: + class DummyUserRegistry : public UserRegistry { + public: + DummyUserRegistry() {} + + virtual bool isValidUserPassword(const JID&, const SafeByteArray&) const { + return true; + } + }; + + private: + IDGenerator idGenerator; + FullPayloadParserFactoryCollection payloadParserFactories; + FullPayloadSerializerCollection payloadSerializers; + BoostIOServiceThread boostIOServiceThread; + DummyUserRegistry userRegistry; + PlatformXMLParserFactory xmlParserFactory; + bool linkLocalServiceRegistered; + bool rosterRequested; + int clientConnectionPort; + int linkLocalConnectionPort; + LinkLocalServiceBrowser* linkLocalServiceBrowser; + VCardCollection* vCardCollection; + EventLoop* eventLoop; + LinkLocalPresenceManager* presenceManager; + bool stopping; + boost::shared_ptr<BoostConnectionServer> serverFromClientConnectionServer; + std::vector<boost::bsignals::connection> serverFromClientConnectionServerSignalConnections; + boost::shared_ptr<ServerFromClientSession> serverFromClientSession; + boost::shared_ptr<Presence> lastPresence; + JID selfJID; + boost::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; + }; } |