diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-06-18 10:34:41 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-06-18 10:41:11 (GMT) |
commit | 362b2d147e4050e997104c24b2ed2e818adab5ed (patch) | |
tree | 63340cf49072e2cc0d9d876859249eb22fd540d3 | |
parent | 0328d98d29b383ecfcb5ffb66df0a9b7b4d85654 (diff) | |
parent | 7af8a078c57d94ff63eb81f26de2f55eca6b5c00 (diff) | |
download | swift-362b2d147e4050e997104c24b2ed2e818adab5ed.zip swift-362b2d147e4050e997104c24b2ed2e818adab5ed.tar.bz2 |
Merge branch 'swift-1.x'
* swift-1.x:
Moving unused server code out of Swiften into Limber.
Conflicts:
Limber/Server/ServerFromClientSession.cpp
Limber/Server/ServerSession.cpp
Limber/Server/ServerStanzaRouter.cpp
Limber/Server/SimpleUserRegistry.cpp
Limber/Server/SimpleUserRegistry.h
Limber/Server/UnitTest/ServerStanzaRouterTest.cpp
Limber/Server/UserRegistry.cpp
Limber/main.cpp
Slimber/Server.cpp
Slimber/Server.h
-rw-r--r-- | Limber/SConscript | 25 | ||||
-rw-r--r-- | Limber/Server/ServerFromClientSession.cpp (renamed from Swiften/Server/ServerFromClientSession.cpp) | 26 | ||||
-rw-r--r-- | Limber/Server/ServerFromClientSession.h (renamed from Swiften/Server/ServerFromClientSession.h) | 0 | ||||
-rw-r--r-- | Limber/Server/ServerSession.cpp (renamed from Swiften/Server/ServerSession.cpp) | 2 | ||||
-rw-r--r-- | Limber/Server/ServerSession.h (renamed from Swiften/Server/ServerSession.h) | 0 | ||||
-rw-r--r-- | Limber/Server/ServerStanzaRouter.cpp (renamed from Swiften/Server/ServerStanzaRouter.cpp) | 6 | ||||
-rw-r--r-- | Limber/Server/ServerStanzaRouter.h (renamed from Swiften/Server/ServerStanzaRouter.h) | 0 | ||||
-rw-r--r-- | Limber/Server/SimpleUserRegistry.cpp (renamed from Swiften/Server/SimpleUserRegistry.cpp) | 2 | ||||
-rw-r--r-- | Limber/Server/SimpleUserRegistry.h (renamed from Swiften/Server/SimpleUserRegistry.h) | 2 | ||||
-rw-r--r-- | Limber/Server/UnitTest/ServerStanzaRouterTest.cpp (renamed from Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp) | 6 | ||||
-rw-r--r-- | Limber/Server/UserRegistry.cpp (renamed from Swiften/Server/UserRegistry.cpp) | 2 | ||||
-rw-r--r-- | Limber/Server/UserRegistry.h (renamed from Swiften/Server/UserRegistry.h) | 0 | ||||
-rw-r--r-- | Limber/main.cpp | 32 | ||||
-rw-r--r-- | QA/UnitTest/SConscript | 1 | ||||
-rw-r--r-- | Slimber/CLI/SConscript | 1 | ||||
-rw-r--r-- | Slimber/Cocoa/SConscript | 1 | ||||
-rw-r--r-- | Slimber/SConscript | 1 | ||||
-rw-r--r-- | Slimber/Server.cpp | 30 | ||||
-rw-r--r-- | Slimber/Server.h | 18 | ||||
-rw-r--r-- | Swiften/SConscript | 5 |
20 files changed, 90 insertions, 70 deletions
diff --git a/Limber/SConscript b/Limber/SConscript index e2fadac..bc05f7f 100644 --- a/Limber/SConscript +++ b/Limber/SConscript @@ -1,8 +1,26 @@ Import("env") -if env["SCONS_STAGE"] == "build" : +if env["SCONS_STAGE"] == "flags" : + env["LIMBER_FLAGS"] = { + "LIBPATH": [Dir(".")], + "LIBS": ["Limber"], + } + +elif env["SCONS_STAGE"] == "build" : + libenv = env.Clone() + libenv.MergeFlags(env["BOOST_FLAGS"]) + libenv.MergeFlags(env["SWIFTEN_FLAGS"]) + libenv.StaticLibrary("Limber", [ + "Server/ServerFromClientSession.cpp", + "Server/ServerSession.cpp", + "Server/ServerStanzaRouter.cpp", + "Server/SimpleUserRegistry.cpp", + "Server/UserRegistry.cpp", + ]) + myenv = env.Clone() myenv.BuildVersion("BuildVersion.h", project = "limber") + myenv.UseFlags(env["LIMBER_FLAGS"]) myenv.UseFlags(env["SWIFTEN_FLAGS"]) myenv.UseFlags(env["LIBIDN_FLAGS"]) myenv.UseFlags(env.get("LIBXML_FLAGS", "")) @@ -10,5 +28,8 @@ if env["SCONS_STAGE"] == "build" : myenv.UseFlags(env["OPENSSL_FLAGS"]) myenv.UseFlags(env["BOOST_FLAGS"]) myenv.UseFlags(myenv["PLATFORM_FLAGS"]) - myenv.Program("limber", ["main.cpp"]) + + env.Append(UNITTEST_SOURCES = [ + File("Server/UnitTest/ServerStanzaRouterTest.cpp"), + ]) diff --git a/Swiften/Server/ServerFromClientSession.cpp b/Limber/Server/ServerFromClientSession.cpp index dbe9745..3a37c65 100644 --- a/Swiften/Server/ServerFromClientSession.cpp +++ b/Limber/Server/ServerFromClientSession.cpp @@ -4,22 +4,22 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#include <Swiften/Server/ServerFromClientSession.h> +#include "Limber/Server/ServerFromClientSession.h" #include <boost/bind.hpp> -#include <Swiften/Elements/ProtocolHeader.h> -#include <Swiften/Server/UserRegistry.h> -#include <Swiften/Network/Connection.h> -#include <Swiften/StreamStack/XMPPLayer.h> -#include <Swiften/Elements/StreamFeatures.h> -#include <Swiften/Elements/ResourceBind.h> -#include <Swiften/Elements/StartSession.h> -#include <Swiften/Elements/IQ.h> -#include <Swiften/Elements/AuthSuccess.h> -#include <Swiften/Elements/AuthFailure.h> -#include <Swiften/Elements/AuthRequest.h> -#include <Swiften/SASL/PLAINMessage.h> +#include "Swiften/Elements/ProtocolHeader.h" +#include "Limber/Server/UserRegistry.h" +#include "Swiften/Network/Connection.h" +#include "Swiften/StreamStack/XMPPLayer.h" +#include "Swiften/Elements/StreamFeatures.h" +#include "Swiften/Elements/ResourceBind.h" +#include "Swiften/Elements/StartSession.h" +#include "Swiften/Elements/IQ.h" +#include "Swiften/Elements/AuthSuccess.h" +#include "Swiften/Elements/AuthFailure.h" +#include "Swiften/Elements/AuthRequest.h" +#include "Swiften/SASL/PLAINMessage.h" namespace Swift { diff --git a/Swiften/Server/ServerFromClientSession.h b/Limber/Server/ServerFromClientSession.h index 1a0e109..1a0e109 100644 --- a/Swiften/Server/ServerFromClientSession.h +++ b/Limber/Server/ServerFromClientSession.h diff --git a/Swiften/Server/ServerSession.cpp b/Limber/Server/ServerSession.cpp index eb031f2..5b6d66a 100644 --- a/Swiften/Server/ServerSession.cpp +++ b/Limber/Server/ServerSession.cpp @@ -4,7 +4,7 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#include <Swiften/Server/ServerSession.h> +#include "Limber/Server/ServerSession.h" namespace Swift { diff --git a/Swiften/Server/ServerSession.h b/Limber/Server/ServerSession.h index 486ebaa..486ebaa 100644 --- a/Swiften/Server/ServerSession.h +++ b/Limber/Server/ServerSession.h diff --git a/Swiften/Server/ServerStanzaRouter.cpp b/Limber/Server/ServerStanzaRouter.cpp index 1725359..ea695e3 100644 --- a/Swiften/Server/ServerStanzaRouter.cpp +++ b/Limber/Server/ServerStanzaRouter.cpp @@ -4,12 +4,12 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#include <Swiften/Server/ServerStanzaRouter.h> -#include <Swiften/Server/ServerSession.h> -#include <Swiften/Base/Algorithm.h> +#include "Limber/Server/ServerStanzaRouter.h" +#include "Limber/Server/ServerSession.h" #include <cassert> #include <algorithm> +#include <Swiften/Base/Algorithm.h> namespace Swift { diff --git a/Swiften/Server/ServerStanzaRouter.h b/Limber/Server/ServerStanzaRouter.h index 4a9493b..4a9493b 100644 --- a/Swiften/Server/ServerStanzaRouter.h +++ b/Limber/Server/ServerStanzaRouter.h diff --git a/Swiften/Server/SimpleUserRegistry.cpp b/Limber/Server/SimpleUserRegistry.cpp index a519ac2..9ae6fd5 100644 --- a/Swiften/Server/SimpleUserRegistry.cpp +++ b/Limber/Server/SimpleUserRegistry.cpp @@ -4,7 +4,7 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#include <Swiften/Server/SimpleUserRegistry.h> +#include "Limber/Server/SimpleUserRegistry.h" namespace Swift { diff --git a/Swiften/Server/SimpleUserRegistry.h b/Limber/Server/SimpleUserRegistry.h index 324c099..280bfce 100644 --- a/Swiften/Server/SimpleUserRegistry.h +++ b/Limber/Server/SimpleUserRegistry.h @@ -10,7 +10,7 @@ #include <Swiften/JID/JID.h> #include <string> -#include <Swiften/Server/UserRegistry.h> +#include "Limber/Server/UserRegistry.h" namespace Swift { diff --git a/Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp b/Limber/Server/UnitTest/ServerStanzaRouterTest.cpp index 0941665..87c713e 100644 --- a/Swiften/Server/UnitTest/ServerStanzaRouterTest.cpp +++ b/Limber/Server/UnitTest/ServerStanzaRouterTest.cpp @@ -7,9 +7,9 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> -#include <Swiften/Elements/Message.h> -#include <Swiften/Server/ServerStanzaRouter.h> -#include <Swiften/Server/ServerSession.h> +#include "Swiften/Elements/Message.h" +#include "Limber/Server/ServerStanzaRouter.h" +#include "Limber/Server/ServerSession.h" using namespace Swift; diff --git a/Swiften/Server/UserRegistry.cpp b/Limber/Server/UserRegistry.cpp index 60bbb33..5ac462a 100644 --- a/Swiften/Server/UserRegistry.cpp +++ b/Limber/Server/UserRegistry.cpp @@ -4,7 +4,7 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#include <Swiften/Server/UserRegistry.h> +#include "Limber/Server/UserRegistry.h" namespace Swift { diff --git a/Swiften/Server/UserRegistry.h b/Limber/Server/UserRegistry.h index 9584a7e..9584a7e 100644 --- a/Swiften/Server/UserRegistry.h +++ b/Limber/Server/UserRegistry.h diff --git a/Limber/main.cpp b/Limber/main.cpp index 988177a..e6bc45d 100644 --- a/Limber/main.cpp +++ b/Limber/main.cpp @@ -8,22 +8,22 @@ #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> -#include <Swiften/Elements/IQ.h> -#include <Swiften/Elements/RosterPayload.h> -#include <Swiften/Elements/VCard.h> -#include <Swiften/Server/SimpleUserRegistry.h> -#include <Swiften/Base/IDGenerator.h> -#include <Swiften/EventLoop/EventLoop.h> -#include <Swiften/EventLoop/SimpleEventLoop.h> -#include <Swiften/EventLoop/EventOwner.h> -#include <Swiften/Elements/Stanza.h> -#include <Swiften/Network/ConnectionServer.h> -#include <Swiften/Network/BoostConnection.h> -#include <Swiften/Network/BoostIOServiceThread.h> -#include <Swiften/Network/BoostConnectionServer.h> -#include <Swiften/Server/ServerFromClientSession.h> -#include <Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h> -#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h> +#include "Swiften/Elements/IQ.h" +#include "Swiften/Elements/RosterPayload.h" +#include "Swiften/Elements/VCard.h" +#include "Swiften/Base/IDGenerator.h" +#include "Swiften/EventLoop/EventLoop.h" +#include "Swiften/EventLoop/SimpleEventLoop.h" +#include "Swiften/EventLoop/EventOwner.h" +#include "Swiften/Elements/Stanza.h" +#include "Swiften/Network/ConnectionServer.h" +#include "Swiften/Network/BoostConnection.h" +#include "Swiften/Network/BoostIOServiceThread.h" +#include "Swiften/Network/BoostConnectionServer.h" +#include "Limber/Server/SimpleUserRegistry.h" +#include "Limber/Server/ServerFromClientSession.h" +#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h" +#include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h" using namespace Swift; diff --git a/QA/UnitTest/SConscript b/QA/UnitTest/SConscript index e5923ce..a6c7dc8 100644 --- a/QA/UnitTest/SConscript +++ b/QA/UnitTest/SConscript @@ -12,6 +12,7 @@ if env["TEST"] : myenv.MergeFlags(env.get("SLIMBER_FLAGS","")) myenv.MergeFlags(env.get("SWIFT_CONTROLLERS_FLAGS","")) myenv.MergeFlags(env.get("SWIFTOOLS_FLAGS","")) + myenv.MergeFlags(env.get("LIMBER_FLAGS","")) myenv.MergeFlags(env.get("SWIFTEN_FLAGS","")) myenv.MergeFlags(env.get("CPPUNIT_FLAGS","")) myenv.MergeFlags(env.get("LIBIDN_FLAGS", "")) diff --git a/Slimber/CLI/SConscript b/Slimber/CLI/SConscript index fddd717..422b56c 100644 --- a/Slimber/CLI/SConscript +++ b/Slimber/CLI/SConscript @@ -1,6 +1,7 @@ Import("env") myenv = env.Clone() +myenv.UseFlags(env["LIMBER_FLAGS"]) myenv.MergeFlags(env["SLIMBER_FLAGS"]) myenv.MergeFlags(env["SWIFTOOLS_FLAGS"]) myenv.MergeFlags(env["SWIFTEN_FLAGS"]) diff --git a/Slimber/Cocoa/SConscript b/Slimber/Cocoa/SConscript index d664846..1283dc7 100644 --- a/Slimber/Cocoa/SConscript +++ b/Slimber/Cocoa/SConscript @@ -1,6 +1,7 @@ Import("env") myenv = env.Clone() +myenv.UseFlags(env["LIMBER_FLAGS"]) myenv.MergeFlags(env["SLIMBER_FLAGS"]) myenv.MergeFlags(env["SWIFTOOLS_FLAGS"]) myenv.MergeFlags(env["SWIFTEN_FLAGS"]) diff --git a/Slimber/SConscript b/Slimber/SConscript index dc7fefa..2298b0a 100644 --- a/Slimber/SConscript +++ b/Slimber/SConscript @@ -31,6 +31,7 @@ if "Slimber" in env["PROJECTS"] : if env["SCONS_STAGE"] == "build" : myenv = env.Clone() + myenv.UseFlags(env["LIMBER_FLAGS"]) myenv.MergeFlags(env["BOOST_FLAGS"]) myenv.MergeFlags(env["SWIFTEN_FLAGS"]) myenv.MergeFlags(env["SWIFTEN_DEP_FLAGS"]) diff --git a/Slimber/Server.cpp b/Slimber/Server.cpp index fb9318e..f4aabd4 100644 --- a/Slimber/Server.cpp +++ b/Slimber/Server.cpp @@ -8,22 +8,22 @@ #include <string> #include <boost/bind.hpp> -#include <iostream> +#include "Swiften/Base/String.h" +#include "Swiften/LinkLocal/LinkLocalConnector.h" +#include "Swiften/Network/Connection.h" +#include "Swiften/Session/SessionTracer.h" +#include "Swiften/Elements/Element.h" +#include "Swiften/Elements/Presence.h" +#include "Swiften/Elements/RosterPayload.h" +#include "Swiften/Network/BoostConnection.h" +#include "Swiften/Network/BoostConnectionServer.h" +#include "Swiften/Session/SessionTracer.h" +#include "Swiften/Elements/IQ.h" +#include "Swiften/Elements/VCard.h" +#include "Limber/Server/UserRegistry.h" +#include "Swiften/Session/Session.h" #include <Swiften/Base/foreach.h> -#include <Swiften/Base/String.h> -#include <Swiften/LinkLocal/LinkLocalConnector.h> -#include <Swiften/Network/Connection.h> -#include <Swiften/Session/SessionTracer.h> -#include <Swiften/Elements/Element.h> -#include <Swiften/Elements/Presence.h> -#include <Swiften/Elements/RosterPayload.h> -#include <Swiften/Network/BoostConnection.h> -#include <Swiften/Network/BoostConnectionServer.h> -#include <Swiften/Session/SessionTracer.h> -#include <Swiften/Elements/IQ.h> -#include <Swiften/Elements/VCard.h> -#include <Swiften/Server/UserRegistry.h> #include <string> #include <Swiften/LinkLocal/LinkLocalServiceInfo.h> #include <Swiften/LinkLocal/OutgoingLinkLocalSession.h> @@ -32,7 +32,7 @@ #include <Swiften/Network/ConnectionServer.h> #include "Slimber/VCardCollection.h" #include "Slimber/LinkLocalPresenceManager.h" -#include <Swiften/Server/ServerFromClientSession.h> +#include "Limber/Server/ServerFromClientSession.h" namespace Swift { diff --git a/Slimber/Server.h b/Slimber/Server.h index 386365b..58b1e7c 100644 --- a/Slimber/Server.h +++ b/Slimber/Server.h @@ -10,15 +10,15 @@ #include <boost/optional.hpp> #include <vector> -#include <Swiften/Network/BoostIOServiceThread.h> -#include <Swiften/Network/BoostConnectionServer.h> -#include <Swiften/Server/UserRegistry.h> -#include <Swiften/Base/IDGenerator.h> -#include <Swiften/Server/ServerFromClientSession.h> -#include <Swiften/JID/JID.h> -#include <Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h> -#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h> -#include <Swiften/LinkLocal/LinkLocalServiceInfo.h> +#include "Swiften/Network/BoostIOServiceThread.h" +#include "Swiften/Network/BoostConnectionServer.h" +#include "Limber/Server/UserRegistry.h" +#include "Swiften/Base/IDGenerator.h" +#include "Limber/Server/ServerFromClientSession.h" +#include "Swiften/JID/JID.h" +#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h" +#include "Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h" +#include "Swiften/LinkLocal/LinkLocalServiceInfo.h" #include "Slimber/ServerError.h" namespace Swift { diff --git a/Swiften/SConscript b/Swiften/SConscript index d7bab26..f8392a8 100644 --- a/Swiften/SConscript +++ b/Swiften/SConscript @@ -169,11 +169,6 @@ if env["SCONS_STAGE"] == "build" : "Serializer/XML/XMLElement.cpp", "Serializer/XML/XMLNode.cpp", "Serializer/XMPPSerializer.cpp", - "Server/ServerFromClientSession.cpp", - "Server/ServerSession.cpp", - "Server/ServerStanzaRouter.cpp", - "Server/SimpleUserRegistry.cpp", - "Server/UserRegistry.cpp", "Session/Session.cpp", "Session/SessionTracer.cpp", "Session/SessionStream.cpp", |