aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/CConn.h
diff options
context:
space:
mode:
Diffstat (limited to 'vncviewer/CConn.h')
-rw-r--r--vncviewer/CConn.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/vncviewer/CConn.h b/vncviewer/CConn.h
index a7b9afda..bc30d9b7 100644
--- a/vncviewer/CConn.h
+++ b/vncviewer/CConn.h
@@ -23,7 +23,7 @@
#include <FL/Fl.H>
#include <rfb/CConnection.h>
-#include <rdr/FdInStream.h>
+
#include "UserDialog.h"
namespace network { class Socket; }
@@ -33,15 +33,19 @@ class DesktopWindow;
class CConn : public rfb::CConnection
{
public:
- CConn(const char* vncServerName, network::Socket* sock);
+ CConn();
~CConn();
+ void connect(const char* vncServerName, network::Socket* sock=nullptr);
+
std::string connectionInfo();
unsigned getUpdateCount();
unsigned getPixelCount();
unsigned getPosition();
+protected:
+
// Callback when socket is ready (or broken)
static void socketEvent(FL_SOCKET fd, void *data);
@@ -57,28 +61,21 @@ public:
void initDone() override;
- void setDesktopSize(int w, int h) override;
void setExtendedDesktopSize(unsigned reason, unsigned result,
int w, int h,
const rfb::ScreenSet& layout) override;
void setName(const char* name) override;
- void setColourMapEntries(int firstColour, int nColours,
- uint16_t* rgbs) override;
-
void bell() override;
void framebufferUpdateStart() override;
void framebufferUpdateEnd() override;
- bool dataRect(const rfb::Rect& r, int encoding) override;
+ bool dataRect(const core::Rect& r, int encoding) override;
- void setCursor(int width, int height, const rfb::Point& hotspot,
+ void setCursor(int width, int height, const core::Point& hotspot,
const uint8_t* data) override;
- void setCursorPos(const rfb::Point& pos) override;
-
- void fence(uint32_t flags, unsigned len,
- const uint8_t data[]) override;
+ void setCursorPos(const core::Point& pos) override;
void setLEDState(unsigned int state) override;
@@ -90,7 +87,9 @@ private:
void resizeFramebuffer() override;
- void autoSelectFormatAndEncoding();
+ void updateEncoding();
+ void updateCompressLevel();
+ void updateQualityLevel();
void updatePixelFormat();
static void handleOptions(void *data);
@@ -107,7 +106,6 @@ private:
unsigned updateCount;
unsigned pixelCount;
- rfb::PixelFormat serverPF;
rfb::PixelFormat fullColourPF;
int lastServerEncoding;