From 0144c5335327aa27b9ba0435988c08ffadc20ad0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 4 Feb 2015 14:10:43 +0100 Subject: [PATCH] Give subclasses the ability to overwrite the reader and writer Needed for some tests. --- common/rfb/CConnection.h | 3 +++ common/rfb/SConnection.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/common/rfb/CConnection.h b/common/rfb/CConnection.h index 8bd886aa..0109fe86 100644 --- a/common/rfb/CConnection.h +++ b/common/rfb/CConnection.h @@ -136,6 +136,9 @@ namespace rfb { protected: void setState(stateEnum s) { state_ = s; } + void setReader(CMsgReader *r) { reader_ = r; } + void setWriter(CMsgWriter *w) { writer_ = w; } + private: // This is a default implementation of fences that automatically // responds to requests, stating no support for synchronisation. diff --git a/common/rfb/SConnection.h b/common/rfb/SConnection.h index da38b3e0..fd6d2634 100644 --- a/common/rfb/SConnection.h +++ b/common/rfb/SConnection.h @@ -184,6 +184,9 @@ namespace rfb { protected: void setState(stateEnum s) { state_ = s; } + void setReader(SMsgReader *r) { reader_ = r; } + void setWriter(SMsgWriter *w) { writer_ = w; } + private: void writeFakeColourMap(void); -- 2.39.5