diff options
author | Tobias Markmann <tm@ayena.de> | 2018-08-01 15:07:35 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2018-08-01 15:07:35 (GMT) |
commit | 80f74201f0a35718642e434c58b631b238fd85df (patch) | |
tree | 0143d469fa2dc8bcae535e6cec59d5a01924bed3 /Swiften/StreamStack/StreamStack.cpp | |
parent | 07b3b882ade8ed454e304963e4f238e867608c46 (diff) | |
download | swift-80f74201f0a35718642e434c58b631b238fd85df.zip swift-80f74201f0a35718642e434c58b631b238fd85df.tar.bz2 |
Use interfaces for top and bottom layer in StreamStack
Test-Information:
Builds, unit and integration tests pass on macOS with
clang 7.0 master
Change-Id: Idb9648c1293adbe6f4b79af3ad619ebb0630e48d
Diffstat (limited to 'Swiften/StreamStack/StreamStack.cpp')
-rw-r--r-- | Swiften/StreamStack/StreamStack.cpp | 14 |
1 files changed, 7 insertions, 7 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); |