summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/LinkLocal')
-rw-r--r--Swiften/LinkLocal/IncomingLinkLocalSession.cpp4
-rw-r--r--Swiften/LinkLocal/IncomingLinkLocalSession.h6
-rw-r--r--Swiften/LinkLocal/LinkLocalConnector.cpp4
-rw-r--r--Swiften/LinkLocal/LinkLocalConnector.h10
-rw-r--r--Swiften/LinkLocal/OutgoingLinkLocalSession.cpp8
-rw-r--r--Swiften/LinkLocal/OutgoingLinkLocalSession.h10
6 files changed, 21 insertions, 21 deletions
diff --git a/Swiften/LinkLocal/IncomingLinkLocalSession.cpp b/Swiften/LinkLocal/IncomingLinkLocalSession.cpp
index 610b28b..63f3ca1 100644
--- a/Swiften/LinkLocal/IncomingLinkLocalSession.cpp
+++ b/Swiften/LinkLocal/IncomingLinkLocalSession.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include <Swiften/LinkLocal/IncomingLinkLocalSession.h>
#include <boost/bind.hpp>
#include <boost/smart_ptr/make_shared.hpp>
@@ -43,19 +43,19 @@ void IncomingLinkLocalSession::handleStreamStart(const ProtocolHeader& incomingH
if (incomingHeader.getVersion() == "1.0") {
getXMPPLayer()->writeElement(boost::make_shared<StreamFeatures>());
}
else {
setInitialized();
}
}
-void IncomingLinkLocalSession::handleElement(boost::shared_ptr<Element> element) {
+void IncomingLinkLocalSession::handleElement(boost::shared_ptr<ToplevelElement> element) {
boost::shared_ptr<Stanza> stanza = boost::dynamic_pointer_cast<Stanza>(element);
// If we get our first stanza before streamfeatures, our session is implicitly
// initialized
if (stanza && !isInitialized()) {
setInitialized();
}
onElementReceived(element);
}
diff --git a/Swiften/LinkLocal/IncomingLinkLocalSession.h b/Swiften/LinkLocal/IncomingLinkLocalSession.h
index f00c166..e10cd0a 100644
--- a/Swiften/LinkLocal/IncomingLinkLocalSession.h
+++ b/Swiften/LinkLocal/IncomingLinkLocalSession.h
@@ -1,44 +1,44 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
#include <boost/shared_ptr.hpp>
#include <Swiften/Base/boost_bsignals.h>
#include <Swiften/Session/Session.h>
#include <Swiften/JID/JID.h>
#include <Swiften/Network/Connection.h>
namespace Swift {
class ProtocolHeader;
class XMLParserFactory;
- class Element;
+ class ToplevelElement;
class PayloadParserFactoryCollection;
class PayloadSerializerCollection;
class IncomingLinkLocalSession : public Session {
public:
IncomingLinkLocalSession(
const JID& localJID,
boost::shared_ptr<Connection> connection,
PayloadParserFactoryCollection* payloadParserFactories,
PayloadSerializerCollection* payloadSerializers,
XMLParserFactory* xmlParserFactory);
boost::signal<void ()> onSessionStarted;
private:
- void handleElement(boost::shared_ptr<Element>);
+ void handleElement(boost::shared_ptr<ToplevelElement>);
void handleStreamStart(const ProtocolHeader&);
void setInitialized();
bool isInitialized() const {
return initialized;
}
bool initialized;
};
}
diff --git a/Swiften/LinkLocal/LinkLocalConnector.cpp b/Swiften/LinkLocal/LinkLocalConnector.cpp
index af96e65..6471ca7 100644
--- a/Swiften/LinkLocal/LinkLocalConnector.cpp
+++ b/Swiften/LinkLocal/LinkLocalConnector.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include <Swiften/LinkLocal/LinkLocalConnector.h>
#include <boost/bind.hpp>
#include <Swiften/Network/Connection.h>
@@ -65,15 +65,15 @@ void LinkLocalConnector::handleHostnameResolved(const boost::optional<HostAddres
}
}
void LinkLocalConnector::handleConnected(bool error) {
onConnectFinished(error);
assert(connectionConnectFinishedConnection.connected());
connectionConnectFinishedConnection.disconnect();
}
-void LinkLocalConnector::queueElement(boost::shared_ptr<Element> element) {
+void LinkLocalConnector::queueElement(boost::shared_ptr<ToplevelElement> element) {
queuedElements.push_back(element);
}
}
diff --git a/Swiften/LinkLocal/LinkLocalConnector.h b/Swiften/LinkLocal/LinkLocalConnector.h
index 52692ef..367e972 100644
--- a/Swiften/LinkLocal/LinkLocalConnector.h
+++ b/Swiften/LinkLocal/LinkLocalConnector.h
@@ -1,30 +1,30 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
#include <boost/shared_ptr.hpp>
#include <Swiften/Base/boost_bsignals.h>
#include <boost/enable_shared_from_this.hpp>
#include <vector>
#include <Swiften/Base/API.h>
#include <Swiften/Network/Connection.h>
#include <Swiften/LinkLocal/LinkLocalService.h>
namespace Swift {
class ConnectionFactory;
class HostAddress;
- class Element;
+ class ToplevelElement;
class PayloadParserFactoryCollection;
class PayloadSerializerCollection;
class DNSSDQuerier;
class DNSSDResolveHostnameQuery;
class SWIFTEN_API LinkLocalConnector : public boost::enable_shared_from_this<LinkLocalConnector> {
public:
LinkLocalConnector(
const LinkLocalService& service,
@@ -32,21 +32,21 @@ namespace Swift {
boost::shared_ptr<Connection> connection);
~LinkLocalConnector();
const LinkLocalService& getService() const {
return service;
}
void connect();
void cancel();
- void queueElement(boost::shared_ptr<Element> element);
+ void queueElement(boost::shared_ptr<ToplevelElement> element);
- const std::vector<boost::shared_ptr<Element> >& getQueuedElements() const {
+ const std::vector<boost::shared_ptr<ToplevelElement> >& getQueuedElements() const {
return queuedElements;
}
boost::shared_ptr<Connection> getConnection() const {
return connection;
}
boost::signal<void (bool)> onConnectFinished;
@@ -55,12 +55,12 @@ namespace Swift {
void handleConnected(bool error);
private:
LinkLocalService service;
boost::shared_ptr<DNSSDQuerier> querier;
boost::shared_ptr<DNSSDResolveHostnameQuery> resolveQuery;
boost::bsignals::connection resolveQueryHostNameResolvedConnection;
boost::shared_ptr<Connection> connection;
boost::bsignals::connection connectionConnectFinishedConnection;
- std::vector<boost::shared_ptr<Element> > queuedElements;
+ std::vector<boost::shared_ptr<ToplevelElement> > queuedElements;
};
}
diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp b/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp
index 7a59715..1d280ef 100644
--- a/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp
+++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.cpp
@@ -1,11 +1,11 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#include <Swiften/LinkLocal/OutgoingLinkLocalSession.h>
#include <boost/bind.hpp>
#include <Swiften/Base/foreach.h>
@@ -29,25 +29,25 @@ OutgoingLinkLocalSession::OutgoingLinkLocalSession(
}
void OutgoingLinkLocalSession::handleSessionStarted() {
ProtocolHeader header;
header.setFrom(getLocalJID());
getXMPPLayer()->writeHeader(header);
}
void OutgoingLinkLocalSession::handleStreamStart(const ProtocolHeader&) {
- foreach(const boost::shared_ptr<Element>& stanza, queuedElements_) {
+ foreach(const boost::shared_ptr<ToplevelElement>& stanza, queuedElements_) {
sendElement(stanza);
}
queuedElements_.clear();
}
-void OutgoingLinkLocalSession::handleElement(boost::shared_ptr<Element> element) {
+void OutgoingLinkLocalSession::handleElement(boost::shared_ptr<ToplevelElement> element) {
onElementReceived(element);
}
-void OutgoingLinkLocalSession::queueElement(boost::shared_ptr<Element> element) {
+void OutgoingLinkLocalSession::queueElement(boost::shared_ptr<ToplevelElement> element) {
queuedElements_.push_back(element);
}
}
diff --git a/Swiften/LinkLocal/OutgoingLinkLocalSession.h b/Swiften/LinkLocal/OutgoingLinkLocalSession.h
index b97f2bf..4550ae4 100644
--- a/Swiften/LinkLocal/OutgoingLinkLocalSession.h
+++ b/Swiften/LinkLocal/OutgoingLinkLocalSession.h
@@ -1,44 +1,44 @@
/*
- * Copyright (c) 2010 Remko Tronçon
+ * Copyright (c) 2010-2014 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
#pragma once
#include <boost/shared_ptr.hpp>
#include <Swiften/Base/boost_bsignals.h>
#include <boost/enable_shared_from_this.hpp>
#include <vector>
#include <Swiften/Session/Session.h>
#include <Swiften/JID/JID.h>
namespace Swift {
class ConnectionFactory;
class XMLParserFactory;
- class Element;
+ class ToplevelElement;
class PayloadParserFactoryCollection;
class PayloadSerializerCollection;
class OutgoingLinkLocalSession : public Session {
public:
OutgoingLinkLocalSession(
const JID& localJID,
const JID& remoteJID,
boost::shared_ptr<Connection> connection,
PayloadParserFactoryCollection* payloadParserFactories,
PayloadSerializerCollection* payloadSerializers,
XMLParserFactory* xmlParserFactory);
- void queueElement(boost::shared_ptr<Element> element);
+ void queueElement(boost::shared_ptr<ToplevelElement> element);
private:
void handleSessionStarted();
- void handleElement(boost::shared_ptr<Element>);
+ void handleElement(boost::shared_ptr<ToplevelElement>);
void handleStreamStart(const ProtocolHeader&);
private:
- std::vector<boost::shared_ptr<Element> > queuedElements_;
+ std::vector<boost::shared_ptr<ToplevelElement> > queuedElements_;
};
}