Changeset - 90ef6e3128f2
backends/libyahoo2/main.cpp
Show inline comments
 
@@ -2,7 +2,7 @@
 
#include "transport/config.h"
 
#include "transport/networkplugin.h"
 
#include "transport/logging.h"
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
// Yahoo2
 
#include <yahoo2.h>
backends/swiften/main.cpp
Show inline comments
 
@@ -8,7 +8,7 @@
 
// Swiften
 
#include "Swiften/Swiften.h"
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
#ifndef WIN32
 
// for signal handler
backends/twitter/TwitterPlugin.h
Show inline comments
 
@@ -33,7 +33,7 @@
 
#include <set>
 
#include <cstdio>
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 
#if HAVE_SWIFTEN_3
 
#include <Swiften/Crypto/CryptoProvider.h>
 
#include <Swiften/Crypto/PlatformCryptoProvider.h>
include/Swiften/FileTransfer/CombinedOutgoingFileTransferManager.h
Show inline comments
 
@@ -14,7 +14,7 @@
 
#include "transport/presenceoracle.h"
 
#include <Swiften/FileTransfer/OutgoingFileTransfer.h>
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
namespace Swift {
 

	
include/Swiften/FileTransfer/MyOutgoingSIFileTransfer.h
Show inline comments
 
@@ -19,7 +19,7 @@
 
#include <Swiften/Elements/ErrorPayload.h>
 
#include <Swiften/FileTransfer/IBBSendSession.h>
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
namespace Swift {
 
	class IQRouter;
include/Swiften/Network/DummyConnectionServer.h
Show inline comments
 
@@ -15,6 +15,7 @@
 
#include <Swiften/Network/DummyConnection.h>
 
#include <Swiften/Network/ConnectionServer.h>
 
#include <Swiften/EventLoop/EventOwner.h>
 
#include <Swiften/Version.h>
 

	
 
namespace Swift {
 
	class DummyConnectionServer : public ConnectionServer, public EventOwner, public boost::enable_shared_from_this<DummyConnectionServer> {
 
@@ -32,9 +33,11 @@ namespace Swift {
 

	
 
			void acceptConnection(boost::shared_ptr<Swift::Connection> connection);
 

	
 
			virtual boost::optional<Swift::ConnectionServer::Error> tryStart() {
 
				return boost::optional<Swift::ConnectionServer::Error>();
 
#if (SWIFTEN_VERSION >= 0x030000)
 
			virtual boost::optional<ConnectionServer::Error> tryStart() {
 
				return boost::optional<ConnectionServer::Error>();
 
			}
 
#endif
 

	
 
			virtual void start();
 
			virtual void stop();
include/Swiften/Network/DummyNetworkFactories.h
Show inline comments
 
@@ -7,7 +7,7 @@
 
#pragma once
 

	
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
#include <Swiften/Network/NetworkFactories.h>
 
#include <Swiften/Parser/PlatformXMLParserFactory.h>
include/Swiften/Server/ServerFromClientSession.cpp
Show inline comments
 
@@ -29,6 +29,11 @@
 
#include <iostream>
 
#include <Swiften/TLS/CertificateWithKey.h>
 

	
 
#include <Swiften/Version.h>
 
#if (SWIFTEN_VERSION >= 0x030000)
 
#include <Swiften/Elements/ToplevelElement.h>
 
#endif
 

	
 
namespace Swift {
 

	
 
ServerFromClientSession::ServerFromClientSession(
 
@@ -76,7 +81,11 @@ void ServerFromClientSession::handlePasswordInvalid(const std::string &error) {
 
	}
 
}
 

	
 
#if (SWIFTEN_VERSION >= 0x030000)
 
void ServerFromClientSession::handleElement(boost::shared_ptr<ToplevelElement> element) {
 
#else
 
void ServerFromClientSession::handleElement(boost::shared_ptr<Element> element) {	
 
#endif
 
	if (isInitialized()) {
 
		onElementReceived(element);
 
	}
include/Swiften/Server/ServerFromClientSession.h
Show inline comments
 
@@ -17,7 +17,7 @@
 
#include <Swiften/Base/ByteArray.h>
 
#include <Swiften/TLS/CertificateWithKey.h>
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
namespace Swift {
 
	class ProtocolHeader;
include/Swiften/Server/ServerStanzaChannel.h
Show inline comments
 
@@ -16,7 +16,7 @@
 
#include "Swiften/Elements/Presence.h"
 
#include "Swiften/TLS/Certificate.h"
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
namespace Swift {
 
	class Error;
include/transport/filetransfermanager.h
Show inline comments
 
@@ -20,23 +20,22 @@
 

	
 
#pragma once
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
#include <Swiften/Elements/StreamInitiationFileInfo.h>
 
#if !HAVE_SWIFTEN_3
 
#include <Swiften/FileTransfer/ConnectivityManager.h>
 
#endif
 
#include <Swiften/FileTransfer/CombinedOutgoingFileTransferManager.h>
 
#include <Swiften/FileTransfer/IncomingFileTransferManager.h>
 
#if !HAVE_SWIFTEN_3
 
#include <Swiften/FileTransfer/DefaultLocalJingleTransportCandidateGeneratorFactory.h>
 
#include <Swiften/FileTransfer/DefaultRemoteJingleTransportCandidateSelectorFactory.h>
 
#else
 
#include <Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h>
 
#include <Swiften/FileTransfer/SOCKS5BytestreamServerManager.h>
 
#endif
 
#include <Swiften/FileTransfer/SOCKS5BytestreamRegistry.h>
 
#include <Swiften/FileTransfer/SOCKS5BytestreamServer.h>
 
#if !HAVE_SWIFTEN_3
 

	
 

	
 
#if HAVE_SWIFTEN_3
 
#include <Swiften/FileTransfer/SOCKS5BytestreamProxiesManager.h>
 
#include <Swiften/FileTransfer/SOCKS5BytestreamServerManager.h>
 
#else
 
#include <Swiften/FileTransfer/ConnectivityManager.h>
 
#include <Swiften/FileTransfer/DefaultLocalJingleTransportCandidateGeneratorFactory.h>
 
#include <Swiften/FileTransfer/DefaultRemoteJingleTransportCandidateSelectorFactory.h>
 
#include <Swiften/FileTransfer/SOCKS5BytestreamProxy.h>
 
#endif
 

	
include/transport/networkpluginserver.h
Show inline comments
 
@@ -36,7 +36,7 @@
 
#include "storagebackend.h"
 
#include "transport/filetransfermanager.h"
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
namespace Transport {
 

	
include/transport/settingsadhoccommand.h
Show inline comments
 
@@ -26,7 +26,7 @@
 
#include "transport/adhoccommand.h"
 
#include "transport/adhoccommandfactory.h"
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 

	
 
namespace Transport {
include/transport/userregistration.h
Show inline comments
 
@@ -25,7 +25,7 @@
 
#include "Swiften/Elements/RosterPayload.h"
 
#include <boost/signal.hpp>
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
namespace Transport {
 

	
src/discoinforesponder.h
Show inline comments
 
@@ -27,7 +27,7 @@
 
#include "Swiften/Elements/DiscoInfo.h"
 
#include "Swiften/Elements/CapsInfo.h"
 
#include <Swiften/Version.h>
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 
#if HAVE_SWIFTEN_3
 
#include <Swiften/Crypto/CryptoProvider.h>
 
#include <Swiften/Crypto/PlatformCryptoProvider.h>
src/tests/basictest.h
Show inline comments
 
@@ -45,7 +45,7 @@
 
#include "Swiften/Server/ServerStanzaChannel.h"
 
#include "Swiften/Server/ServerFromClientSession.h"
 
#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h"
 
#define HAVE_SWIFTEN_3  SWIFTEN_VERSION >= 0x030000
 
#define HAVE_SWIFTEN_3  (SWIFTEN_VERSION >= 0x030000)
 

	
 
using namespace Transport;
 

	
src/tests/settingsadhoccommand.cpp
Show inline comments
 
@@ -19,6 +19,7 @@
 
#include "Swiften/Server/ServerStanzaChannel.h"
 
#include "Swiften/Server/ServerFromClientSession.h"
 
#include "Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.h"
 
#include "Swiften/Version.h"
 
#include "basictest.h"
 

	
 
using namespace Transport;
 
@@ -147,7 +148,11 @@ class SettingsAdHocCommandTest : public CPPUNIT_NS :: TestFixture, public BasicT
 

	
 
			// set enabled_transport = 0
 
			Swift::FormField::ref f = getStanza(received[0])->getPayload<Swift:: Command>()->getForm()->getField("enable_transport");
 
#if (SWIFTEN_VERSION >= 0x030000)
 
			f->setBoolValue(false);
 
#else
 
			boost::dynamic_pointer_cast<Swift::BooleanFormField>(f)->setValue(false);
 
#endif
 

	
 
			std::string sessionId = getStanza(received[0])->getPayload<Swift::Command>()->getSessionID();
 

	
 
@@ -207,7 +212,11 @@ class SettingsAdHocCommandTest : public CPPUNIT_NS :: TestFixture, public BasicT
 

	
 
			// set enabled_transport = 0
 
			f = getStanza(received[0])->getPayload<Swift:: Command>()->getForm()->getField("enable_transport");
 
#if (SWIFTEN_VERSION >= 0x030000)
 
			CPPUNIT_ASSERT_EQUAL(false, f->getBoolValue());
 
#else
 
			CPPUNIT_ASSERT_EQUAL(false, boost::dynamic_pointer_cast<Swift::BooleanFormField>(f)->getValue());
 
#endif
 
		}
 

	
 
		void executeTwoCommands() {
 
@@ -355,7 +364,11 @@ class SettingsAdHocCommandTest : public CPPUNIT_NS :: TestFixture, public BasicT
 

	
 
			// set enabled_transport = 0
 
			Swift::FormField::ref f = getStanza(received[0])->getPayload<Swift:: Command>()->getForm()->getField("send_headlines");
 
#if (SWIFTEN_VERSION >= 0x030000)
 
			f->setBoolValue(true);
 
#else
 
			boost::dynamic_pointer_cast<Swift::BooleanFormField>(f)->setValue(true);
 
#endif
 

	
 
			std::string sessionId = getStanza(received[0])->getPayload<Swift::Command>()->getSessionID();
 

	
 
@@ -397,7 +410,11 @@ class SettingsAdHocCommandTest : public CPPUNIT_NS :: TestFixture, public BasicT
 
			CPPUNIT_ASSERT(getStanza(received[0])->getPayload<Swift::Command>()->getForm());
 
			CPPUNIT_ASSERT(getStanza(received[0])->getPayload<Swift::Command>()->getForm()->getField("send_headlines"));
 
			Swift::FormField::ref f = getStanza(received[0])->getPayload<Swift:: Command>()->getForm()->getField("send_headlines");
 
#if (SWIFTEN_VERSION >= 0x030000)
 
			CPPUNIT_ASSERT_EQUAL(true, f->getBoolValue());
 
#else
 
			CPPUNIT_ASSERT_EQUAL(true, boost::dynamic_pointer_cast<Swift::BooleanFormField>(f)->getValue());
 
#endif
 
		}
 

	
 
};
0 comments (0 inline, 0 general)