From: Pierre Ossman Date: Wed, 4 Feb 2015 13:10:43 +0000 (+0100) Subject: Give subclasses the ability to overwrite the reader and writer X-Git-Tag: v1.4.90~47^2~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0144c5335327aa27b9ba0435988c08ffadc20ad0;p=tigervnc.git Give subclasses the ability to overwrite the reader and writer Needed for some tests. --- 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);