diff options
Diffstat (limited to 'Swiften/Network/BoostNetworkFactories.h')
-rw-r--r-- | Swiften/Network/BoostNetworkFactories.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Swiften/Network/BoostNetworkFactories.h b/Swiften/Network/BoostNetworkFactories.h new file mode 100644 index 0000000..3f8b557 --- /dev/null +++ b/Swiften/Network/BoostNetworkFactories.h @@ -0,0 +1,37 @@ +/* + * 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 "Swiften/Network/NetworkFactories.h" +#include "Swiften/Network/BoostIOServiceThread.h" + +namespace Swift { + class EventLoop; + + class BoostNetworkFactories : public NetworkFactories { + public: + BoostNetworkFactories(EventLoop* eventLoop); + ~BoostNetworkFactories(); + + virtual TimerFactory* getTimerFactory() const { + return timerFactory; + } + + virtual ConnectionFactory* getConnectionFactory() const { + return connectionFactory; + } + + BoostIOServiceThread* getIOServiceThread() { + return &ioServiceThread; + } + + private: + BoostIOServiceThread ioServiceThread; + TimerFactory* timerFactory; + ConnectionFactory* connectionFactory; + }; +} |