#pragma once #include #include #include #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 { public: OutgoingLinkLocalSession( const JID& localJID, const JID& remoteJID, const String& hostname, boost::shared_ptr resolver, PayloadParserFactoryCollection* payloadParserFactories, PayloadSerializerCollection* payloadSerializers, ConnectionFactory* connectionFactory); const JID& getRemoteJID() const { return remoteJID_; } void start(); private: void handleElement(boost::shared_ptr); void handleStreamStart(const ProtocolHeader&); //void handleHostnameResolved(const String& hostname, const HostAddress& address); private: bool resolving_; JID remoteJID_; String hostname_; boost::shared_ptr resolver_; ConnectionFactory* connectionFactory_; }; }