summaryrefslogtreecommitdiffstats
path: root/rfb/rfbproto.h
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2010-11-02 22:23:12 +0100
committerChristian Beier <dontmind@freeshell.org>2010-11-02 22:23:12 +0100
commite5523350a8fb5d6ccae4b4d9bc92897f3e5db18c (patch)
treea784f30fb06c79ec942613f7a3833a23f97e808c /rfb/rfbproto.h
parent5da7c7a71ac1db69902c3a2a80f8771713dde70f (diff)
downloadlibtdevnc-e5523350a8fb5d6ccae4b4d9bc92897f3e5db18c.tar.gz
libtdevnc-e5523350a8fb5d6ccae4b4d9bc92897f3e5db18c.zip
libvnc[server|client]: implement xvp VNC extension.
This implements the xvp VNC extension, which is described in the community version of the RFB protocol: http://tigervnc.sourceforge.net/cgi-bin/rfbproto It is also mentioned in the official RFB protocol.
Diffstat (limited to 'rfb/rfbproto.h')
-rw-r--r--rfb/rfbproto.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h
index c20f95c..cb62fc5 100644
--- a/rfb/rfbproto.h
+++ b/rfb/rfbproto.h
@@ -106,7 +106,7 @@ typedef uint32_t in_addr_t;
#define INADDR_NONE ((in_addr_t) 0xffffffff)
#endif
-#define MAX_ENCODINGS 20
+#define MAX_ENCODINGS 21
/*****************************************************************************
*
@@ -405,6 +405,8 @@ typedef struct {
#define rfbKeyFrameRequest 12
/* PalmVNC 1.4 & 2.0 SetScale Factor message */
#define rfbPalmVNCSetScaleFactor 0xF
+/* Xvp message - bidirectional */
+#define rfbXvp 250
@@ -439,6 +441,9 @@ typedef struct {
#define rfbEncodingSolMonoZip 0xFFFF0008
#define rfbEncodingUltraZip 0xFFFF0009
+/* Xvp pseudo-encoding */
+#define rfbEncodingXvp 0xFFFFFECB
+
/*
* Special encoding numbers:
* 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels;
@@ -1061,6 +1066,44 @@ typedef struct _rfbTextChatMsg {
#define rfbTextChatFinished 0xFFFFFFFD
+/*-----------------------------------------------------------------------------
+ * Xvp Message
+ * Bidirectional message
+ * A server which supports the xvp extension declares this by sending a message
+ * with an Xvp_INIT xvp-message-code when it receives a request from the client
+ * to use the xvp Pseudo-encoding. The server must specify in this message the
+ * highest xvp-extension-version it supports: the client may assume that the
+ * server supports all versions from 1 up to this value. The client is then
+ * free to use any supported version. Currently, only version 1 is defined.
+ *
+ * A server which subsequently receives an xvp Client Message requesting an
+ * operation which it is unable to perform, informs the client of this by
+ * sending a message with an Xvp_FAIL xvp-message-code, and the same
+ * xvp-extension-version as included in the client's operation request.
+ *
+ * A client supporting the xvp extension sends this to request that the server
+ * initiate a clean shutdown, clean reboot or abrupt reset of the system whose
+ * framebuffer the client is displaying.
+ */
+
+
+typedef struct {
+ uint8_t type; /* always rfbXvp */
+ uint8_t pad;
+ uint8_t version; /* xvp extension version */
+ uint8_t code; /* xvp message code */
+} rfbXvpMsg;
+
+#define sz_rfbXvpMsg (4)
+
+/* server message codes */
+#define rfbXvp_Fail 0
+#define rfbXvp_Init 1
+/* client message codes */
+#define rfbXvp_Shutdown 2
+#define rfbXvp_Reboot 3
+#define rfbXvp_Reset 4
+
/*-----------------------------------------------------------------------------
* Modif sf@2002
@@ -1115,6 +1158,7 @@ typedef union {
rfbPalmVNCReSizeFrameBufferMsg prsfb;
rfbFileTransferMsg ft;
rfbTextChatMsg tc;
+ rfbXvpMsg xvp;
} rfbServerToClientMsg;
@@ -1350,6 +1394,7 @@ typedef struct _rfbSetSWMsg {
#define sz_rfbSetSWMsg 6
+
/*-----------------------------------------------------------------------------
* Union of all client->server messages.
*/
@@ -1369,6 +1414,7 @@ typedef union {
rfbFileTransferMsg ft;
rfbSetSWMsg sw;
rfbTextChatMsg tc;
+ rfbXvpMsg xvp;
} rfbClientToServerMsg;
/*