summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-03-29 17:27:10 (GMT)
committerTobias Markmann <tm@ayena.de>2016-03-30 11:24:00 (GMT)
commit5de19b60ae5593adbc3d913f9c64162e21bc702a (patch)
tree07d3e7a9e6105609858931154ee7fbfc599bd34a /Swiften/Network
parent74e51310d27e9d9a66d2d790360549c48abec8d1 (diff)
downloadswift-5de19b60ae5593adbc3d913f9c64162e21bc702a.zip
swift-5de19b60ae5593adbc3d913f9c64162e21bc702a.tar.bz2
Apply consistent #include grouping and sorting style
Changed "" style includes to <> style. Test-Information: Build with Clang 3.9.0 and ran all tests on OS X 10.11.4. Change-Id: Ic05e53f2e5dba39cc1307b116fc5f17b62ab9eb8
Diffstat (limited to 'Swiften/Network')
-rw-r--r--Swiften/Network/BoostConnectionFactory.cpp3
-rw-r--r--Swiften/Network/BoostConnectionFactory.h4
-rw-r--r--Swiften/Network/BoostConnectionServer.h8
-rw-r--r--Swiften/Network/BoostConnectionServerFactory.cpp7
-rw-r--r--Swiften/Network/BoostConnectionServerFactory.h4
-rw-r--r--Swiften/Network/BoostIOServiceThread.h4
-rw-r--r--Swiften/Network/BoostTimerFactory.cpp3
-rw-r--r--Swiften/Network/BoostTimerFactory.h4
-rw-r--r--Swiften/Network/ConnectionServer.h4
-rw-r--r--Swiften/Network/ConnectionServerFactory.h3
-rw-r--r--Swiften/Network/Connector.h16
-rw-r--r--Swiften/Network/DomainNameAddressQuery.h4
-rw-r--r--Swiften/Network/DomainNameResolver.h5
-rw-r--r--Swiften/Network/DomainNameServiceQuery.cpp11
-rw-r--r--Swiften/Network/DomainNameServiceQuery.h9
-rw-r--r--Swiften/Network/DummyConnection.cpp5
-rw-r--r--Swiften/Network/DummyConnectionServer.h6
-rw-r--r--Swiften/Network/EnvironmentProxyProvider.cpp10
-rw-r--r--Swiften/Network/GConfProxyProvider.cpp10
-rw-r--r--Swiften/Network/HTTPConnectProxiedConnectionFactory.h4
-rw-r--r--Swiften/Network/HostAddress.cpp9
-rw-r--r--Swiften/Network/HostAddress.h3
-rw-r--r--Swiften/Network/HostNameOrAddress.h6
-rw-r--r--Swiften/Network/MacOSXProxyProvider.h10
-rw-r--r--Swiften/Network/MiniUPnPInterface.cpp7
-rw-r--r--Swiften/Network/NATPMPInterface.cpp10
-rw-r--r--Swiften/Network/NATTraversalForwardPortRequest.h9
-rw-r--r--Swiften/Network/NATTraversalInterface.cpp3
-rw-r--r--Swiften/Network/NetworkEnvironment.cpp6
-rw-r--r--Swiften/Network/NullNATTraverser.cpp8
-rw-r--r--Swiften/Network/ProxyProvider.cpp8
-rw-r--r--Swiften/Network/ProxyProvider.h7
-rw-r--r--Swiften/Network/SOCKS5ProxiedConnection.cpp7
-rw-r--r--Swiften/Network/SolarisNetworkEnvironment.cpp24
-rw-r--r--Swiften/Network/SolarisNetworkEnvironment.h9
-rw-r--r--Swiften/Network/StaticDomainNameResolver.cpp7
-rw-r--r--Swiften/Network/Timer.h4
-rwxr-xr-xSwiften/Network/UnboundDomainNameResolver.cpp19
-rwxr-xr-xSwiften/Network/UnboundDomainNameResolver.h16
-rw-r--r--Swiften/Network/UnitTest/DomainNameServiceQueryTest.cpp4
-rw-r--r--Swiften/Network/UnitTest/HostAddressTest.cpp5
-rw-r--r--Swiften/Network/UnixNetworkEnvironment.h7
-rw-r--r--Swiften/Network/WindowsNetworkEnvironment.cpp20
-rw-r--r--Swiften/Network/WindowsProxyProvider.cpp21
44 files changed, 223 insertions, 130 deletions
diff --git a/Swiften/Network/BoostConnectionFactory.cpp b/Swiften/Network/BoostConnectionFactory.cpp
index 36bae5e..4aec324 100644
--- a/Swiften/Network/BoostConnectionFactory.cpp
+++ b/Swiften/Network/BoostConnectionFactory.cpp
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/BoostConnectionFactory.h>
+
#include <Swiften/Network/BoostConnection.h>
namespace Swift {
diff --git a/Swiften/Network/BoostConnectionFactory.h b/Swiften/Network/BoostConnectionFactory.h
index 574ea3e..c98180c 100644
--- a/Swiften/Network/BoostConnectionFactory.h
+++ b/Swiften/Network/BoostConnectionFactory.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,8 +9,8 @@
#include <boost/asio/io_service.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Network/ConnectionFactory.h>
#include <Swiften/Network/BoostConnection.h>
+#include <Swiften/Network/ConnectionFactory.h>
namespace Swift {
class BoostConnection;
diff --git a/Swiften/Network/BoostConnectionServer.h b/Swiften/Network/BoostConnectionServer.h
index cf37975..042cc24 100644
--- a/Swiften/Network/BoostConnectionServer.h
+++ b/Swiften/Network/BoostConnectionServer.h
@@ -1,22 +1,22 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/optional/optional_fwd.hpp>
+#include <boost/shared_ptr.hpp>
#include <Swiften/Base/API.h>
#include <Swiften/Base/boost_bsignals.h>
+#include <Swiften/EventLoop/EventOwner.h>
#include <Swiften/Network/BoostConnection.h>
#include <Swiften/Network/ConnectionServer.h>
-#include <Swiften/EventLoop/EventOwner.h>
-#include <boost/optional/optional_fwd.hpp>
namespace Swift {
class SWIFTEN_API BoostConnectionServer : public ConnectionServer, public EventOwner, public boost::enable_shared_from_this<BoostConnectionServer> {
diff --git a/Swiften/Network/BoostConnectionServerFactory.cpp b/Swiften/Network/BoostConnectionServerFactory.cpp
index 04c614e..12173c3 100644
--- a/Swiften/Network/BoostConnectionServerFactory.cpp
+++ b/Swiften/Network/BoostConnectionServerFactory.cpp
@@ -4,7 +4,14 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <Swiften/Network/BoostConnectionServerFactory.h>
+
#include <Swiften/Network/BoostConnectionServer.h>
namespace Swift {
diff --git a/Swiften/Network/BoostConnectionServerFactory.h b/Swiften/Network/BoostConnectionServerFactory.h
index 1ef4951..831ab45 100644
--- a/Swiften/Network/BoostConnectionServerFactory.h
+++ b/Swiften/Network/BoostConnectionServerFactory.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -15,8 +15,8 @@
#include <boost/asio/io_service.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Network/ConnectionServerFactory.h>
#include <Swiften/Network/BoostConnectionServer.h>
+#include <Swiften/Network/ConnectionServerFactory.h>
namespace Swift {
class ConnectionServer;
diff --git a/Swiften/Network/BoostIOServiceThread.h b/Swiften/Network/BoostIOServiceThread.h
index 428837b..f493dfb 100644
--- a/Swiften/Network/BoostIOServiceThread.h
+++ b/Swiften/Network/BoostIOServiceThread.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -7,8 +7,8 @@
#pragma once
#include <boost/asio/io_service.hpp>
-#include <boost/thread/thread.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/thread/thread.hpp>
#include <Swiften/Base/API.h>
diff --git a/Swiften/Network/BoostTimerFactory.cpp b/Swiften/Network/BoostTimerFactory.cpp
index dbc72df..4281a1f 100644
--- a/Swiften/Network/BoostTimerFactory.cpp
+++ b/Swiften/Network/BoostTimerFactory.cpp
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/BoostTimerFactory.h>
+
#include <Swiften/Network/BoostTimer.h>
namespace Swift {
diff --git a/Swiften/Network/BoostTimerFactory.h b/Swiften/Network/BoostTimerFactory.h
index 9b97467..328c64e 100644
--- a/Swiften/Network/BoostTimerFactory.h
+++ b/Swiften/Network/BoostTimerFactory.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,8 +9,8 @@
#include <boost/asio/io_service.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Network/TimerFactory.h>
#include <Swiften/Network/BoostTimer.h>
+#include <Swiften/Network/TimerFactory.h>
namespace Swift {
class BoostTimer;
diff --git a/Swiften/Network/ConnectionServer.h b/Swiften/Network/ConnectionServer.h
index 10d549e..7b0cdd1 100644
--- a/Swiften/Network/ConnectionServer.h
+++ b/Swiften/Network/ConnectionServer.h
@@ -1,18 +1,18 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
+#include <boost/optional/optional_fwd.hpp>
#include <boost/shared_ptr.hpp>
#include <Swiften/Base/API.h>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Network/Connection.h>
#include <Swiften/Network/HostAddressPort.h>
-#include <boost/optional/optional_fwd.hpp>
namespace Swift {
class SWIFTEN_API ConnectionServer {
diff --git a/Swiften/Network/ConnectionServerFactory.h b/Swiften/Network/ConnectionServerFactory.h
index 672cac7..8e488c9 100644
--- a/Swiften/Network/ConnectionServerFactory.h
+++ b/Swiften/Network/ConnectionServerFactory.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,6 +13,7 @@
#pragma once
#include <boost/shared_ptr.hpp>
+
#include <Swiften/Base/API.h>
namespace Swift {
diff --git a/Swiften/Network/Connector.h b/Swiften/Network/Connector.h
index f34eaa6..3ed76fa 100644
--- a/Swiften/Network/Connector.h
+++ b/Swiften/Network/Connector.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -7,16 +7,18 @@
#pragma once
#include <deque>
-#include <Swiften/Base/boost_bsignals.h>
-#include <boost/shared_ptr.hpp>
+#include <string>
+
#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
+
#include <Swiften/Base/API.h>
-#include <Swiften/Network/DomainNameServiceQuery.h>
+#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Network/Connection.h>
-#include <Swiften/Network/Timer.h>
-#include <Swiften/Network/HostAddressPort.h>
-#include <string>
#include <Swiften/Network/DomainNameResolveError.h>
+#include <Swiften/Network/DomainNameServiceQuery.h>
+#include <Swiften/Network/HostAddressPort.h>
+#include <Swiften/Network/Timer.h>
namespace Swift {
class DomainNameAddressQuery;
diff --git a/Swiften/Network/DomainNameAddressQuery.h b/Swiften/Network/DomainNameAddressQuery.h
index fc04c2f..7b4b9b0 100644
--- a/Swiften/Network/DomainNameAddressQuery.h
+++ b/Swiften/Network/DomainNameAddressQuery.h
@@ -1,15 +1,15 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/boost_bsignals.h>
#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
+#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Network/DomainNameResolveError.h>
#include <Swiften/Network/HostAddress.h>
diff --git a/Swiften/Network/DomainNameResolver.h b/Swiften/Network/DomainNameResolver.h
index 8bc1b35..e398774 100644
--- a/Swiften/Network/DomainNameResolver.h
+++ b/Swiften/Network/DomainNameResolver.h
@@ -1,14 +1,15 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <boost/shared_ptr.hpp>
#include <string>
+#include <boost/shared_ptr.hpp>
+
#include <Swiften/Base/API.h>
namespace Swift {
diff --git a/Swiften/Network/DomainNameServiceQuery.cpp b/Swiften/Network/DomainNameServiceQuery.cpp
index 33331a7..4410ed9 100644
--- a/Swiften/Network/DomainNameServiceQuery.cpp
+++ b/Swiften/Network/DomainNameServiceQuery.cpp
@@ -1,22 +1,23 @@
/*
- * Copyright (c) 2010-2013 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/DomainNameServiceQuery.h>
-#include <numeric>
#include <cassert>
#include <functional>
#include <iterator>
+#include <numeric>
-#include <Swiften/Base/RandomGenerator.h>
-#include <boost/numeric/conversion/cast.hpp>
-#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/numeric/conversion/cast.hpp>
#include <boost/typeof/typeof.hpp>
+#include <Swiften/Base/RandomGenerator.h>
+
using namespace Swift;
namespace lambda = boost::lambda;
diff --git a/Swiften/Network/DomainNameServiceQuery.h b/Swiften/Network/DomainNameServiceQuery.h
index 1e2f2f3..240ae4e 100644
--- a/Swiften/Network/DomainNameServiceQuery.h
+++ b/Swiften/Network/DomainNameServiceQuery.h
@@ -1,18 +1,19 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/boost_bsignals.h>
-#include <boost/optional.hpp>
+#include <string>
#include <vector>
+
+#include <boost/optional.hpp>
#include <boost/shared_ptr.hpp>
-#include <string>
#include <Swiften/Base/API.h>
+#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Network/DomainNameResolveError.h>
namespace Swift {
diff --git a/Swiften/Network/DummyConnection.cpp b/Swiften/Network/DummyConnection.cpp
index e750890..53f3db7 100644
--- a/Swiften/Network/DummyConnection.cpp
+++ b/Swiften/Network/DummyConnection.cpp
@@ -1,14 +1,15 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/DummyConnection.h>
+#include <cassert>
+
#include <boost/bind.hpp>
#include <boost/smart_ptr/make_shared.hpp>
-#include <cassert>
namespace Swift {
diff --git a/Swiften/Network/DummyConnectionServer.h b/Swiften/Network/DummyConnectionServer.h
index c0c2efc..1195cad 100644
--- a/Swiften/Network/DummyConnectionServer.h
+++ b/Swiften/Network/DummyConnectionServer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,10 +9,10 @@
#include <boost/enable_shared_from_this.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Network/ConnectionServer.h>
-#include <Swiften/Network/HostAddressPort.h>
#include <Swiften/EventLoop/EventLoop.h>
#include <Swiften/EventLoop/EventOwner.h>
+#include <Swiften/Network/ConnectionServer.h>
+#include <Swiften/Network/HostAddressPort.h>
namespace Swift {
class SWIFTEN_API DummyConnectionServer : public ConnectionServer, public EventOwner, public boost::enable_shared_from_this<DummyConnectionServer> {
diff --git a/Swiften/Network/EnvironmentProxyProvider.cpp b/Swiften/Network/EnvironmentProxyProvider.cpp
index 7701da1..b61a73f 100644
--- a/Swiften/Network/EnvironmentProxyProvider.cpp
+++ b/Swiften/Network/EnvironmentProxyProvider.cpp
@@ -4,12 +4,20 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/Network/EnvironmentProxyProvider.h>
+
#include <stdio.h>
#include <stdlib.h>
+
#include <iostream>
#include <Swiften/Base/Log.h>
-#include <Swiften/Network/EnvironmentProxyProvider.h>
namespace Swift {
diff --git a/Swiften/Network/GConfProxyProvider.cpp b/Swiften/Network/GConfProxyProvider.cpp
index 8d97c68..ed9be3c 100644
--- a/Swiften/Network/GConfProxyProvider.cpp
+++ b/Swiften/Network/GConfProxyProvider.cpp
@@ -4,14 +4,22 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/Network/GConfProxyProvider.h>
+
#include <stdio.h>
#include <stdlib.h>
+
#include <iostream>
#include <gconf/gconf-client.h>
#include <Swiften/Base/Log.h>
-#include <Swiften/Network/GConfProxyProvider.h>
namespace Swift {
diff --git a/Swiften/Network/HTTPConnectProxiedConnectionFactory.h b/Swiften/Network/HTTPConnectProxiedConnectionFactory.h
index 9d2c982..05e9447 100644
--- a/Swiften/Network/HTTPConnectProxiedConnectionFactory.h
+++ b/Swiften/Network/HTTPConnectProxiedConnectionFactory.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 Isode Limited.
+ * Copyright (c) 2012-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,9 +13,9 @@
#pragma once
#include <Swiften/Base/API.h>
+#include <Swiften/Base/SafeString.h>
#include <Swiften/Network/ConnectionFactory.h>
#include <Swiften/Network/HostAddressPort.h>
-#include <Swiften/Base/SafeString.h>
namespace Swift {
class DomainNameResolver;
diff --git a/Swiften/Network/HostAddress.cpp b/Swiften/Network/HostAddress.cpp
index c9de1f0..ae1a008 100644
--- a/Swiften/Network/HostAddress.cpp
+++ b/Swiften/Network/HostAddress.cpp
@@ -1,19 +1,20 @@
/*
- * Copyright (c) 2010-2013 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/HostAddress.h>
-#include <boost/numeric/conversion/cast.hpp>
-#include <boost/lexical_cast.hpp>
#include <cassert>
#include <stdexcept>
+#include <string>
+
#include <boost/array.hpp>
+#include <boost/lexical_cast.hpp>
+#include <boost/numeric/conversion/cast.hpp>
#include <Swiften/Base/foreach.h>
-#include <string>
static boost::asio::ip::address localhost4 = boost::asio::ip::address(boost::asio::ip::address_v4::loopback());
static boost::asio::ip::address localhost6 = boost::asio::ip::address(boost::asio::ip::address_v6::loopback());
diff --git a/Swiften/Network/HostAddress.h b/Swiften/Network/HostAddress.h
index 57c34f0..91c3e73 100644
--- a/Swiften/Network/HostAddress.h
+++ b/Swiften/Network/HostAddress.h
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2010-2013 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
#include <string>
+
#include <boost/asio/ip/address.hpp>
#include <Swiften/Base/API.h>
diff --git a/Swiften/Network/HostNameOrAddress.h b/Swiften/Network/HostNameOrAddress.h
index 325ef06..d6ef439 100644
--- a/Swiften/Network/HostNameOrAddress.h
+++ b/Swiften/Network/HostNameOrAddress.h
@@ -1,14 +1,16 @@
/*
- * Copyright (c) 2012 Isode Limited.
+ * Copyright (c) 2012-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
#include <string>
-#include <Swiften/Network/HostAddress.h>
+
#include <boost/variant.hpp>
+#include <Swiften/Network/HostAddress.h>
+
namespace Swift {
typedef boost::variant<std::string, HostAddress> HostNameOrAddress;
diff --git a/Swiften/Network/MacOSXProxyProvider.h b/Swiften/Network/MacOSXProxyProvider.h
index 6666d30..53a7760 100644
--- a/Swiften/Network/MacOSXProxyProvider.h
+++ b/Swiften/Network/MacOSXProxyProvider.h
@@ -4,10 +4,18 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
-#include <Swiften/Network/ProxyProvider.h>
+
#include <CoreFoundation/CoreFoundation.h>
+#include <Swiften/Network/ProxyProvider.h>
+
namespace Swift {
class MacOSXProxyProvider : public ProxyProvider {
public:
diff --git a/Swiften/Network/MiniUPnPInterface.cpp b/Swiften/Network/MiniUPnPInterface.cpp
index 357fe69..3ca2ec4 100644
--- a/Swiften/Network/MiniUPnPInterface.cpp
+++ b/Swiften/Network/MiniUPnPInterface.cpp
@@ -5,18 +5,19 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/MiniUPnPInterface.h>
+#include <boost/lexical_cast.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
+
#include <miniupnpc.h>
#include <upnpcommands.h>
#include <upnperrors.h>
-#include <boost/smart_ptr/make_shared.hpp>
-#include <boost/lexical_cast.hpp>
#include <Swiften/Base/Log.h>
diff --git a/Swiften/Network/NATPMPInterface.cpp b/Swiften/Network/NATPMPInterface.cpp
index 064cfc8..e84d6ec 100644
--- a/Swiften/Network/NATPMPInterface.cpp
+++ b/Swiften/Network/NATPMPInterface.cpp
@@ -5,15 +5,15 @@
*/
/*
-* Copyright (c) 2014 Isode Limited.
-* All rights reserved.v3.
-* See the COPYING file for more information.
-*/
+ * Copyright (c) 2014-2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
#include <Swiften/Network/NATPMPInterface.h>
-#include <boost/smart_ptr/make_shared.hpp>
#include <boost/numeric/conversion/cast.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
#include <Swiften/Base/Log.h>
diff --git a/Swiften/Network/NATTraversalForwardPortRequest.h b/Swiften/Network/NATTraversalForwardPortRequest.h
index 48f85ea..155d30b 100644
--- a/Swiften/Network/NATTraversalForwardPortRequest.h
+++ b/Swiften/Network/NATTraversalForwardPortRequest.h
@@ -4,11 +4,16 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
-#pragma once
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
-#include <Swiften/Base/boost_bsignals.h>
+#pragma once
#include <Swiften/Base/API.h>
+#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Network/NATPortMapping.h>
namespace Swift {
diff --git a/Swiften/Network/NATTraversalInterface.cpp b/Swiften/Network/NATTraversalInterface.cpp
index 333fbf9..18ee843 100644
--- a/Swiften/Network/NATTraversalInterface.cpp
+++ b/Swiften/Network/NATTraversalInterface.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
@@ -8,7 +8,6 @@
#include <Swiften/Base/Log.h>
-
namespace Swift {
NATTraversalInterface::~NATTraversalInterface() {
diff --git a/Swiften/Network/NetworkEnvironment.cpp b/Swiften/Network/NetworkEnvironment.cpp
index 75fa15d..dff310e 100644
--- a/Swiften/Network/NetworkEnvironment.cpp
+++ b/Swiften/Network/NetworkEnvironment.cpp
@@ -1,14 +1,14 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/NetworkEnvironment.h>
-#include <Swiften/Network/NetworkInterface.h>
-#include <Swiften/Network/HostAddress.h>
#include <Swiften/Base/foreach.h>
+#include <Swiften/Network/HostAddress.h>
+#include <Swiften/Network/NetworkInterface.h>
namespace Swift {
diff --git a/Swiften/Network/NullNATTraverser.cpp b/Swiften/Network/NullNATTraverser.cpp
index b4ae66b..3f7b1c1 100644
--- a/Swiften/Network/NullNATTraverser.cpp
+++ b/Swiften/Network/NullNATTraverser.cpp
@@ -1,18 +1,18 @@
/*
- * Copyright (c) 2011 Isode Limited.
+ * Copyright (c) 2011-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/NullNATTraverser.h>
-#include <boost/smart_ptr/make_shared.hpp>
#include <boost/bind.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
-#include <Swiften/Network/NATTraversalGetPublicIPRequest.h>
+#include <Swiften/EventLoop/EventLoop.h>
#include <Swiften/Network/NATTraversalForwardPortRequest.h>
+#include <Swiften/Network/NATTraversalGetPublicIPRequest.h>
#include <Swiften/Network/NATTraversalRemovePortForwardingRequest.h>
-#include <Swiften/EventLoop/EventLoop.h>
namespace Swift {
diff --git a/Swiften/Network/ProxyProvider.cpp b/Swiften/Network/ProxyProvider.cpp
index fe235b1..dd07d3a 100644
--- a/Swiften/Network/ProxyProvider.cpp
+++ b/Swiften/Network/ProxyProvider.cpp
@@ -4,7 +4,13 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
-#include "ProxyProvider.h"
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/Network/ProxyProvider.h>
namespace Swift {
diff --git a/Swiften/Network/ProxyProvider.h b/Swiften/Network/ProxyProvider.h
index b5e3eca..96f3b21 100644
--- a/Swiften/Network/ProxyProvider.h
+++ b/Swiften/Network/ProxyProvider.h
@@ -5,17 +5,18 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
+
#include <map>
-#include <Swiften/Network/HostAddressPort.h>
-#include <Swiften/Base/String.h>
#include <Swiften/Base/API.h>
+#include <Swiften/Base/String.h>
+#include <Swiften/Network/HostAddressPort.h>
namespace Swift {
class SWIFTEN_API ProxyProvider {
diff --git a/Swiften/Network/SOCKS5ProxiedConnection.cpp b/Swiften/Network/SOCKS5ProxiedConnection.cpp
index 666620d..1385fa2 100644
--- a/Swiften/Network/SOCKS5ProxiedConnection.cpp
+++ b/Swiften/Network/SOCKS5ProxiedConnection.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,13 +13,14 @@
#include <Swiften/Network/SOCKS5ProxiedConnection.h>
#include <iostream>
+
#include <boost/bind.hpp>
#include <boost/thread.hpp>
-#include <Swiften/Network/ConnectionFactory.h>
+#include <Swiften/Base/ByteArray.h>
#include <Swiften/Base/Log.h>
#include <Swiften/Base/String.h>
-#include <Swiften/Base/ByteArray.h>
+#include <Swiften/Network/ConnectionFactory.h>
#include <Swiften/Network/HostAddressPort.h>
using namespace Swift;
diff --git a/Swiften/Network/SolarisNetworkEnvironment.cpp b/Swiften/Network/SolarisNetworkEnvironment.cpp
index c7d5c2d..0404364 100644
--- a/Swiften/Network/SolarisNetworkEnvironment.cpp
+++ b/Swiften/Network/SolarisNetworkEnvironment.cpp
@@ -5,26 +5,28 @@
*/
/*
-* Copyright (c) 2013-2014 Isode Limited.
-* All rights reserved.v3.
-* See the COPYING file for more information.
-*/
+ * Copyright (c) 2013-2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
#include <Swiften/Network/SolarisNetworkEnvironment.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <map>
#include <string>
#include <vector>
-#include <map>
+
#include <boost/optional.hpp>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/sockio.h>
+#include <net/if.h>
#include <sys/socket.h>
+#include <sys/sockio.h>
#include <sys/types.h>
-#include <net/if.h>
+#include <unistd.h>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Network/HostAddress.h>
diff --git a/Swiften/Network/SolarisNetworkEnvironment.h b/Swiften/Network/SolarisNetworkEnvironment.h
index b344033..ed5adb7 100644
--- a/Swiften/Network/SolarisNetworkEnvironment.h
+++ b/Swiften/Network/SolarisNetworkEnvironment.h
@@ -5,17 +5,16 @@
*/
/*
-* Copyright (c) 2013-2014 Isode Limited.
-* All rights reserved.v3.
-* See the COPYING file for more information.
-*/
+ * Copyright (c) 2013-2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
#pragma once
#include <vector>
#include <Swiften/Base/boost_bsignals.h>
-
#include <Swiften/Network/NetworkEnvironment.h>
#include <Swiften/Network/NetworkInterface.h>
diff --git a/Swiften/Network/StaticDomainNameResolver.cpp b/Swiften/Network/StaticDomainNameResolver.cpp
index c744085..ab24be5 100644
--- a/Swiften/Network/StaticDomainNameResolver.cpp
+++ b/Swiften/Network/StaticDomainNameResolver.cpp
@@ -1,17 +1,18 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swiften/Network/StaticDomainNameResolver.h>
+#include <string>
+
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
-#include <Swiften/Network/DomainNameResolveError.h>
#include <Swiften/EventLoop/EventOwner.h>
-#include <string>
+#include <Swiften/Network/DomainNameResolveError.h>
using namespace Swift;
diff --git a/Swiften/Network/Timer.h b/Swiften/Network/Timer.h
index ad9752f..2697200 100644
--- a/Swiften/Network/Timer.h
+++ b/Swiften/Network/Timer.h
@@ -1,13 +1,13 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Base/API.h>
+#include <Swiften/Base/boost_bsignals.h>
namespace Swift {
/**
diff --git a/Swiften/Network/UnboundDomainNameResolver.cpp b/Swiften/Network/UnboundDomainNameResolver.cpp
index bc280eb..68d40e1 100755
--- a/Swiften/Network/UnboundDomainNameResolver.cpp
+++ b/Swiften/Network/UnboundDomainNameResolver.cpp
@@ -4,13 +4,23 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
-#include "UnboundDomainNameResolver.h"
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
#include <vector>
#include <boost/bind.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
+
+#include <UnboundDomainNameResolver.h>
+#include <arpa/inet.h>
+#include <ldns/ldns.h>
+#include <unbound.h>
+#include <unistd.h>
#include <Swiften/Base/Log.h>
#include <Swiften/EventLoop/EventLoop.h>
@@ -21,11 +31,6 @@
#include <Swiften/Network/HostAddress.h>
#include <Swiften/Network/TimerFactory.h>
-#include <arpa/inet.h>
-#include <unbound.h>
-#include <ldns/ldns.h>
-#include <unistd.h>
-
namespace Swift {
class UnboundQuery {
diff --git a/Swiften/Network/UnboundDomainNameResolver.h b/Swiften/Network/UnboundDomainNameResolver.h
index 6b78cf3..f7092eb 100755
--- a/Swiften/Network/UnboundDomainNameResolver.h
+++ b/Swiften/Network/UnboundDomainNameResolver.h
@@ -4,15 +4,21 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
+#include <boost/asio.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <Swiften/EventLoop/EventOwner.h>
#include <Swiften/Network/DomainNameResolver.h>
#include <Swiften/Network/Timer.h>
-#include <Swiften/EventLoop/EventOwner.h>
-
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/asio.hpp>
struct ub_ctx;
struct ub_result;
diff --git a/Swiften/Network/UnitTest/DomainNameServiceQueryTest.cpp b/Swiften/Network/UnitTest/DomainNameServiceQueryTest.cpp
index e9bbdcd..d5cef84 100644
--- a/Swiften/Network/UnitTest/DomainNameServiceQueryTest.cpp
+++ b/Swiften/Network/UnitTest/DomainNameServiceQueryTest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 Isode Limited.
+ * Copyright (c) 2012-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,8 +9,8 @@
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <Swiften/Network/DomainNameServiceQuery.h>
#include <Swiften/Base/RandomGenerator.h>
+#include <Swiften/Network/DomainNameServiceQuery.h>
using namespace Swift;
diff --git a/Swiften/Network/UnitTest/HostAddressTest.cpp b/Swiften/Network/UnitTest/HostAddressTest.cpp
index 76d0e11..42fb108 100644
--- a/Swiften/Network/UnitTest/HostAddressTest.cpp
+++ b/Swiften/Network/UnitTest/HostAddressTest.cpp
@@ -1,14 +1,15 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
+#include <string>
+
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <Swiften/Network/HostAddress.h>
-#include <string>
using namespace Swift;
diff --git a/Swiften/Network/UnixNetworkEnvironment.h b/Swiften/Network/UnixNetworkEnvironment.h
index 8b51cae..ad53f28 100644
--- a/Swiften/Network/UnixNetworkEnvironment.h
+++ b/Swiften/Network/UnixNetworkEnvironment.h
@@ -4,12 +4,17 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#pragma once
#include <vector>
#include <Swiften/Base/boost_bsignals.h>
-
#include <Swiften/Network/NetworkEnvironment.h>
#include <Swiften/Network/NetworkInterface.h>
diff --git a/Swiften/Network/WindowsNetworkEnvironment.cpp b/Swiften/Network/WindowsNetworkEnvironment.cpp
index e2d1966..1dd363d 100644
--- a/Swiften/Network/WindowsNetworkEnvironment.cpp
+++ b/Swiften/Network/WindowsNetworkEnvironment.cpp
@@ -4,19 +4,27 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
#include <Swiften/Network/WindowsNetworkEnvironment.h>
+#include <map>
#include <string>
#include <vector>
-#include <map>
+
#include <boost/optional.hpp>
-#include <Swiften/Network/HostAddress.h>
-#include <Swiften/Network/NetworkInterface.h>
-#include <Swiften/Base/foreach.h>
-#include <Swiften/Base/ByteArray.h>
-#include <winsock2.h>
#include <iphlpapi.h>
+#include <winsock2.h>
+
+#include <Swiften/Base/ByteArray.h>
+#include <Swiften/Base/foreach.h>
+#include <Swiften/Network/HostAddress.h>
+#include <Swiften/Network/NetworkInterface.h>
namespace Swift {
diff --git a/Swiften/Network/WindowsProxyProvider.cpp b/Swiften/Network/WindowsProxyProvider.cpp
index 3ae43e0..f2e91a2 100644
--- a/Swiften/Network/WindowsProxyProvider.cpp
+++ b/Swiften/Network/WindowsProxyProvider.cpp
@@ -4,19 +4,28 @@
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
+/*
+ * Copyright (c) 2016 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
+ */
+
+#include <Swiften/Network/WindowsProxyProvider.h>
+
+#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-#include <math.h>
+
#include <iostream>
-#include <boost/lexical_cast.hpp>
-#include <Swiften/Base/log.h>
-#include <Swiften/Base/foreach.h>
-#include <Swiften/Network/WindowsProxyProvider.h>
-#include <Swiften/Base/ByteArray.h>
+#include <boost/lexical_cast.hpp>
#include <windows.h>
+#include <Swiften/Base/ByteArray.h>
+#include <Swiften/Base/foreach.h>
+#include <Swiften/Base/log.h>
+
namespace Swift {
WindowsProxyProvider::WindowsProxyProvider()