Add flags member to decoders
Allows us to add attributes later that affect of the decoder
manager deals with the decoders.
diff --git a/common/rfb/CopyRectDecoder.cxx b/common/rfb/CopyRectDecoder.cxx
index 52de879..32ed1b3 100644
--- a/common/rfb/CopyRectDecoder.cxx
+++ b/common/rfb/CopyRectDecoder.cxx
@@ -22,7 +22,7 @@
using namespace rfb;
-CopyRectDecoder::CopyRectDecoder()
+CopyRectDecoder::CopyRectDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/Decoder.cxx b/common/rfb/Decoder.cxx
index a1f4438..f9bbffc 100644
--- a/common/rfb/Decoder.cxx
+++ b/common/rfb/Decoder.cxx
@@ -28,7 +28,7 @@
using namespace rfb;
-Decoder::Decoder()
+Decoder::Decoder(enum DecoderFlags flags) : flags(flags)
{
}
diff --git a/common/rfb/Decoder.h b/common/rfb/Decoder.h
index 7286b41..95c1466 100644
--- a/common/rfb/Decoder.h
+++ b/common/rfb/Decoder.h
@@ -28,10 +28,16 @@
class ConnParams;
class ModifiablePixelBuffer;
class Rect;
+ class Region;
+
+ enum DecoderFlags {
+ // A constant for decoders that don't need anything special
+ DecoderPlain = 0,
+ };
class Decoder {
public:
- Decoder();
+ Decoder(enum DecoderFlags flags);
virtual ~Decoder();
// These functions are the main interface to an individual decoder
@@ -58,6 +64,9 @@
public:
static bool supported(int encoding);
static Decoder* createDecoder(int encoding);
+
+ public:
+ const enum DecoderFlags flags;
};
}
diff --git a/common/rfb/HextileDecoder.cxx b/common/rfb/HextileDecoder.cxx
index d1412d4..eae0040 100644
--- a/common/rfb/HextileDecoder.cxx
+++ b/common/rfb/HextileDecoder.cxx
@@ -36,7 +36,7 @@
#include <rfb/hextileDecode.h>
#undef BPP
-HextileDecoder::HextileDecoder()
+HextileDecoder::HextileDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/RREDecoder.cxx b/common/rfb/RREDecoder.cxx
index 2dd47cc..218c9b0 100644
--- a/common/rfb/RREDecoder.cxx
+++ b/common/rfb/RREDecoder.cxx
@@ -36,7 +36,7 @@
#include <rfb/rreDecode.h>
#undef BPP
-RREDecoder::RREDecoder()
+RREDecoder::RREDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/RawDecoder.cxx b/common/rfb/RawDecoder.cxx
index e349bda..786f154 100644
--- a/common/rfb/RawDecoder.cxx
+++ b/common/rfb/RawDecoder.cxx
@@ -25,7 +25,7 @@
using namespace rfb;
-RawDecoder::RawDecoder()
+RawDecoder::RawDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index 1bfa7a9..24236db 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -46,7 +46,7 @@
#include <rfb/tightDecode.h>
#undef BPP
-TightDecoder::TightDecoder()
+TightDecoder::TightDecoder() : Decoder(DecoderPlain)
{
}
diff --git a/common/rfb/ZRLEDecoder.cxx b/common/rfb/ZRLEDecoder.cxx
index 498152c..c9245c0 100644
--- a/common/rfb/ZRLEDecoder.cxx
+++ b/common/rfb/ZRLEDecoder.cxx
@@ -62,7 +62,7 @@
#undef CPIXEL
#undef BPP
-ZRLEDecoder::ZRLEDecoder()
+ZRLEDecoder::ZRLEDecoder() : Decoder(DecoderPlain)
{
}