diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-07-24 15:42:17 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-07-24 15:42:17 (GMT) |
| commit | 744884d4ed76658880a3d25f6e6551ef92700a8f (patch) | |
| tree | 5fd09d05a22a9d2f10ac937e402bd68a23fec4e2 | |
| parent | 6ca201d0b48f4273e24dd7bff17c4a46eeaddf39 (diff) | |
| download | swift-744884d4ed76658880a3d25f6e6551ef92700a8f.zip swift-744884d4ed76658880a3d25f6e6551ef92700a8f.tar.bz2 | |
Add missing includes for dependencies in public header files
Added Swiften/Base/Concat.h to the exception list for <algorithm>
include, as Concat.h uses std::copy, defined in <algorithm>.
Added Swiften/FileTransfer/S5BTransportSession.h to the exception
list for <boost/bind.hpp> include, as S5BTransportSession.h
declares a template class using boost::bind.
Test-Information:
Tested that each of Swiften's public header files compiles on its
own.
Change-Id: Iac794b6e0f5959cd8261888a67761813b710fe85
| -rwxr-xr-x | BuildTools/CheckHeaders.py | 4 | ||||
| -rw-r--r-- | Swiften/Base/Concat.h | 4 | ||||
| -rw-r--r-- | Swiften/Base/Listenable.h | 9 | ||||
| -rw-r--r-- | Swiften/Elements/CompressRequest.h | 2 | ||||
| -rw-r--r-- | Swiften/Elements/FormReportedRef.h | 2 | ||||
| -rw-r--r-- | Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h | 4 | ||||
| -rw-r--r-- | Swiften/FileTransfer/S5BTransportSession.h | 4 | ||||
| -rw-r--r-- | Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h | 3 | ||||
| -rw-r--r-- | Swiften/Serializer/XML/XMLTextNode.h | 4 |
9 files changed, 26 insertions, 10 deletions
diff --git a/BuildTools/CheckHeaders.py b/BuildTools/CheckHeaders.py index b599099..8d20f4e 100755 --- a/BuildTools/CheckHeaders.py +++ b/BuildTools/CheckHeaders.py | |||
| @@ -4,12 +4,12 @@ import os, sys | |||
| 4 | 4 | ||
| 5 | FORBIDDEN_INCLUDES = [ | 5 | FORBIDDEN_INCLUDES = [ |
| 6 | ("iostream", ["Swiften/Base/format.h"]), | 6 | ("iostream", ["Swiften/Base/format.h"]), |
| 7 | ("Base/Log.h", []), | 7 | ("Base/Log.h", []), |
| 8 | ("Base/format.h", []), | 8 | ("Base/format.h", []), |
| 9 | ("algorithm", ["Swiften/Base/Algorithm.h", "Swiften/Base/SafeAllocator.h", "Swiften/Base/Listenable.h"]), | 9 | ("algorithm", ["Swiften/Base/Algorithm.h", "Swiften/Base/SafeAllocator.h", "Swiften/Base/Listenable.h", "Swiften/Base/Concat.h"]), |
| 10 | ("boost/bind.hpp", ["Swiften/Base/Listenable.h"]), | 10 | ("boost/bind.hpp", ["Swiften/Base/Listenable.h", "Swiften/FileTransfer/S5BTransportSession.h"]), |
| 11 | ("boost/filesystem.hpp", []), | 11 | ("boost/filesystem.hpp", []), |
| 12 | ("Base/foreach.h", []), | 12 | ("Base/foreach.h", []), |
| 13 | ("boost/date_time/date_time.hpp", []), | 13 | ("boost/date_time/date_time.hpp", []), |
| 14 | ("boost/filesystem/filesystem.hpp", []), | 14 | ("boost/filesystem/filesystem.hpp", []), |
| 15 | 15 | ||
diff --git a/Swiften/Base/Concat.h b/Swiften/Base/Concat.h index 97b04f2..1d158d5 100644 --- a/Swiften/Base/Concat.h +++ b/Swiften/Base/Concat.h | |||
| @@ -1,13 +1,15 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2011 Isode Limited. | 2 | * Copyright (c) 2011-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <algorithm> | ||
| 10 | |||
| 9 | namespace Swift { | 11 | namespace Swift { |
| 10 | template<typename C> | 12 | template<typename C> |
| 11 | C concat(const C& c1, const C& c2) { | 13 | C concat(const C& c1, const C& c2) { |
| 12 | C result; | 14 | C result; |
| 13 | result.resize(c1.size() + c2.size()); | 15 | result.resize(c1.size() + c2.size()); |
diff --git a/Swiften/Base/Listenable.h b/Swiften/Base/Listenable.h index 994480d..655599a 100644 --- a/Swiften/Base/Listenable.h +++ b/Swiften/Base/Listenable.h | |||
| @@ -1,16 +1,19 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2013 Isode Limited. | 2 | * Copyright (c) 2013-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <Swiften/Base/API.h> | ||
| 10 | #include <boost/bind.hpp> | ||
| 11 | #include <algorithm> | 9 | #include <algorithm> |
| 10 | #include <vector> | ||
| 11 | |||
| 12 | #include <boost/bind.hpp> | ||
| 13 | |||
| 14 | #include <Swiften/Base/API.h> | ||
| 12 | 15 | ||
| 13 | namespace Swift { | 16 | namespace Swift { |
| 14 | template<typename T> | 17 | template<typename T> |
| 15 | class SWIFTEN_API Listenable { | 18 | class SWIFTEN_API Listenable { |
| 16 | public: | 19 | public: |
diff --git a/Swiften/Elements/CompressRequest.h b/Swiften/Elements/CompressRequest.h index 4e2a3a4..1c3fb39 100644 --- a/Swiften/Elements/CompressRequest.h +++ b/Swiften/Elements/CompressRequest.h | |||
| @@ -4,10 +4,12 @@ | |||
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <string> | ||
| 10 | |||
| 9 | #include <Swiften/Base/API.h> | 11 | #include <Swiften/Base/API.h> |
| 10 | #include <Swiften/Elements/ToplevelElement.h> | 12 | #include <Swiften/Elements/ToplevelElement.h> |
| 11 | 13 | ||
| 12 | namespace Swift { | 14 | namespace Swift { |
| 13 | class SWIFTEN_API CompressRequest : public ToplevelElement | 15 | class SWIFTEN_API CompressRequest : public ToplevelElement |
diff --git a/Swiften/Elements/FormReportedRef.h b/Swiften/Elements/FormReportedRef.h index b985167..03a89d1 100644 --- a/Swiften/Elements/FormReportedRef.h +++ b/Swiften/Elements/FormReportedRef.h | |||
| @@ -3,10 +3,12 @@ | |||
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | #pragma once | 6 | #pragma once |
| 7 | 7 | ||
| 8 | #include <boost/shared_ptr.hpp> | ||
| 9 | |||
| 8 | #include <Swiften/Base/API.h> | 10 | #include <Swiften/Base/API.h> |
| 9 | 11 | ||
| 10 | namespace Swift { | 12 | namespace Swift { |
| 11 | 13 | ||
| 12 | class SWIFTEN_API FormReportedRef { | 14 | class SWIFTEN_API FormReportedRef { |
diff --git a/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h b/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h index f885d3b..38bc3e1 100644 --- a/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h +++ b/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h | |||
| @@ -10,13 +10,15 @@ | |||
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #pragma once | 13 | #pragma once |
| 14 | 14 | ||
| 15 | #include <vector> | ||
| 16 | |||
| 15 | #include <Swiften/Base/API.h> | 17 | #include <Swiften/Base/API.h> |
| 16 | #include <Swiften/Elements/Whiteboard/WhiteboardElement.h> | ||
| 17 | #include <Swiften/Elements/Whiteboard/WhiteboardColor.h> | 18 | #include <Swiften/Elements/Whiteboard/WhiteboardColor.h> |
| 19 | #include <Swiften/Elements/Whiteboard/WhiteboardElement.h> | ||
| 18 | 20 | ||
| 19 | namespace Swift { | 21 | namespace Swift { |
| 20 | class SWIFTEN_API WhiteboardPolygonElement : public WhiteboardElement { | 22 | class SWIFTEN_API WhiteboardPolygonElement : public WhiteboardElement { |
| 21 | typedef std::pair<int, int> Point; | 23 | typedef std::pair<int, int> Point; |
| 22 | public: | 24 | public: |
diff --git a/Swiften/FileTransfer/S5BTransportSession.h b/Swiften/FileTransfer/S5BTransportSession.h index 234c491..b3eee3c 100644 --- a/Swiften/FileTransfer/S5BTransportSession.h +++ b/Swiften/FileTransfer/S5BTransportSession.h | |||
| @@ -4,14 +4,16 @@ | |||
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <boost/bind.hpp> | ||
| 10 | |||
| 9 | #include <Swiften/Base/API.h> | 11 | #include <Swiften/Base/API.h> |
| 10 | #include <Swiften/Base/boost_bsignals.h> | 12 | #include <Swiften/Base/boost_bsignals.h> |
| 11 | #include <Swiften/FileTransfer/TransportSession.h> | ||
| 12 | #include <Swiften/FileTransfer/ReadBytestream.h> | 13 | #include <Swiften/FileTransfer/ReadBytestream.h> |
| 14 | #include <Swiften/FileTransfer/TransportSession.h> | ||
| 13 | #include <Swiften/FileTransfer/WriteBytestream.h> | 15 | #include <Swiften/FileTransfer/WriteBytestream.h> |
| 14 | 16 | ||
| 15 | namespace Swift { | 17 | namespace Swift { |
| 16 | 18 | ||
| 17 | template <typename T> | 19 | template <typename T> |
diff --git a/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h b/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h index d629db2..1815955 100644 --- a/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h +++ b/Swiften/Serializer/PayloadSerializers/StartSessionSerializer.h | |||
| @@ -7,12 +7,13 @@ | |||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <boost/lexical_cast.hpp> | 9 | #include <boost/lexical_cast.hpp> |
| 10 | 10 | ||
| 11 | #include <Swiften/Base/API.h> | 11 | #include <Swiften/Base/API.h> |
| 12 | #include <Swiften/Serializer/GenericPayloadSerializer.h> | ||
| 13 | #include <Swiften/Elements/StartSession.h> | 12 | #include <Swiften/Elements/StartSession.h> |
| 13 | #include <Swiften/Serializer/GenericPayloadSerializer.h> | ||
| 14 | #include <Swiften/Serializer/XML/XMLElement.h> | ||
| 14 | 15 | ||
| 15 | namespace Swift { | 16 | namespace Swift { |
| 16 | class SWIFTEN_API StartSessionSerializer : public GenericPayloadSerializer<StartSession> { | 17 | class SWIFTEN_API StartSessionSerializer : public GenericPayloadSerializer<StartSession> { |
| 17 | public: | 18 | public: |
| 18 | StartSessionSerializer() : GenericPayloadSerializer<StartSession>() {} | 19 | StartSessionSerializer() : GenericPayloadSerializer<StartSession>() {} |
diff --git a/Swiften/Serializer/XML/XMLTextNode.h b/Swiften/Serializer/XML/XMLTextNode.h index 65d6459..86efdf1 100644 --- a/Swiften/Serializer/XML/XMLTextNode.h +++ b/Swiften/Serializer/XML/XMLTextNode.h | |||
| @@ -4,13 +4,15 @@ | |||
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <boost/shared_ptr.hpp> | ||
| 10 | |||
| 9 | #include <Swiften/Base/API.h> | 11 | #include <Swiften/Base/API.h> |
| 10 | #include <Swiften/Serializer/XML/XMLNode.h> | ||
| 11 | #include <Swiften/Base/String.h> | 12 | #include <Swiften/Base/String.h> |
| 13 | #include <Swiften/Serializer/XML/XMLNode.h> | ||
| 12 | 14 | ||
| 13 | namespace Swift { | 15 | namespace Swift { |
| 14 | class SWIFTEN_API XMLTextNode : public XMLNode { | 16 | class SWIFTEN_API XMLTextNode : public XMLNode { |
| 15 | public: | 17 | public: |
| 16 | typedef boost::shared_ptr<XMLTextNode> ref; | 18 | typedef boost::shared_ptr<XMLTextNode> ref; |
Swift