summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authordscho <dscho>2005-10-06 19:26:41 +0000
committerdscho <dscho>2005-10-06 19:26:41 +0000
commit194a76df115db3b6fe62adbccfe4181ed46d2c52 (patch)
tree1b7e853cbd4c4482173d3b2f675580169dfd56d6 /rfb
parent11fc700c5db6afc6978211f5735707848b94ae8e (diff)
downloadlibtdevnc-194a76df115db3b6fe62adbccfe4181ed46d2c52.tar.gz
libtdevnc-194a76df115db3b6fe62adbccfe4181ed46d2c52.zip
add an extension mechanism for LibVNCClient, modify the client data handling
so that more than one data structure can be attached, and add an example to speak the client part of the back channel.
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfbclient.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 5d34526..c99f4f9 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -63,6 +63,15 @@ typedef struct {
rfbBool doNotSleep;
} rfbVNCRec;
+/* client data */
+
+typedef struct rfbClientData {
+ void* tag;
+ void* data;
+ struct rfbClientData* next;
+} rfbClientData;
+
+/* app data (belongs into rfbClient?) */
typedef struct {
rfbBool shareDesktop;
@@ -181,7 +190,7 @@ typedef struct _rfbClient {
uint8_t *rcSource, *rcMask;
/* private data pointer */
- void* clientData;
+ rfbClientData* clientData;
rfbVNCRec* vncRec;
@@ -223,6 +232,26 @@ extern rfbBool HandleRFBServerMessage(rfbClient* client);
extern void PrintPixelFormat(rfbPixelFormat *format);
+/* client data */
+
+void rfbClientSetClientData(rfbClient* client, void* tag, void* data);
+void* rfbClientGetClientData(rfbClient* client, void* tag);
+
+/* protocol extensions */
+
+typedef struct _rfbClientProtocolExtension {
+ int* encodings;
+ /* returns TRUE if the encoding was handled */
+ rfbBool (*handleEncoding)(rfbClient* cl,
+ rfbFramebufferUpdateRectHeader* rect);
+ /* returns TRUE if it handled the message */
+ rfbBool (*handleMessage)(rfbClient* cl,
+ rfbServerToClientMsg* message);
+ struct _rfbClientProtocolExtension* next;
+} rfbClientProtocolExtension;
+
+void rfbClientRegisterExtension(rfbClientProtocolExtension* e);
+
/* sockets.c */
extern rfbBool errorMessageOnReadFailure;