/* * Copyright (c) 2010 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #include #include #include #include #include #if HAVE_SWIFTEN_3 #include #include #include #include #endif namespace Swift { DummyNetworkFactories::DummyNetworkFactories(EventLoop* eventLoop) { timerFactory = new DummyTimerFactory(); connectionFactory = new DummyConnectionFactory(eventLoop); #if HAVE_SWIFTEN_3 idnConverter = SWIFTEN_SHRPTR_NAMESPACE::shared_ptr(PlatformIDNConverter::create()); domainNameResolver = new PlatformDomainNameResolver(idnConverter.get(), eventLoop); cryptoProvider = PlatformCryptoProvider::create(); networkEnvironment = new PlatformNetworkEnvironment(); #else domainNameResolver = new PlatformDomainNameResolver(eventLoop); #endif connectionServerFactory = new DummyConnectionServerFactory(eventLoop); m_platformXMLParserFactory = new PlatformXMLParserFactory(); this->eventLoop = eventLoop; } DummyNetworkFactories::~DummyNetworkFactories() { delete connectionServerFactory; delete domainNameResolver; delete connectionFactory; delete timerFactory; delete m_platformXMLParserFactory; #if HAVE_SWIFTEN_3 delete cryptoProvider; delete networkEnvironment; #endif } }