Require all SMsgWriter caller to check capabilities
Make the API consisitent by requiring the caller to check what the client
supports before calling any of the write* functions. This avoids the
confusion that the functions might not always do anything.
diff --git a/common/rfb/SMsgWriter.h b/common/rfb/SMsgWriter.h
index 19b013f..80f6de9 100644
--- a/common/rfb/SMsgWriter.h
+++ b/common/rfb/SMsgWriter.h
@@ -69,17 +69,17 @@
// write the relevant pseudo-rectangle as part of the next update.
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.
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.