diff options
Diffstat (limited to 'Swiften/LinkLocal/OutgoingLinkLocalSession.h')
-rw-r--r-- | Swiften/LinkLocal/OutgoingLinkLocalSession.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.h b/Swiften/LinkLocal/OutgoingLinkLocalSession.h new file mode 100644 index 0000000..ae1e86b --- /dev/null +++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.h @@ -0,0 +1,48 @@ +#pragma once + +#include <boost/shared_ptr.hpp> +#include <boost/signal.hpp> +#include <boost/enable_shared_from_this.hpp> + +#include "Swiften/LinkLocal/LinkLocalSession.h" +#include "Swiften/JID/JID.h" + +namespace Swift { + class ConnectionFactory; + class HostAddress; + class String; + class Element; + class PayloadParserFactoryCollection; + class PayloadSerializerCollection; + class DNSSDService; + + class OutgoingLinkLocalSession : public LinkLocalSession, public boost::enable_shared_from_this<OutgoingLinkLocalSession> { + public: + OutgoingLinkLocalSession( + const JID& localJID, + const JID& remoteJID, + const String& hostname, + boost::shared_ptr<DNSSDService> resolver, + PayloadParserFactoryCollection* payloadParserFactories, + PayloadSerializerCollection* payloadSerializers, + ConnectionFactory* connectionFactory); + + const JID& getRemoteJID() const { + return remoteJID_; + } + + void start(); + + private: + void handleElement(boost::shared_ptr<Element>); + void handleStreamStart(const ProtocolHeader&); + //void handleHostnameResolved(const String& hostname, const HostAddress& address); + + private: + bool resolving_; + JID remoteJID_; + String hostname_; + boost::shared_ptr<DNSSDService> resolver_; + ConnectionFactory* connectionFactory_; + }; +} |