diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-09-24 18:18:28 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-25 17:42:32 (GMT) |
commit | 94f87ffc9769f2782b2267db813854b0fe752678 (patch) | |
tree | 56244712ade2be0d4a0a093d7721d18050e74f87 /Swiften/Network/SConscript | |
parent | 4f62e5ec4b42929fe3c1a68667e63cb1b7a35509 (diff) | |
download | swift-contrib-94f87ffc9769f2782b2267db813854b0fe752678.zip swift-contrib-94f87ffc9769f2782b2267db813854b0fe752678.tar.bz2 |
File transfer changes.
- Introduce 'experimental' flag to conditionally compile FT.
- Use LibMiniUPNPC and NATPMP CPPDEFINES only locally in the classes that need them.
- Extract abstract interface from NAT traversal classes
- Avoid unit test warnings
Diffstat (limited to 'Swiften/Network/SConscript')
-rw-r--r-- | Swiften/Network/SConscript | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/Swiften/Network/SConscript b/Swiften/Network/SConscript index e9853dd..f168219 100644 --- a/Swiften/Network/SConscript +++ b/Swiften/Network/SConscript @@ -41,17 +41,13 @@ sourceList = [ "BoostTimer.cpp", "ProxyProvider.cpp", "NullProxyProvider.cpp", + "NATTraverser.cpp", + "NullNATTraverser.cpp", + "NATTraversalGetPublicIPRequest.cpp", + "NATTraversalForwardPortRequest.cpp", + "NATTraversalRemovePortForwardingRequest.cpp", "PlatformNATTraversalWorker.cpp", - "PlatformNATTraversalGetPublicIPRequest.cpp", - "PlatformNATTraversalForwardPortRequest.cpp", - "PlatformNATTraversalRemovePortForwardingRequest.cpp", "PlatformNATTraversalRequest.cpp", - "UPnPNATTraversalGetPublicIPRequest.cpp", - "UPnPNATTraversalForwardPortRequest.cpp", - "UPnPNATTraversalRemovePortForwardingRequest.cpp", - "NATPMPNATTraversalGetPublicIPRequest.cpp", - "NATPMPNATTraversalForwardPortRequest.cpp", - "NATPMPNATTraversalRemovePortForwardingRequest.cpp", ] if myenv.get("HAVE_CARES", False) : @@ -74,4 +70,24 @@ else : sourceList += [ "GConfProxyProvider.cpp" ] objects = myenv.SwiftenObject(sourceList) + +if myenv["experimental"] : + # LibNATPMP classes + natpmp_env = myenv.Clone() + natpmp_env.Append(CPPDEFINES = natpmp_env["LIBNATPMP_FLAGS"].get("INTERNAL_CPPDEFINES", [])) + objects += natpmp_env.SwiftenObject([ + "NATPMPNATTraversalGetPublicIPRequest.cpp", + "NATPMPNATTraversalForwardPortRequest.cpp", + "NATPMPNATTraversalRemovePortForwardingRequest.cpp" + ]) + + # LibMINIUPnP classes + upnp_env = myenv.Clone() + upnp_env.Append(CPPDEFINES = upnp_env["LIBMINIUPNPC_FLAGS"].get("INTERNAL_CPPDEFINES", [])) + objects += upnp_env.SwiftenObject([ + "UPnPNATTraversalGetPublicIPRequest.cpp", + "UPnPNATTraversalForwardPortRequest.cpp", + "UPnPNATTraversalRemovePortForwardingRequest.cpp", + ]) + swiften_env.Append(SWIFTEN_OBJECTS = [objects]) |