diff options
author | Tobias Markmann <tm@ayena.de> | 2017-06-24 19:24:28 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-06-26 04:18:34 (GMT) |
commit | bd0e671455f6b042bbbd385f1551e9a5011badf5 (patch) | |
tree | 9a496a300584d2b09220117af6fb52568102e5ee /Swiften/FileTransfer | |
parent | 02763529a75970a1d57d9abf3448848f728c4101 (diff) | |
download | swift-bd0e671455f6b042bbbd385f1551e9a5011badf5.zip swift-bd0e671455f6b042bbbd385f1551e9a5011badf5.tar.bz2 |
Remove unneeded forward declarations from Swiften headers
Found by cppclean.
Test-Information:
Still builds on macOS 10.12.5 with clang trunk.
Change-Id: Ie8a154e12b196587c956c8b333abf529a36f6bb3
Diffstat (limited to 'Swiften/FileTransfer')
-rw-r--r-- | Swiften/FileTransfer/IncomingJingleFileTransfer.h | 16 | ||||
-rw-r--r-- | Swiften/FileTransfer/JingleFileTransfer.h | 6 | ||||
-rw-r--r-- | Swiften/FileTransfer/OutgoingJingleFileTransfer.h | 3 | ||||
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamClientSession.h | 3 | ||||
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamRegistry.h | 4 | ||||
-rw-r--r-- | Swiften/FileTransfer/SOCKS5BytestreamServer.h | 3 |
6 files changed, 12 insertions, 23 deletions
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.h b/Swiften/FileTransfer/IncomingJingleFileTransfer.h index 3dd206d..7ddf700 100644 --- a/Swiften/FileTransfer/IncomingJingleFileTransfer.h +++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.h @@ -1,64 +1,62 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <memory> #include <string> #include <boost/cstdint.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/ByteArray.h> #include <Swiften/Base/Override.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/FileTransferOptions.h> #include <Swiften/FileTransfer/IncomingFileTransfer.h> #include <Swiften/FileTransfer/JingleFileTransfer.h> #include <Swiften/Jingle/JingleContentID.h> namespace Swift { - class JID; - class JingleSession; - class JingleContentPayload; - class FileTransferTransporter; - class FileTransferTransporterFactory; - class TimerFactory; - class Timer; class CryptoProvider; + class FileTransferTransporterFactory; class IncrementalBytestreamHashCalculator; + class JID; + class JingleContentPayload; class JingleFileTransferDescription; - class HashElement; + class JingleSession; + class Timer; + class TimerFactory; /** * @brief The IncomingJingleFileTransfer class contains the business logic for managing incoming * Jingle file transfers. * * Calling IncomingJingleFileTransfer::accept will start to negotiate possible transfer * methods and after a working method has been decided among peers the trasnfer is started. */ class SWIFTEN_API IncomingJingleFileTransfer : public IncomingFileTransfer, public JingleFileTransfer { public: typedef std::shared_ptr<IncomingJingleFileTransfer> ref; IncomingJingleFileTransfer( const JID& recipient, std::shared_ptr<JingleSession>, std::shared_ptr<JingleContentPayload> content, FileTransferTransporterFactory*, TimerFactory*, CryptoProvider*); virtual ~IncomingJingleFileTransfer(); virtual void accept(std::shared_ptr<WriteBytestream>, const FileTransferOptions& = FileTransferOptions()) SWIFTEN_OVERRIDE; virtual void cancel() SWIFTEN_OVERRIDE; private: enum State { Initial, GeneratingInitialLocalCandidates, TryingCandidates, WaitingForPeerProxyActivate, diff --git a/Swiften/FileTransfer/JingleFileTransfer.h b/Swiften/FileTransfer/JingleFileTransfer.h index 5b9dd62..dd9bcb9 100644 --- a/Swiften/FileTransfer/JingleFileTransfer.h +++ b/Swiften/FileTransfer/JingleFileTransfer.h @@ -1,55 +1,51 @@ /* - * Copyright (c) 2013-2016 Isode Limited. + * Copyright (c) 2013-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <memory> #include <vector> #include <boost/signals2.hpp> #include <Swiften/Base/API.h> #include <Swiften/Elements/ErrorPayload.h> #include <Swiften/Elements/JingleS5BTransportPayload.h> #include <Swiften/FileTransfer/FileTransfer.h> #include <Swiften/Jingle/AbstractJingleSessionListener.h> #include <Swiften/Jingle/JingleContentID.h> namespace Swift { - class CryptoProvider; - class IQRouter; - class RemoteJingleTransportCandidateSelector; - class LocalJingleTransportCandidateGenerator; class JingleSession; class FileTransferTransporter; class FileTransferTransporterFactory; class TransportSession; class SWIFTEN_API JingleFileTransfer : public AbstractJingleSessionListener { public: JingleFileTransfer( std::shared_ptr<JingleSession>, const JID& target, FileTransferTransporterFactory*); virtual ~JingleFileTransfer(); protected: virtual void handleTransportInfoReceived(const JingleContentID&, JingleTransportPayload::ref); virtual void handleLocalTransportCandidatesGenerated( const std::string& s5bSessionID, const std::vector<JingleS5BTransportPayload::Candidate>&, const std::string& dstAddr) = 0; virtual void handleProxyActivateFinished( const std::string& s5bSessionID, ErrorPayload::ref error); virtual void decideOnCandidates(); void handleRemoteTransportCandidateSelectFinished( const std::string& s5bSessionID, const boost::optional<JingleS5BTransportPayload::Candidate>&); virtual JingleContentID getContentID() const = 0; virtual void startTransferring(std::shared_ptr<TransportSession>) = 0; virtual void terminate(JinglePayload::Reason::Type reason) = 0; virtual void fallback() = 0; virtual bool hasPriorityOnCandidateTie() const = 0; diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.h b/Swiften/FileTransfer/OutgoingJingleFileTransfer.h index cd45948..9fd1d76 100644 --- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.h +++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.h @@ -1,60 +1,59 @@ /* * Copyright (c) 2011 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ /* - * Copyright (c) 2013-2016 Isode Limited. + * Copyright (c) 2013-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <memory> #include <boost/optional/optional.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/Override.h> #include <Swiften/Elements/JingleFileTransferFileInfo.h> #include <Swiften/FileTransfer/FileTransferOptions.h> #include <Swiften/FileTransfer/JingleFileTransfer.h> #include <Swiften/FileTransfer/OutgoingFileTransfer.h> #include <Swiften/Jingle/JingleContentID.h> #include <Swiften/Network/Timer.h> namespace Swift { class CryptoProvider; - class FileTransferTransporter; class FileTransferTransporterFactory; class IDGenerator; class IncrementalBytestreamHashCalculator; class ReadBytestream; class TimerFactory; class TransportSession; class SWIFTEN_API OutgoingJingleFileTransfer : public OutgoingFileTransfer, public JingleFileTransfer { public: OutgoingJingleFileTransfer( const JID& to, std::shared_ptr<JingleSession>, std::shared_ptr<ReadBytestream>, FileTransferTransporterFactory*, TimerFactory*, IDGenerator*, const JingleFileTransferFileInfo&, const FileTransferOptions&, CryptoProvider*); virtual ~OutgoingJingleFileTransfer(); virtual void start() SWIFTEN_OVERRIDE; virtual void cancel() SWIFTEN_OVERRIDE; private: enum State { Initial, GeneratingInitialLocalCandidates, WaitingForAccept, TryingCandidates, diff --git a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h index b819910..70a7c9c 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamClientSession.h @@ -1,61 +1,60 @@ /* * Copyright (c) 2011 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ /* - * Copyright (c) 2015-2016 Isode Limited. + * Copyright (c) 2015-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <memory> #include <boost/optional.hpp> #include <Swiften/Base/API.h> #include <Swiften/Base/ByteArray.h> #include <Swiften/FileTransfer/FileTransferError.h> #include <Swiften/FileTransfer/ReadBytestream.h> #include <Swiften/FileTransfer/WriteBytestream.h> #include <Swiften/JID/JID.h> #include <Swiften/Network/Connection.h> #include <Swiften/Network/HostAddressPort.h> #include <Swiften/Network/Timer.h> namespace Swift { -class SOCKS5BytestreamRegistry; class Connection; class TimerFactory; /** * A session which has been connected to a SOCKS5 server (requester). * */ class SWIFTEN_API SOCKS5BytestreamClientSession { public: enum State { Initial, Hello, Authenticating, Ready, Writing, Reading, Finished }; public: typedef std::shared_ptr<SOCKS5BytestreamClientSession> ref; public: SOCKS5BytestreamClientSession( std::shared_ptr<Connection> connection, const HostAddressPort&, const std::string&, TimerFactory*); ~SOCKS5BytestreamClientSession(); diff --git a/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h b/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h index 2fa67fa..33bc57c 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamRegistry.h @@ -1,35 +1,33 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <map> #include <set> #include <string> #include <Swiften/Base/API.h> #include <Swiften/Base/IDGenerator.h> namespace Swift { - class SOCKS5BytestreamServerSession; - class SWIFTEN_API SOCKS5BytestreamRegistry { public: SOCKS5BytestreamRegistry(); void setHasBytestream(const std::string& destination, bool); bool hasBytestream(const std::string& destination) const; /** * Generate a new session ID to use for new S5B streams. */ std::string generateSessionID(); private: std::set<std::string> availableBytestreams; IDGenerator idGenerator; }; } diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServer.h b/Swiften/FileTransfer/SOCKS5BytestreamServer.h index c8866c4..16d3d29 100644 --- a/Swiften/FileTransfer/SOCKS5BytestreamServer.h +++ b/Swiften/FileTransfer/SOCKS5BytestreamServer.h @@ -1,48 +1,47 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include <map> #include <memory> #include <string> #include <Swiften/Base/API.h> #include <Swiften/FileTransfer/ReadBytestream.h> #include <Swiften/FileTransfer/SOCKS5BytestreamRegistry.h> #include <Swiften/JID/JID.h> #include <Swiften/Network/ConnectionServer.h> namespace Swift { class SOCKS5BytestreamServerSession; - class CryptoProvider; class SWIFTEN_API SOCKS5BytestreamServer { public: SOCKS5BytestreamServer( std::shared_ptr<ConnectionServer> connectionServer, SOCKS5BytestreamRegistry* registry); HostAddressPort getAddressPort() const; void start(); void stop(); std::vector< std::shared_ptr<SOCKS5BytestreamServerSession> > getSessions(const std::string& id) const; private: void handleNewConnection(std::shared_ptr<Connection> connection); void handleSessionFinished(std::shared_ptr<SOCKS5BytestreamServerSession>); private: friend class SOCKS5BytestreamServerSession; std::shared_ptr<ConnectionServer> connectionServer; SOCKS5BytestreamRegistry* registry; std::vector<std::shared_ptr<SOCKS5BytestreamServerSession> > sessions; }; } |