summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal/OutgoingLinkLocalSession.h')
-rw-r--r--Swiften/LinkLocal/OutgoingLinkLocalSession.h29
1 files changed, 5 insertions, 24 deletions
diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.h b/Swiften/LinkLocal/OutgoingLinkLocalSession.h
index d3fed0b..904a9d3 100644
--- a/Swiften/LinkLocal/OutgoingLinkLocalSession.h
+++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.h
@@ -5,51 +5,32 @@
#include <boost/enable_shared_from_this.hpp>
#include <vector>
-#include "Swiften/LinkLocal/LinkLocalSession.h"
+#include "Swiften/Session/Session.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 {
+ class OutgoingLinkLocalSession : public Session {
public:
OutgoingLinkLocalSession(
const JID& localJID,
const JID& remoteJID,
- const String& hostname,
- int port,
- boost::shared_ptr<DNSSDService> resolver,
+ boost::shared_ptr<Connection> connection,
PayloadParserFactoryCollection* payloadParserFactories,
- PayloadSerializerCollection* payloadSerializers,
- ConnectionFactory* connectionFactory);
+ PayloadSerializerCollection* payloadSerializers);
- const JID& getRemoteJID() const {
- return remoteJID_;
- }
-
- void start();
-
- void sendElement(boost::shared_ptr<Element> stanza);
+ void queueElement(boost::shared_ptr<Element> element);
private:
void handleElement(boost::shared_ptr<Element>);
void handleStreamStart(const ProtocolHeader&);
- void handleHostnameResolved(const String& hostname, const boost::optional<HostAddress>& address);
- void handleConnected(bool error);
private:
- bool resolving_;
- JID remoteJID_;
- String hostname_;
- int port_;
- boost::shared_ptr<DNSSDService> resolver_;
std::vector<boost::shared_ptr<Element> > queuedElements_;
- ConnectionFactory* connectionFactory_;
};
}