aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SMsgWriter.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/SMsgWriter.h')
-rw-r--r--common/rfb/SMsgWriter.h39
1 files changed, 13 insertions, 26 deletions
diff --git a/common/rfb/SMsgWriter.h b/common/rfb/SMsgWriter.h
index e9859416..80f6de91 100644
--- a/common/rfb/SMsgWriter.h
+++ b/common/rfb/SMsgWriter.h
@@ -31,17 +31,19 @@ namespace rdr { class OutStream; }
namespace rfb {
- class ConnParams;
+ class ClientParams;
+ class PixelFormat;
struct ScreenSet;
class SMsgWriter {
public:
- SMsgWriter(ConnParams* cp, rdr::OutStream* os);
+ SMsgWriter(ClientParams* client, rdr::OutStream* os);
virtual ~SMsgWriter();
// writeServerInit() must only be called at the appropriate time in the
// protocol initialisation.
- void writeServerInit();
+ void writeServerInit(rdr::U16 width, rdr::U16 height,
+ const PixelFormat& pf, const char* name);
// Methods to write normal protocol messages
@@ -63,30 +65,21 @@ namespace rfb {
// updates mode.
void writeEndOfContinuousUpdates();
- // writeSetDesktopSize() won't actually write immediately, but will
+ // writeDesktopSize() won't actually write immediately, but will
// write the relevant pseudo-rectangle as part of the next update.
- bool writeSetDesktopSize();
- // Same thing for the extended version. The first version queues up a
- // generic update of the current server state, but the second queues a
- // specific message.
- bool writeExtendedDesktopSize();
- bool writeExtendedDesktopSize(rdr::U16 reason, rdr::U16 result,
- int fb_width, int fb_height,
- const ScreenSet& layout);
+ void writeDesktopSize(rdr::U16 reason, rdr::U16 result=0);
- bool writeSetDesktopName();
+ void writeSetDesktopName();
// Like setDesktopSize, we can't just write out a cursor message
// immediately.
- bool writeSetCursor();
- bool writeSetXCursor();
- bool writeSetCursorWithAlpha();
+ void writeCursor();
// Same for LED state message
- bool writeLEDState();
+ void writeLEDState();
// And QEMU keyboard event handshake
- bool writeQEMUKeyEvent();
+ void writeQEMUKeyEvent();
// needFakeUpdate() returns true when an immediate update is needed in
// order to flush out pseudo-rectangles to the client.
@@ -140,25 +133,19 @@ namespace rfb {
void writeLEDStateRect(rdr::U8 state);
void writeQEMUKeyEventRect();
- ConnParams* cp;
+ ClientParams* client;
rdr::OutStream* os;
int nRectsInUpdate;
int nRectsInHeader;
- bool needSetDesktopSize;
- bool needExtendedDesktopSize;
bool needSetDesktopName;
- bool needSetCursor;
- bool needSetXCursor;
- bool needSetCursorWithAlpha;
+ bool needCursor;
bool needLEDState;
bool needQEMUKeyEvent;
typedef struct {
rdr::U16 reason, result;
- int fb_width, fb_height;
- ScreenSet layout;
} ExtendedDesktopSizeMsg;
std::list<ExtendedDesktopSizeMsg> extendedDesktopSizeMsgs;