Push encoder and decoder handling down into the connection objects

This keeps the reader and writer objects clean and simple protocol
decoders/encoders.
diff --git a/vncviewer/CConn.h b/vncviewer/CConn.h
index 286a09e..f7f560b 100644
--- a/vncviewer/CConn.h
+++ b/vncviewer/CConn.h
@@ -1,5 +1,5 @@
 /* Copyright (C) 2002-2005 RealVNC Ltd.  All Rights Reserved.
- * Copyright 2009-2011 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ * Copyright 2009-2014 Pierre Ossman for Cendio AB
  * 
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -23,8 +23,11 @@
 #include <FL/Fl.H>
 
 #include <rfb/CConnection.h>
+#include <rfb/encodings.h>
 #include <network/Socket.h>
 
+namespace rfb { class Decoder; }
+
 class DesktopWindow;
 
 class CConn : public rfb::CConnection,
@@ -62,8 +65,7 @@
   void framebufferUpdateStart();
   void framebufferUpdateEnd();
 
-  void beginRect(const rfb::Rect& r, int encoding);
-  void endRect(const rfb::Rect& r, int encoding);
+  void dataRect(const rfb::Rect& r, int encoding);
 
   void fillRect(const rfb::Rect& r, rfb::Pixel p);
   void imageRect(const rfb::Rect& r, void* p);
@@ -102,6 +104,8 @@
   bool pendingPFChange;
   rfb::PixelFormat pendingPF;
 
+  rfb::Decoder *decoders[rfb::encodingMax+1];
+
   int currentEncoding, lastServerEncoding;
 
   bool formatChange;