summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal/LinkLocalConnector.h')
-rw-r--r--Swiften/LinkLocal/LinkLocalConnector.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/Swiften/LinkLocal/LinkLocalConnector.h b/Swiften/LinkLocal/LinkLocalConnector.h
index 134656c..0b6baef 100644
--- a/Swiften/LinkLocal/LinkLocalConnector.h
+++ b/Swiften/LinkLocal/LinkLocalConnector.h
@@ -5,13 +5,12 @@
#include <boost/enable_shared_from_this.hpp>
#include <vector>
-#include "Swiften/JID/JID.h"
#include "Swiften/Network/Connection.h"
+#include "Swiften/LinkLocal/LinkLocalService.h"
namespace Swift {
class ConnectionFactory;
class HostAddress;
- class String;
class Element;
class PayloadParserFactoryCollection;
class PayloadSerializerCollection;
@@ -21,18 +20,17 @@ namespace Swift {
class LinkLocalConnector : public boost::enable_shared_from_this<LinkLocalConnector> {
public:
LinkLocalConnector(
- const JID& remoteJID,
- const String& hostname,
- int interfaceIndex,
- int port,
+ const LinkLocalService& service,
boost::shared_ptr<DNSSDQuerier> querier,
boost::shared_ptr<Connection> connection);
+ ~LinkLocalConnector();
- const JID& getRemoteJID() const {
- return remoteJID;
+ const LinkLocalService& getService() const {
+ return service;
}
void connect();
+ void cancel();
void queueElement(boost::shared_ptr<Element> element);
const std::vector<boost::shared_ptr<Element> >& getQueuedElements() const {
@@ -50,10 +48,7 @@ namespace Swift {
void handleConnected(bool error);
private:
- JID remoteJID;
- String hostname;
- int interfaceIndex;
- int port;
+ LinkLocalService service;
boost::shared_ptr<DNSSDQuerier> querier;
boost::shared_ptr<DNSSDResolveHostnameQuery> resolveQuery;
boost::shared_ptr<Connection> connection;