summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authordscho <dscho>2005-09-27 15:18:22 +0000
committerdscho <dscho>2005-09-27 15:18:22 +0000
commit93be927b1c1c74bc4da6f6d5978ba8e6e52f3cc2 (patch)
tree0ec66825e92a2cf60e0f32b7ab74bc5777318bd6 /rfb
parent94fcd86cc20dd2ccf7e2299a7dfbcc255c6cc771 (diff)
downloadlibvncserver-93be927b1c1c74bc4da6f6d5978ba8e6e52f3cc2.zip
libvncserver-93be927b1c1c74bc4da6f6d5978ba8e6e52f3cc2.tar.gz
Introduce generic protocol extension method. Deprecate
the processCustomClientMessage() method.
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfb.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/rfb/rfb.h b/rfb/rfb.h
index 4254016..bac805c 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -145,7 +145,7 @@ typedef struct {
} rfbColourMap;
/*
- * Security handling (RFB protocol version 3.7
+ * Security handling (RFB protocol version 3.7)
*/
typedef struct _rfbSecurity {
@@ -154,6 +154,29 @@ typedef struct _rfbSecurity {
struct _rfbSecurity* next;
} rfbSecurityHandler;
+/*
+ * Protocol extension handling.
+ */
+
+typedef struct _rfbProtocolExtension {
+ /* returns TRUE if extension should be activated */
+ rfbBool (*init)(struct _rfbClientRec* client, void** data);
+ /* returns TRUE if message was handled */
+ rfbBool (*handleMessage)(struct _rfbClientRec* client,
+ void* data,
+ rfbClientToServerMsg message);
+ void (*close)(struct _rfbClientRec* client, void* data);
+ void (*usage)(void);
+ /* processArguments returns the number of handled arguments */
+ int (*processArgument)(char *argv[]);
+ struct _rfbProtocolExtension* next;
+} rfbProtocolExtension;
+
+typedef struct _rfbExtensionData {
+ rfbProtocolExtension* extension;
+ void* data;
+ struct _rfbExtensionData* next;
+} rfbExtensionData;
/*
* Per-screen (framebuffer) structure. There can be as many as you wish,
@@ -481,6 +504,8 @@ typedef struct _rfbClientRec {
/* if progressive updating is on, this variable holds the current
* y coordinate of the progressive slice. */
int progressiveSliceY;
+
+ rfbExtensionData* extensions;
} rfbClientRec, *rfbClientPtr;
/*
@@ -760,6 +785,10 @@ void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y
void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion);
void rfbDoNothingWithClient(rfbClientPtr cl);
enum rfbNewClientAction defaultNewClientHook(rfbClientPtr cl);
+void rfbRegisterProtocolExtension(rfbProtocolExtension* extension);
+struct _rfbProtocolExtension* rfbGetExtensionIterator();
+void rfbReleaseExtensionIterator();
+rfbBool rfbEnableExtension(rfbClientPtr cl, rfbProtocolExtension* extension);
/* to check against plain passwords */
rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len);
OpenPOWER on IntegriCloud