/* * 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 "Swiften/SwiftenCompat.h" namespace Swift { class DummyConnectionServer : public ConnectionServer { public: enum Error { Conflict, UnknownError }; static SWIFTEN_SHRPTR_NAMESPACE::shared_ptr create(EventLoop* eventLoop) { return SWIFTEN_SHRPTR_NAMESPACE::shared_ptr(new DummyConnectionServer(eventLoop)); } void acceptConnection(SWIFTEN_SHRPTR_NAMESPACE::shared_ptr connection); #if (SWIFTEN_VERSION >= 0x030000) virtual boost::optional tryStart() { return boost::optional(); } #endif virtual void start(); virtual void stop(); virtual HostAddressPort getAddressPort() const; private: DummyConnectionServer(EventLoop* eventLoop); private: HostAddress address_; EventLoop* eventLoop; }; }