diff --git a/include/Swiften/Network/DummyConnectionServer.h b/include/Swiften/Network/DummyConnectionServer.h new file mode 100644 index 0000000000000000000000000000000000000000..0e2a141cd18e064870c66a471259f961ac2b04a2 --- /dev/null +++ b/include/Swiften/Network/DummyConnectionServer.h @@ -0,0 +1,49 @@ +/* + * 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 + +namespace Swift { + class DummyConnectionServer : public ConnectionServer, public EventOwner, public boost::enable_shared_from_this { + public: + typedef boost::shared_ptr ref; + + enum Error { + Conflict, + UnknownError + }; + + static ref create(EventLoop* eventLoop) { + return ref(new DummyConnectionServer(eventLoop)); + } + + void acceptConnection(boost::shared_ptr connection); + + virtual void start(); + virtual void stop(); + + virtual HostAddressPort getAddressPort() const; + + + private: + DummyConnectionServer(EventLoop* eventLoop); + + + private: + HostAddress address_; + EventLoop* eventLoop; + }; +}