Fix compilation with Swiften2
This commit is contained in:
parent
8d55add7d5
commit
4e263cb53a
2 changed files with 13 additions and 0 deletions
|
@ -15,8 +15,12 @@ namespace Swift {
|
|||
DummyNetworkFactories::DummyNetworkFactories(EventLoop* eventLoop) {
|
||||
timerFactory = new DummyTimerFactory();
|
||||
connectionFactory = new DummyConnectionFactory(eventLoop);
|
||||
#if HAVE_SWIFTEN_3
|
||||
idnConverter = boost::shared_ptr<IDNConverter>(PlatformIDNConverter::create());
|
||||
domainNameResolver = new PlatformDomainNameResolver(idnConverter.get(), eventLoop);
|
||||
#else
|
||||
domainNameResolver = new PlatformDomainNameResolver(eventLoop);
|
||||
#endif
|
||||
connectionServerFactory = new DummyConnectionServerFactory(eventLoop);
|
||||
m_platformXMLParserFactory = new PlatformXMLParserFactory();
|
||||
this->eventLoop = eventLoop;
|
||||
|
|
|
@ -6,10 +6,15 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <Swiften/Version.h>
|
||||
#define HAVE_SWIFTEN_3 SWIFTEN_VERSION >= 0x030000
|
||||
|
||||
#include <Swiften/Network/NetworkFactories.h>
|
||||
#include <Swiften/Parser/PlatformXMLParserFactory.h>
|
||||
#if HAVE_SWIFTEN_3
|
||||
#include <Swiften/IDN/IDNConverter.h>
|
||||
#include <Swiften/IDN/PlatformIDNConverter.h>
|
||||
#endif
|
||||
|
||||
namespace Swift {
|
||||
class EventLoop;
|
||||
|
@ -27,9 +32,11 @@ namespace Swift {
|
|||
return connectionFactory;
|
||||
}
|
||||
|
||||
#if HAVE_SWIFTEN_3
|
||||
IDNConverter* getIDNConverter() const {
|
||||
return idnConverter.get();
|
||||
}
|
||||
#endif
|
||||
|
||||
DomainNameResolver* getDomainNameResolver() const {
|
||||
return domainNameResolver;
|
||||
|
@ -63,7 +70,9 @@ namespace Swift {
|
|||
PlatformXMLParserFactory *m_platformXMLParserFactory;
|
||||
TimerFactory* timerFactory;
|
||||
ConnectionFactory* connectionFactory;
|
||||
#if HAVE_SWIFTEN_3
|
||||
boost::shared_ptr<IDNConverter> idnConverter;
|
||||
#endif
|
||||
DomainNameResolver* domainNameResolver;
|
||||
ConnectionServerFactory* connectionServerFactory;
|
||||
EventLoop *eventLoop;
|
||||
|
|
Loading…
Add table
Reference in a new issue