diff --git a/include/Swiften/FileTransfer/MyOutgoingSIFileTransfer.h b/include/Swiften/FileTransfer/MyOutgoingSIFileTransfer.h index 8fa88ea6fe48184c30233ceacc11bc3c7fce28bf..7e35383065529ff40173163228f0144d58028714 100644 --- a/include/Swiften/FileTransfer/MyOutgoingSIFileTransfer.h +++ b/include/Swiften/FileTransfer/MyOutgoingSIFileTransfer.h @@ -1,56 +1,58 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#pragma once - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Swift { - class IQRouter; - class SOCKS5BytestreamServer; - class SOCKS5BytestreamRegistry; - - class MyOutgoingSIFileTransfer : public OutgoingFileTransfer { - public: - MyOutgoingSIFileTransfer(const std::string& id, const JID& from, const JID& to, const std::string& name, int size, const std::string& description, boost::shared_ptr bytestream, IQRouter* iqRouter, SOCKS5BytestreamServer* socksServer, SOCKS5BytestreamRegistry* registry); - - virtual void start(); - virtual void stop(); - virtual void cancel(); - - boost::signal&)> onFinished; - - private: - void handleStreamInitiationRequestResponse(StreamInitiation::ref, ErrorPayload::ref); - void handleBytestreamsRequestResponse(Bytestreams::ref, ErrorPayload::ref); - void finish(boost::optional error); - void handleIBBSessionFinished(boost::optional error); - - private: - std::string id; - JID from; - JID to; - std::string name; - int size; - std::string description; - boost::shared_ptr bytestream; - IQRouter* iqRouter; - SOCKS5BytestreamServer* socksServer; - boost::shared_ptr ibbSession; - SOCKS5BytestreamRegistry *registry; - }; -} +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define HAVE_SWIFTEN_3 SWIFTEN_VERSION >= 0x030000 + +namespace Swift { + class IQRouter; + class SOCKS5BytestreamServer; + class SOCKS5BytestreamRegistry; + + class MyOutgoingSIFileTransfer : public OutgoingFileTransfer { + public: + MyOutgoingSIFileTransfer(const std::string& id, const JID& from, const JID& to, const std::string& name, int size, const std::string& description, boost::shared_ptr bytestream, IQRouter* iqRouter, SOCKS5BytestreamServer* socksServer, SOCKS5BytestreamRegistry* registry); + + virtual void start(); + virtual void stop(); + virtual void cancel(); + + boost::signal&)> onFinished; + + private: + void handleStreamInitiationRequestResponse(StreamInitiation::ref, ErrorPayload::ref); + void handleBytestreamsRequestResponse(Bytestreams::ref, ErrorPayload::ref); + void finish(boost::optional error); + void handleIBBSessionFinished(boost::optional error); + + private: + std::string id; + JID from; + JID to; + std::string name; + int size; + std::string description; + boost::shared_ptr bytestream; + IQRouter* iqRouter; + SOCKS5BytestreamServer* socksServer; + boost::shared_ptr ibbSession; + SOCKS5BytestreamRegistry *registry; + }; +}