diff options
-rw-r--r-- | Swiften/StreamStack/StreamStack.cpp | 14 | ||||
-rw-r--r-- | Swiften/StreamStack/StreamStack.h | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Swiften/StreamStack/StreamStack.cpp b/Swiften/StreamStack/StreamStack.cpp index f14f95c..75fb1ce 100644 --- a/Swiften/StreamStack/StreamStack.cpp +++ b/Swiften/StreamStack/StreamStack.cpp @@ -10,23 +10,23 @@ #include <Swiften/StreamStack/LowLayer.h> #include <Swiften/StreamStack/StreamLayer.h> -#include <Swiften/StreamStack/XMPPLayer.h> +#include <Swiften/StreamStack/HighLayer.h> namespace Swift { -StreamStack::StreamStack(XMPPLayer* xmppLayer, LowLayer* physicalLayer) : xmppLayer_(xmppLayer), physicalLayer_(physicalLayer) { - physicalLayer_->setParentLayer(xmppLayer_); - xmppLayer_->setChildLayer(physicalLayer_); +StreamStack::StreamStack(HighLayer* topLayer, LowLayer* bottomLayer) : topLayer_(topLayer), bottomLayer_(bottomLayer) { + bottomLayer_->setParentLayer(topLayer_); + topLayer_->setChildLayer(bottomLayer_); } StreamStack::~StreamStack() { } void StreamStack::addLayer(std::unique_ptr<StreamLayer> streamLayer) { - LowLayer* lowLayer = layers_.empty() ? physicalLayer_ : layers_.rbegin()->get(); + LowLayer* lowLayer = layers_.empty() ? bottomLayer_ : layers_.rbegin()->get(); - xmppLayer_->setChildLayer(streamLayer.get()); - streamLayer->setParentLayer(xmppLayer_); + topLayer_->setChildLayer(streamLayer.get()); + streamLayer->setParentLayer(topLayer_); lowLayer->setParentLayer(streamLayer.get()); streamLayer->setChildLayer(lowLayer); diff --git a/Swiften/StreamStack/StreamStack.h b/Swiften/StreamStack/StreamStack.h index 5b77085..bd95811 100644 --- a/Swiften/StreamStack/StreamStack.h +++ b/Swiften/StreamStack/StreamStack.h @@ -15,19 +15,19 @@ #include <Swiften/Elements/Stanza.h> namespace Swift { - class XMPPLayer; + class HighLayer; class LowLayer; class StreamLayer; class SWIFTEN_API StreamStack { public: - StreamStack(XMPPLayer* xmppLayer, LowLayer* physicalLayer); + StreamStack(HighLayer* topLayer, LowLayer* bottomLayer); ~StreamStack(); void addLayer(std::unique_ptr<StreamLayer> /* streamLayer */); - XMPPLayer* getXMPPLayer() const { - return xmppLayer_; + HighLayer* getTopLayer() const { + return topLayer_; } template<typename T> T* getLayer() const { @@ -41,8 +41,8 @@ namespace Swift { } private: - XMPPLayer* xmppLayer_; - LowLayer* physicalLayer_; + HighLayer* topLayer_; + LowLayer* bottomLayer_; std::vector<std::unique_ptr<StreamLayer>> layers_; }; } |