diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-01-31 12:37:32 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-07 14:50:28 +0200 |
commit | 668468b3d43d5ea1562ebc0be8de0c98c5601a60 (patch) | |
tree | 80bbb90fb5f00335a7e85c297eadd40b0780dc92 /common/rfb/Decoder.cxx | |
parent | fdba3fe884d5b43e07d7d49033c83f2f11bf524c (diff) | |
download | tigervnc-668468b3d43d5ea1562ebc0be8de0c98c5601a60.tar.gz tigervnc-668468b3d43d5ea1562ebc0be8de0c98c5601a60.zip |
Encoders/decoders should track the connection object
The connection object is a much more appropriate object for the
decoders and encoders to keep track of. Besides the streams, it also
contains state like connection parameters.
Diffstat (limited to 'common/rfb/Decoder.cxx')
-rw-r--r-- | common/rfb/Decoder.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/rfb/Decoder.cxx b/common/rfb/Decoder.cxx index f774f28c..3faa9753 100644 --- a/common/rfb/Decoder.cxx +++ b/common/rfb/Decoder.cxx @@ -28,7 +28,7 @@ using namespace rfb; -Decoder::Decoder(CMsgReader* reader_) : reader(reader_) +Decoder::Decoder(CConnection* conn_) : conn(conn_) { } @@ -51,21 +51,21 @@ bool Decoder::supported(int encoding) } } -Decoder* Decoder::createDecoder(int encoding, CMsgReader* reader) +Decoder* Decoder::createDecoder(int encoding, CConnection* conn) { switch (encoding) { case encodingRaw: - return new RawDecoder(reader); + return new RawDecoder(conn); case encodingCopyRect: - return new CopyRectDecoder(reader); + return new CopyRectDecoder(conn); case encodingRRE: - return new RREDecoder(reader); + return new RREDecoder(conn); case encodingHextile: - return new HextileDecoder(reader); + return new HextileDecoder(conn); case encodingZRLE: - return new ZRLEDecoder(reader); + return new ZRLEDecoder(conn); case encodingTight: - return new TightDecoder(reader); + return new TightDecoder(conn); default: return NULL; } |