WD
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VNCClient Class Reference

#include <vncclient.h>

Inheritance diagram for VNCClient:
Collaboration diagram for VNCClient:

Public Types

enum  Encodings {
  Invalid = 0, None = 1, VNCAuthentication = 2, RA2 = 5,
  RA2ne = 6, Tight = 16, Ultra = 17, TLS = 18,
  VeNCrypt = 19, GTK_VNC_SASL = 20, MD5_hash_athentication = 21, ColinDean_xvp = 22
}
 
enum  ClientMsg {
  SetPixelFormat = 0, FixColourMapEntries = 1, SetEncodings = 2, FramebufferUpdateRequest = 3,
  KeyEvent = 4, PointerEvent = 5, ClientCutText = 6
}
 

Public Slots

QByteArray readSocket ()
 
qint64 writeToSocket (QByteArray &data)
 

Public Member Functions

 ~VNCClient ()
 
bool Init (QString remoteHost, quint16 port)
 
bool Init (QString remoteHost, quint16 port, QString *password)
 
void sendKeyEvent (QKeyEvent *key)
 
void sendMouseEvent (QMouseEvent *mouse)
 
bool isReady ()
 

Static Public Member Functions

static VNCClientgetInstance ()
 
static void SplitVncLoginParameters (QString &loginInfo, QString *login, QString *passwd, QString *ip, QString *port)
 

Static Public Attributes

static QMap< quint32, quint16 > _keymap
 

Detailed Description

VNCClient - class provides main functionality of VNC client.

Member Enumeration Documentation

enumeration with message types

Enumerator
SetPixelFormat 
FixColourMapEntries 
SetEncodings 
FramebufferUpdateRequest 
KeyEvent 
PointerEvent 
ClientCutText 

enumeration with encodings

Enumerator
Invalid 
None 
VNCAuthentication 
RA2 
RA2ne 
Tight 
Ultra 
TLS 
VeNCrypt 
GTK_VNC_SASL 
MD5_hash_athentication 
ColinDean_xvp 

Constructor & Destructor Documentation

VNCClient::~VNCClient ( )

Destructor

Member Function Documentation

static VNCClient* VNCClient::getInstance ( )
static

Returns VNCClient instance. Will create new one, if it not exist

Returns
pointer to
See Also
VNCClient
bool VNCClient::Init ( QString  remoteHost,
quint16  port 
)

Initialize VNC client connection without authentication

Parameters
remoteHost- address of VNC server
port- port number of VNC server
Returns
true if client initialized, else false
bool VNCClient::Init ( QString  remoteHost,
quint16  port,
QString *  password 
)

Initialize VNC client connection with authentication

Parameters
remoteHost- address of VNC server
port- port number of VNC server
password- authentication password
Returns
true if client initialized, else false
bool VNCClient::isReady ( )

Indicates whether VNC client is initialized

Returns
true, if client initialized, else false
QByteArray VNCClient::readSocket ( )
slot

reads data from socket

Returns
array with data
void VNCClient::sendKeyEvent ( QKeyEvent *  key)

Sends Qt key event to VNC server

Parameters
key- pointer to QKeyEvent instance
void VNCClient::sendMouseEvent ( QMouseEvent *  mouse)

Sends Qt mouse event to VNC server

Parameters
mouse- pointer to QMouseEvent instance
static void VNCClient::SplitVncLoginParameters ( QString &  loginInfo,
QString *  login,
QString *  passwd,
QString *  ip,
QString *  port 
)
static

Splits vnc command line parameter to separate variables

Parameters
[in]loginInfo- string with all login info
[out]login- string with login
[out]passwd- string with password
[out]ip- string with ip address of VNC server
[out]port- string with port number of VNC server
qint64 VNCClient::writeToSocket ( QByteArray &  data)
slot

writes data to socket

Parameters
data- byte array with data for writing
Returns
number of actuall written bytes

Member Data Documentation

QMap<quint32, quint16> VNCClient::_keymap
static

Map with keycodes correspondences between Qt and RFB protocol


The documentation for this class was generated from the following file: