diff options
Diffstat (limited to 'Swiften/Component')
-rw-r--r-- | Swiften/Component/ComponentSession.cpp | 4 | ||||
-rw-r--r-- | Swiften/Component/ComponentSession.h | 6 | ||||
-rw-r--r-- | Swiften/Component/UnitTest/ComponentSessionTest.cpp | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/Component/ComponentSession.cpp b/Swiften/Component/ComponentSession.cpp index 7925b23..826451d 100644 --- a/Swiften/Component/ComponentSession.cpp +++ b/Swiften/Component/ComponentSession.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013 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. */ @@ -49,7 +49,7 @@ void ComponentSession::handleStreamStart(const ProtocolHeader& header) { stream->writeElement(ComponentHandshake::ref(new ComponentHandshake(ComponentHandshakeGenerator::getHandshake(header.getID(), secret, crypto)))); } -void ComponentSession::handleElement(boost::shared_ptr<Element> element) { +void ComponentSession::handleElement(boost::shared_ptr<ToplevelElement> element) { if (boost::shared_ptr<Stanza> stanza = boost::dynamic_pointer_cast<Stanza>(element)) { if (getState() == Initialized) { onStanzaReceived(stanza); diff --git a/Swiften/Component/ComponentSession.h b/Swiften/Component/ComponentSession.h index 3103335..1fa7b5c 100644 --- a/Swiften/Component/ComponentSession.h +++ b/Swiften/Component/ComponentSession.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013 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. */ @@ -14,7 +14,7 @@ #include <Swiften/Base/boost_bsignals.h> #include <Swiften/Base/Error.h> #include <string> -#include <Swiften/Elements/Element.h> +#include <Swiften/Elements/ToplevelElement.h> #include <Swiften/Elements/Stanza.h> #include <Swiften/Session/SessionStream.h> @@ -69,7 +69,7 @@ namespace Swift { void sendStreamHeader(); - void handleElement(boost::shared_ptr<Element>); + void handleElement(boost::shared_ptr<ToplevelElement>); void handleStreamStart(const ProtocolHeader&); void handleStreamClosed(boost::shared_ptr<Swift::Error>); diff --git a/Swiften/Component/UnitTest/ComponentSessionTest.cpp b/Swiften/Component/UnitTest/ComponentSessionTest.cpp index 0533645..79d9ab3 100644 --- a/Swiften/Component/UnitTest/ComponentSessionTest.cpp +++ b/Swiften/Component/UnitTest/ComponentSessionTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2013 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. */ @@ -86,11 +86,11 @@ class ComponentSessionTest : public CppUnit::TestFixture { class MockSessionStream : public SessionStream { public: struct Event { - Event(boost::shared_ptr<Element> element) : element(element), footer(false) {} + Event(boost::shared_ptr<ToplevelElement> element) : element(element), footer(false) {} Event(const ProtocolHeader& header) : header(header), footer(false) {} Event() : footer(true) {} - boost::shared_ptr<Element> element; + boost::shared_ptr<ToplevelElement> element; boost::optional<ProtocolHeader> header; bool footer; }; @@ -114,7 +114,7 @@ class ComponentSessionTest : public CppUnit::TestFixture { receivedEvents.push_back(Event()); } - virtual void writeElement(boost::shared_ptr<Element> element) { + virtual void writeElement(boost::shared_ptr<ToplevelElement> element) { receivedEvents.push_back(Event(element)); } |