• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

krfb

  • sources
  • kde-4.14
  • kdenetwork
  • krfb
  • libvncserver
  • rfb
libvncserver/rfb/rfbclient.h
Go to the documentation of this file.
1 #ifndef RFBCLIENT_H
2 #define RFBCLIENT_H
3 
9 /*
10  * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved.
11  * Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
12  * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
13  *
14  * This is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * This software is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this software; if not, write to the Free Software
26  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
27  * USA.
28  */
29 
34 #include <stdio.h>
35 #include <stdlib.h>
36 #include <string.h>
37 #include <sys/time.h>
38 #include <unistd.h>
39 #include "rfbproto.h"
40 #include "keysym.h"
41 #ifdef LIBVNCSERVER_WITH_CLIENT_TLS
42 #include <gnutls/gnutls.h>
43 #endif
44 
45 #define rfbClientSwap16IfLE(s) \
46  (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s))
47 
48 #define rfbClientSwap32IfLE(l) \
49  (*(char *)&client->endianTest ? ((((l) & 0xff000000) >> 24) | \
50  (((l) & 0x00ff0000) >> 8) | \
51  (((l) & 0x0000ff00) << 8) | \
52  (((l) & 0x000000ff) << 24)) : (l))
53 
54 #define rfbClientSwap64IfLE(l) \
55  (*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \
56  (((l) & 0x00ff000000000000ULL) >> 40) | \
57  (((l) & 0x0000ff0000000000ULL) >> 24) | \
58  (((l) & 0x000000ff00000000ULL) >> 8) | \
59  (((l) & 0x00000000ff000000ULL) << 8) | \
60  (((l) & 0x0000000000ff0000ULL) << 24) | \
61  (((l) & 0x000000000000ff00ULL) << 40) | \
62  (((l) & 0x00000000000000ffULL) << 56)) : (l))
63 
64 #define FLASH_PORT_OFFSET 5400
65 #define LISTEN_PORT_OFFSET 5500
66 #define TUNNEL_PORT_OFFSET 5500
67 #define SERVER_PORT_OFFSET 5900
68 
69 #define DEFAULT_SSH_CMD "/usr/bin/ssh"
70 #define DEFAULT_TUNNEL_CMD \
71  (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20")
72 #define DEFAULT_VIA_CMD \
73  (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20")
74 
75 #if(defined __cplusplus)
76 extern "C"
77 {
78 #endif
79 
82 typedef struct {
83  FILE* file;
84  struct timeval tv;
85  rfbBool readTimestamp;
86  rfbBool doNotSleep;
87 } rfbVNCRec;
88 
91 typedef struct rfbClientData {
92  void* tag;
93  void* data;
94  struct rfbClientData* next;
95 } rfbClientData;
96 
99 typedef struct {
100  rfbBool shareDesktop;
101  rfbBool viewOnly;
102 
103  const char* encodingsString;
104 
105  rfbBool useBGR233;
106  int nColours;
107  rfbBool forceOwnCmap;
108  rfbBool forceTrueColour;
109  int requestedDepth;
110 
111  int compressLevel;
112  int qualityLevel;
113  rfbBool enableJPEG;
114  rfbBool useRemoteCursor;
115  rfbBool palmVNC;
116  int scaleSetting;
117 } AppData;
118 
120 typedef union _rfbCredential
121 {
123  struct
124  {
125  char *x509CACertFile;
126  char *x509CACrlFile;
127  char *x509ClientCertFile;
128  char *x509ClientKeyFile;
129  } x509Credential;
131  struct
132  {
133  char *username;
134  char *password;
135  } userCredential;
136 } rfbCredential;
137 
138 #define rfbCredentialTypeX509 1
139 #define rfbCredentialTypeUser 2
140 
141 struct _rfbClient;
142 
143 typedef void (*HandleTextChatProc)(struct _rfbClient* client, int value, char *text);
144 typedef void (*HandleXvpMsgProc)(struct _rfbClient* client, uint8_t version, uint8_t opcode);
145 typedef void (*HandleKeyboardLedStateProc)(struct _rfbClient* client, int value, int pad);
146 typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y);
147 typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h);
148 typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client);
149 typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h);
150 typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client);
151 typedef char* (*GetPasswordProc)(struct _rfbClient* client);
152 typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType);
153 typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client);
154 typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen);
155 typedef void (*BellProc)(struct _rfbClient* client);
156 
157 typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel);
158 typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y);
159 
160 typedef struct _rfbClient {
161  uint8_t* frameBuffer;
162  int width, height;
163 
164  int endianTest;
165 
166  AppData appData;
167 
168  const char* programName;
169  char* serverHost;
170  int serverPort;
171  rfbBool listenSpecified;
172  int listenPort, flashPort;
173 
174  struct {
175  int x, y, w, h;
176  } updateRect;
177 
183 #define RFB_BUFFER_SIZE (640*480)
184  char buffer[RFB_BUFFER_SIZE];
185 
186  /* rfbproto.c */
187 
188  int sock;
189  rfbBool canUseCoRRE;
190  rfbBool canUseHextile;
191  char *desktopName;
192  rfbPixelFormat format;
193  rfbServerInitMsg si;
194 
195  /* listen.c */
196  int listenSock;
197 
198  /* sockets.c */
199 #define RFB_BUF_SIZE 8192
200  char buf[RFB_BUF_SIZE];
201  char *bufoutptr;
202  int buffered;
203 
204  /* The zlib encoding requires expansion/decompression/deflation of the
205  compressed data in the "buffer" above into another, result buffer.
206  However, the size of the result buffer can be determined precisely
207  based on the bitsPerPixel, height and width of the rectangle. We
208  allocate this buffer one time to be the full size of the buffer. */
209 
210  /* Ultra Encoding uses this buffer too */
211 
212  int ultra_buffer_size;
213  char *ultra_buffer;
214 
215  int raw_buffer_size;
216  char *raw_buffer;
217 
218 #ifdef LIBVNCSERVER_HAVE_LIBZ
219  z_stream decompStream;
220  rfbBool decompStreamInited;
221 #endif
222 
223 
224 #ifdef LIBVNCSERVER_HAVE_LIBZ
225  /*
226  * Variables for the ``tight'' encoding implementation.
227  */
228 
230 #define ZLIB_BUFFER_SIZE 30000
231  char zlib_buffer[ZLIB_BUFFER_SIZE];
232 
233  /* Four independent compression streams for zlib library. */
234  z_stream zlibStream[4];
235  rfbBool zlibStreamActive[4];
236 
237  /* Filter stuff. Should be initialized by filter initialization code. */
238  rfbBool cutZeros;
239  int rectWidth, rectColors;
240  char tightPalette[256*4];
241  uint8_t tightPrevRow[2048*3*sizeof(uint16_t)];
242 
243 #ifdef LIBVNCSERVER_HAVE_LIBJPEG
244 
245  rfbBool jpegError;
246 
247  struct jpeg_source_mgr* jpegSrcManager;
248  void* jpegBufferPtr;
249  size_t jpegBufferLen;
250 
251 #endif
252 #endif
253 
254 
255  /* cursor.c */
256  uint8_t *rcSource, *rcMask;
257 
259  rfbClientData* clientData;
260 
261  rfbVNCRec* vncRec;
262 
263  /* Keyboard State support (is 'Caps Lock' set on the remote display???) */
264  int KeyboardLedStateEnabled;
265  int CurrentKeyboardLedState;
266 
267  int canHandleNewFBSize;
268 
269  /* hooks */
270  HandleTextChatProc HandleTextChat;
271  HandleKeyboardLedStateProc HandleKeyboardLedState;
272  HandleCursorPosProc HandleCursorPos;
273  SoftCursorLockAreaProc SoftCursorLockArea;
274  SoftCursorUnlockScreenProc SoftCursorUnlockScreen;
275  GotFrameBufferUpdateProc GotFrameBufferUpdate;
276  FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate;
278  GetPasswordProc GetPassword;
279  MallocFrameBufferProc MallocFrameBuffer;
280  GotXCutTextProc GotXCutText;
281  BellProc Bell;
282 
283  GotCursorShapeProc GotCursorShape;
284  GotCopyRectProc GotCopyRect;
285 
294  rfbSupportedMessages supportedMessages;
295 
297  int major, minor;
298 
300  uint32_t authScheme, subAuthScheme;
301 
302 #ifdef LIBVNCSERVER_WITH_CLIENT_TLS
303 
304  gnutls_session_t tlsSession;
305 #endif
306 
313  GetCredentialProc GetCredential;
314 
317  uint32_t *clientAuthSchemes;
318 
320  char *destHost;
321  int destPort;
322 
324  int QoS_DSCP;
325 
327  HandleXvpMsgProc HandleXvpMsg;
328 } rfbClient;
329 
330 /* cursor.c */
331 
332 extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc);
333 
334 /* listen.c */
335 
336 extern void listenForIncomingConnections(rfbClient* viewer);
337 extern int listenForIncomingConnectionsNoFork(rfbClient* viewer, int usec_timeout);
338 
339 /* rfbproto.c */
340 
341 extern rfbBool rfbEnableClientLogging;
342 typedef void (*rfbClientLogProc)(const char *format, ...);
343 extern rfbClientLogProc rfbClientLog,rfbClientErr;
344 extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port);
345 extern rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort);
346 extern void SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size);
347 extern rfbBool InitialiseRFBConnection(rfbClient* client);
348 extern rfbBool SetFormatAndEncodings(rfbClient* client);
349 extern rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient* client);
350 extern rfbBool SendFramebufferUpdateRequest(rfbClient* client,
351  int x, int y, int w, int h,
352  rfbBool incremental);
353 extern rfbBool SendScaleSetting(rfbClient* client,int scaleSetting);
354 extern rfbBool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask);
355 extern rfbBool SendKeyEvent(rfbClient* client,uint32_t key, rfbBool down);
356 extern rfbBool SendClientCutText(rfbClient* client,char *str, int len);
357 extern rfbBool HandleRFBServerMessage(rfbClient* client);
358 
359 extern rfbBool TextChatSend(rfbClient* client, char *text);
360 extern rfbBool TextChatOpen(rfbClient* client);
361 extern rfbBool TextChatClose(rfbClient* client);
362 extern rfbBool TextChatFinish(rfbClient* client);
363 extern rfbBool PermitServerInput(rfbClient* client, int enabled);
364 extern rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code);
365 
366 extern void PrintPixelFormat(rfbPixelFormat *format);
367 
368 extern rfbBool SupportsClient2Server(rfbClient* client, int messageType);
369 extern rfbBool SupportsServer2Client(rfbClient* client, int messageType);
370 
371 /* client data */
372 
373 void rfbClientSetClientData(rfbClient* client, void* tag, void* data);
374 void* rfbClientGetClientData(rfbClient* client, void* tag);
375 
376 /* protocol extensions */
377 
378 typedef struct _rfbClientProtocolExtension {
379  int* encodings;
381  rfbBool (*handleEncoding)(rfbClient* cl,
382  rfbFramebufferUpdateRectHeader* rect);
384  rfbBool (*handleMessage)(rfbClient* cl,
385  rfbServerToClientMsg* message);
386  struct _rfbClientProtocolExtension* next;
387 } rfbClientProtocolExtension;
388 
389 void rfbClientRegisterExtension(rfbClientProtocolExtension* e);
390 
391 /* sockets.c */
392 
393 extern rfbBool errorMessageOnReadFailure;
394 
395 extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n);
396 extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n);
397 extern int FindFreeTcpPort(void);
398 extern int ListenAtTcpPort(int port);
399 extern int ConnectClientToTcpAddr(unsigned int host, int port);
400 extern int ConnectClientToTcpAddr6(const char *hostname, int port);
401 extern int ConnectClientToUnixSock(const char *sockFile);
402 extern int AcceptTcpConnection(int listenSock);
403 extern rfbBool SetNonBlocking(int sock);
404 extern rfbBool SetDSCP(int sock, int dscp);
405 
406 extern rfbBool StringToIPAddr(const char *str, unsigned int *addr);
407 extern rfbBool SameMachine(int sock);
408 extern int WaitForMessage(rfbClient* client,unsigned int usecs);
409 
410 /* vncviewer.c */
411 rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,int bytesPerPixel);
412 rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv);
414 void rfbClientCleanup(rfbClient* client);
415 
416 #if(defined __cplusplus)
417 }
418 #endif
419 
430 #endif
_rfbClient::programName
const char * programName
Definition: libvncserver/rfb/rfbclient.h:168
_rfbClient::clientData
rfbClientData * clientData
private data pointer
Definition: libvncserver/rfb/rfbclient.h:259
ListenAtTcpPort
int ListenAtTcpPort(int port)
HandleCursorShape
rfbBool HandleCursorShape(rfbClient *client, int xhot, int yhot, int width, int height, uint32_t enc)
_rfbClient::format
rfbPixelFormat format
Definition: libvncserver/rfb/rfbclient.h:192
_rfbClient::ultra_buffer
char * ultra_buffer
Definition: libvncserver/rfb/rfbclient.h:213
BellProc
void(* BellProc)(struct _rfbClient *client)
Definition: libvncserver/rfb/rfbclient.h:155
rfbClient
struct _rfbClient rfbClient
_rfbClient::HandleTextChat
HandleTextChatProc HandleTextChat
Definition: libvncserver/rfb/rfbclient.h:270
SendXvpMsg
rfbBool SendXvpMsg(rfbClient *client, uint8_t version, uint8_t code)
RFB_BUFFER_SIZE
#define RFB_BUFFER_SIZE
Note that the CoRRE encoding uses this buffer and assumes it is big enough to hold 255 * 255 * 32 bit...
Definition: libvncserver/rfb/rfbclient.h:183
_rfbClient::destHost
char * destHost
When the server is a repeater, this specifies the final destination.
Definition: libvncserver/rfb/rfbclient.h:320
_rfbClient::HandleKeyboardLedState
HandleKeyboardLedStateProc HandleKeyboardLedState
Definition: libvncserver/rfb/rfbclient.h:271
void
typedef void(__LZO_CDECL *lzo_free_func_t)(lzo_callback_p self
rfbproto.h
rfbClientRegisterExtension
void rfbClientRegisterExtension(rfbClientProtocolExtension *e)
_rfbClient::rcMask
uint8_t * rcMask
Definition: libvncserver/rfb/rfbclient.h:256
rfbClientData::tag
void * tag
Definition: libvncserver/rfb/rfbclient.h:92
GetCredentialProc
rfbCredential *(* GetCredentialProc)(struct _rfbClient *client, int credentialType)
Definition: libvncserver/rfb/rfbclient.h:152
_rfbClient::canUseHextile
rfbBool canUseHextile
Definition: libvncserver/rfb/rfbclient.h:190
_rfbClient::width
int width
Definition: libvncserver/rfb/rfbclient.h:162
GotXCutTextProc
void(* GotXCutTextProc)(struct _rfbClient *client, const char *text, int textlen)
Definition: libvncserver/rfb/rfbclient.h:154
_rfbClient::supportedMessages
rfbSupportedMessages supportedMessages
Which messages are supported by the server This is a guess for most servers.
Definition: libvncserver/rfb/rfbclient.h:294
_rfbClient::SoftCursorUnlockScreen
SoftCursorUnlockScreenProc SoftCursorUnlockScreen
Definition: libvncserver/rfb/rfbclient.h:274
_rfbClient::listenSpecified
rfbBool listenSpecified
Definition: libvncserver/rfb/rfbclient.h:171
InitialiseRFBConnection
rfbBool InitialiseRFBConnection(rfbClient *client)
_rfbCredential::userCredential
struct _rfbCredential::@4 userCredential
Plain (VeNCrypt), MSLogon (UltraVNC)
AppData::palmVNC
rfbBool palmVNC
use palmvnc specific SetScale (vs ultravnc)
Definition: libvncserver/rfb/rfbclient.h:115
_rfbClient::GetCredential
GetCredentialProc GetCredential
To support security types that requires user input (except VNC password authentication), for example VeNCrypt and MSLogon, this callback function must be set before the authentication.
Definition: libvncserver/rfb/rfbclient.h:313
_rfbClient::canUseCoRRE
rfbBool canUseCoRRE
Definition: libvncserver/rfb/rfbclient.h:189
AppData::useBGR233
rfbBool useBGR233
Definition: libvncserver/rfb/rfbclient.h:105
HandleKeyboardLedStateProc
void(* HandleKeyboardLedStateProc)(struct _rfbClient *client, int value, int pad)
Definition: libvncserver/rfb/rfbclient.h:145
_rfbClient::y
int y
Definition: libvncserver/rfb/rfbclient.h:175
rfbVNCRec
vncrec
Definition: libvncserver/rfb/rfbclient.h:82
rfbClientData::next
struct rfbClientData * next
Definition: libvncserver/rfb/rfbclient.h:94
listenForIncomingConnectionsNoFork
int listenForIncomingConnectionsNoFork(rfbClient *viewer, int usec_timeout)
MallocFrameBufferProc
rfbBool(* MallocFrameBufferProc)(struct _rfbClient *client)
Definition: libvncserver/rfb/rfbclient.h:153
rfbBool
int8_t rfbBool
Definition: rfbproto.h:102
_rfbClient::CurrentKeyboardLedState
int CurrentKeyboardLedState
Definition: libvncserver/rfb/rfbclient.h:265
AppData::qualityLevel
int qualityLevel
Definition: libvncserver/rfb/rfbclient.h:112
_rfbClient::raw_buffer
char * raw_buffer
Definition: libvncserver/rfb/rfbclient.h:216
_rfbClient::HandleCursorPos
HandleCursorPosProc HandleCursorPos
Definition: libvncserver/rfb/rfbclient.h:272
_rfbClient::ultra_buffer_size
int ultra_buffer_size
Definition: libvncserver/rfb/rfbclient.h:212
AppData::shareDesktop
rfbBool shareDesktop
Definition: libvncserver/rfb/rfbclient.h:100
_rfbClient::endianTest
int endianTest
Definition: libvncserver/rfb/rfbclient.h:164
_rfbClient::HandleXvpMsg
HandleXvpMsgProc HandleXvpMsg
hook to handle xvp server messages
Definition: libvncserver/rfb/rfbclient.h:327
rfbClientData
struct rfbClientData rfbClientData
client data
ConnectClientToTcpAddr
int ConnectClientToTcpAddr(unsigned int host, int port)
_rfbCredential::username
char * username
Definition: libvncserver/rfb/rfbclient.h:133
_rfbCredential::x509ClientKeyFile
char * x509ClientKeyFile
Definition: libvncserver/rfb/rfbclient.h:128
HandleTextChatProc
void(* HandleTextChatProc)(struct _rfbClient *client, int value, char *text)
Definition: libvncserver/rfb/rfbclient.h:143
_rfbCredential::x509CACertFile
char * x509CACertFile
Definition: libvncserver/rfb/rfbclient.h:125
rfbClientData::data
void * data
Definition: libvncserver/rfb/rfbclient.h:93
rfbClientLogProc
void(* rfbClientLogProc)(const char *format,...)
Definition: libvncserver/rfb/rfbclient.h:342
AppData::forceOwnCmap
rfbBool forceOwnCmap
Definition: libvncserver/rfb/rfbclient.h:107
_rfbClient::KeyboardLedStateEnabled
int KeyboardLedStateEnabled
Definition: libvncserver/rfb/rfbclient.h:264
rfbVNCRec::file
FILE * file
Definition: libvncserver/rfb/rfbclient.h:83
_rfbCredential::x509Credential
struct _rfbCredential::@3 x509Credential
X509 (VeNCrypt)
_rfbClient::serverHost
char * serverHost
Definition: libvncserver/rfb/rfbclient.h:169
rfbPixelFormat
Definition: rfbproto.h:148
FindFreeTcpPort
int FindFreeTcpPort(void)
SetNonBlocking
rfbBool SetNonBlocking(int sock)
ReadFromRFBServer
rfbBool ReadFromRFBServer(rfbClient *client, char *out, unsigned int n)
ConnectClientToTcpAddr6
int ConnectClientToTcpAddr6(const char *hostname, int port)
rfbClientLog
rfbClientLogProc rfbClientLog
ConnectToRFBRepeater
rfbBool ConnectToRFBRepeater(rfbClient *client, const char *repeaterHost, int repeaterPort, const char *destHost, int destPort)
_rfbCredential::password
char * password
Definition: libvncserver/rfb/rfbclient.h:134
_rfbClient::Bell
BellProc Bell
Definition: libvncserver/rfb/rfbclient.h:281
TextChatFinish
rfbBool TextChatFinish(rfbClient *client)
_rfbClient::vncRec
rfbVNCRec * vncRec
Definition: libvncserver/rfb/rfbclient.h:261
SendClientCutText
rfbBool SendClientCutText(rfbClient *client, char *str, int len)
AppData::enableJPEG
rfbBool enableJPEG
Definition: libvncserver/rfb/rfbclient.h:113
rfbClientData
client data
Definition: libvncserver/rfb/rfbclient.h:91
_rfbClient::bufoutptr
char * bufoutptr
Definition: libvncserver/rfb/rfbclient.h:201
SendPointerEvent
rfbBool SendPointerEvent(rfbClient *client, int x, int y, int buttonMask)
_rfbClient::MallocFrameBuffer
MallocFrameBufferProc MallocFrameBuffer
Definition: libvncserver/rfb/rfbclient.h:279
rfbServerToClientMsg
Definition: rfbproto.h:1149
HandleCursorPosProc
rfbBool(* HandleCursorPosProc)(struct _rfbClient *client, int x, int y)
Definition: libvncserver/rfb/rfbclient.h:146
_rfbClient::subAuthScheme
uint32_t subAuthScheme
Definition: libvncserver/rfb/rfbclient.h:300
rfbFramebufferUpdateRectHeader
Definition: rfbproto.h:537
_rfbClient::x
int x
Definition: libvncserver/rfb/rfbclient.h:175
listenForIncomingConnections
void listenForIncomingConnections(rfbClient *viewer)
_rfbClient::minor
int minor
Definition: libvncserver/rfb/rfbclient.h:297
_rfbClient::listenPort
int listenPort
Definition: libvncserver/rfb/rfbclient.h:172
ConnectClientToUnixSock
int ConnectClientToUnixSock(const char *sockFile)
PermitServerInput
rfbBool PermitServerInput(rfbClient *client, int enabled)
_rfbClient::major
int major
negotiated protocol version
Definition: libvncserver/rfb/rfbclient.h:297
rfbInitClient
rfbBool rfbInitClient(rfbClient *client, int *argc, char **argv)
SoftCursorLockAreaProc
void(* SoftCursorLockAreaProc)(struct _rfbClient *client, int x, int y, int w, int h)
Definition: libvncserver/rfb/rfbclient.h:147
_rfbClient::buf
char buf[RFB_BUF_SIZE]
Definition: libvncserver/rfb/rfbclient.h:200
AppData::useRemoteCursor
rfbBool useRemoteCursor
Definition: libvncserver/rfb/rfbclient.h:114
_rfbClient::raw_buffer_size
int raw_buffer_size
Definition: libvncserver/rfb/rfbclient.h:215
WaitForMessage
int WaitForMessage(rfbClient *client, unsigned int usecs)
_rfbClient::GotCursorShape
GotCursorShapeProc GotCursorShape
Definition: libvncserver/rfb/rfbclient.h:283
_rfbClient::w
int w
Definition: libvncserver/rfb/rfbclient.h:175
size
lzo_uint lzo_uint size
Definition: lzoconf.h:271
_rfbCredential::x509ClientCertFile
char * x509ClientCertFile
Definition: libvncserver/rfb/rfbclient.h:127
AppData::encodingsString
const char * encodingsString
Definition: libvncserver/rfb/rfbclient.h:103
_rfbClientProtocolExtension::handleMessage
rfbBool(* handleMessage)(rfbClient *cl, rfbServerToClientMsg *message)
returns TRUE if it handled the message
Definition: libvncserver/rfb/rfbclient.h:384
GotFrameBufferUpdateProc
void(* GotFrameBufferUpdateProc)(struct _rfbClient *client, int x, int y, int w, int h)
Definition: libvncserver/rfb/rfbclient.h:149
_rfbClientProtocolExtension::handleEncoding
rfbBool(* handleEncoding)(rfbClient *cl, rfbFramebufferUpdateRectHeader *rect)
returns TRUE if the encoding was handled
Definition: libvncserver/rfb/rfbclient.h:381
_rfbClient::appData
AppData appData
Definition: libvncserver/rfb/rfbclient.h:166
rfbEnableClientLogging
rfbBool rfbEnableClientLogging
rfbClientCleanup
void rfbClientCleanup(rfbClient *client)
rfbClientCleanup() does not touch client->frameBuffer
_rfbClient::destPort
int destPort
Definition: libvncserver/rfb/rfbclient.h:321
RFB_BUF_SIZE
#define RFB_BUF_SIZE
Definition: libvncserver/rfb/rfbclient.h:199
rfbGetClient
rfbClient * rfbGetClient(int bitsPerSample, int samplesPerPixel, int bytesPerPixel)
HandleXvpMsgProc
void(* HandleXvpMsgProc)(struct _rfbClient *client, uint8_t version, uint8_t opcode)
Definition: libvncserver/rfb/rfbclient.h:144
AppData::forceTrueColour
rfbBool forceTrueColour
Definition: libvncserver/rfb/rfbclient.h:108
_rfbClient::buffered
int buffered
Definition: libvncserver/rfb/rfbclient.h:202
GotCopyRectProc
void(* GotCopyRectProc)(struct _rfbClient *client, int src_x, int src_y, int w, int h, int dest_x, int dest_y)
Definition: libvncserver/rfb/rfbclient.h:158
rfbClientProtocolExtension
struct _rfbClientProtocolExtension rfbClientProtocolExtension
rfbServerInitMsg
Definition: rfbproto.h:354
AppData::requestedDepth
int requestedDepth
Definition: libvncserver/rfb/rfbclient.h:109
_rfbClient::GotCopyRect
GotCopyRectProc GotCopyRect
Definition: libvncserver/rfb/rfbclient.h:284
GotCursorShapeProc
void(* GotCursorShapeProc)(struct _rfbClient *client, int xhot, int yhot, int width, int height, int bytesPerPixel)
Definition: libvncserver/rfb/rfbclient.h:157
SendKeyEvent
rfbBool SendKeyEvent(rfbClient *client, uint32_t key, rfbBool down)
AcceptTcpConnection
int AcceptTcpConnection(int listenSock)
rfbClientGetClientData
void * rfbClientGetClientData(rfbClient *client, void *tag)
SetFormatAndEncodings
rfbBool SetFormatAndEncodings(rfbClient *client)
_rfbClient::buffer
char buffer[RFB_BUFFER_SIZE]
Definition: libvncserver/rfb/rfbclient.h:184
_rfbClient::GotXCutText
GotXCutTextProc GotXCutText
Definition: libvncserver/rfb/rfbclient.h:280
AppData
app data (belongs into rfbClient?)
Definition: libvncserver/rfb/rfbclient.h:99
_rfbClient::updateRect
struct _rfbClient::@5 updateRect
_rfbClient::si
rfbServerInitMsg si
Definition: libvncserver/rfb/rfbclient.h:193
SendScaleSetting
rfbBool SendScaleSetting(rfbClient *client, int scaleSetting)
AppData::nColours
int nColours
Definition: libvncserver/rfb/rfbclient.h:106
errorMessageOnReadFailure
rfbBool errorMessageOnReadFailure
keysym.h
_rfbClient::listenSock
int listenSock
Definition: libvncserver/rfb/rfbclient.h:196
rfbCredential
union _rfbCredential rfbCredential
For GetCredentialProc callback function to return.
SoftCursorUnlockScreenProc
void(* SoftCursorUnlockScreenProc)(struct _rfbClient *client)
Definition: libvncserver/rfb/rfbclient.h:148
_rfbClient::h
int h
Definition: libvncserver/rfb/rfbclient.h:175
_rfbClient::GotFrameBufferUpdate
GotFrameBufferUpdateProc GotFrameBufferUpdate
Definition: libvncserver/rfb/rfbclient.h:275
AppData::compressLevel
int compressLevel
Definition: libvncserver/rfb/rfbclient.h:111
_rfbClient::SoftCursorLockArea
SoftCursorLockAreaProc SoftCursorLockArea
Definition: libvncserver/rfb/rfbclient.h:273
StringToIPAddr
rfbBool StringToIPAddr(const char *str, unsigned int *addr)
_rfbClient::canHandleNewFBSize
int canHandleNewFBSize
Definition: libvncserver/rfb/rfbclient.h:267
SetDSCP
rfbBool SetDSCP(int sock, int dscp)
AppData::viewOnly
rfbBool viewOnly
Definition: libvncserver/rfb/rfbclient.h:101
SendIncrementalFramebufferUpdateRequest
rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient *client)
_rfbClient::clientAuthSchemes
uint32_t * clientAuthSchemes
The 0-terminated security types supported by the client.
Definition: libvncserver/rfb/rfbclient.h:317
_rfbClient::QoS_DSCP
int QoS_DSCP
the QoS IP DSCP for this client
Definition: libvncserver/rfb/rfbclient.h:324
_rfbClient::FinishedFrameBufferUpdate
FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate
Definition: libvncserver/rfb/rfbclient.h:276
_rfbClientProtocolExtension
Definition: libvncserver/rfb/rfbclient.h:378
_rfbClient::height
int height
Definition: libvncserver/rfb/rfbclient.h:162
_rfbClient::sock
int sock
Definition: libvncserver/rfb/rfbclient.h:188
FinishedFrameBufferUpdateProc
void(* FinishedFrameBufferUpdateProc)(struct _rfbClient *client)
Definition: libvncserver/rfb/rfbclient.h:150
_rfbClient::frameBuffer
uint8_t * frameBuffer
Definition: libvncserver/rfb/rfbclient.h:161
_rfbClient::authScheme
uint32_t authScheme
The selected security types.
Definition: libvncserver/rfb/rfbclient.h:300
_rfbClient::serverPort
int serverPort
if -1, then use file recorded by vncrec
Definition: libvncserver/rfb/rfbclient.h:170
SupportsClient2Server
rfbBool SupportsClient2Server(rfbClient *client, int messageType)
HandleRFBServerMessage
rfbBool HandleRFBServerMessage(rfbClient *client)
_rfbClientProtocolExtension::encodings
int * encodings
Definition: libvncserver/rfb/rfbclient.h:379
TextChatOpen
rfbBool TextChatOpen(rfbClient *client)
SetClientAuthSchemes
void SetClientAuthSchemes(rfbClient *client, const uint32_t *authSchemes, int size)
PrintPixelFormat
void PrintPixelFormat(rfbPixelFormat *format)
_rfbCredential::x509CACrlFile
char * x509CACrlFile
Definition: libvncserver/rfb/rfbclient.h:126
_rfbClientProtocolExtension::next
struct _rfbClientProtocolExtension * next
Definition: libvncserver/rfb/rfbclient.h:386
TextChatSend
rfbBool TextChatSend(rfbClient *client, char *text)
rfbClientErr
rfbClientLogProc rfbClientErr
ConnectToRFBServer
rfbBool ConnectToRFBServer(rfbClient *client, const char *hostname, int port)
_rfbClient::rcSource
uint8_t * rcSource
Definition: libvncserver/rfb/rfbclient.h:256
_rfbCredential
For GetCredentialProc callback function to return.
Definition: libvncserver/rfb/rfbclient.h:120
rfbSupportedMessages
Definition: rfbproto.h:551
rfbClientSetClientData
void rfbClientSetClientData(rfbClient *client, void *tag, void *data)
SendFramebufferUpdateRequest
rfbBool SendFramebufferUpdateRequest(rfbClient *client, int x, int y, int w, int h, rfbBool incremental)
rfbVNCRec::doNotSleep
rfbBool doNotSleep
Definition: libvncserver/rfb/rfbclient.h:86
AppData::scaleSetting
int scaleSetting
0 means no scale set, else 1/scaleSetting
Definition: libvncserver/rfb/rfbclient.h:116
TextChatClose
rfbBool TextChatClose(rfbClient *client)
_rfbClient
Definition: libvncserver/rfb/rfbclient.h:160
SameMachine
rfbBool SameMachine(int sock)
_rfbClient::flashPort
int flashPort
Definition: libvncserver/rfb/rfbclient.h:172
WriteToRFBServer
rfbBool WriteToRFBServer(rfbClient *client, char *buf, int n)
SupportsServer2Client
rfbBool SupportsServer2Client(rfbClient *client, int messageType)
_rfbClient::GetPassword
GetPasswordProc GetPassword
the pointer returned by GetPassword will be freed after use!
Definition: libvncserver/rfb/rfbclient.h:278
_rfbClient::desktopName
char * desktopName
Definition: libvncserver/rfb/rfbclient.h:191
GetPasswordProc
char *(* GetPasswordProc)(struct _rfbClient *client)
Definition: libvncserver/rfb/rfbclient.h:151
rfbVNCRec::readTimestamp
rfbBool readTimestamp
Definition: libvncserver/rfb/rfbclient.h:85
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

krfb

Skip menu "krfb"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal