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

krdc

  • sources
  • kde-4.12
  • kdenetwork
  • krdc
  • vnc
vncclientthread.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2007 - 2013 Urs Wolfer <uwolfer @ kde.org>
4 **
5 ** This file is part of KDE.
6 **
7 ** This program is free software; you can redistribute it and/or modify
8 ** it under the terms of the GNU General Public License as published by
9 ** the Free Software Foundation; either version 2 of the License, or
10 ** (at your option) any later version.
11 **
12 ** This program is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU General Public License for more details.
16 **
17 ** You should have received a copy of the GNU General Public License
18 ** along with this program; see the file COPYING. If not, write to
19 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 ** Boston, MA 02110-1301, USA.
21 **
22 ****************************************************************************/
23 
24 #include "vncclientthread.h"
25 
26 #include <cerrno>
27 #include <netinet/in.h>
28 #include <netinet/tcp.h>
29 #include <sys/types.h>
30 #include <sys/socket.h>
31 #include <QMutexLocker>
32 #include <QThreadStorage>
33 #include <QTimer>
34 
35 //for detecting intel AMT KVM vnc server
36 static const QString INTEL_AMT_KVM_STRING= "Intel(r) AMT KVM";
37 static QThreadStorage<VncClientThread **> instances;
38 
39 // Dispatch from this static callback context to the member context.
40 rfbBool VncClientThread::newclientStatic(rfbClient *cl)
41 {
42  VncClientThread *t = (VncClientThread *)rfbClientGetClientData(cl, 0);
43  Q_ASSERT(t);
44 
45  return t->newclient();
46 }
47 
48 // Dispatch from this static callback context to the member context.
49 void VncClientThread::updatefbStatic(rfbClient *cl, int x, int y, int w, int h)
50 {
51  VncClientThread *t = (VncClientThread *)rfbClientGetClientData(cl, 0);
52  Q_ASSERT(t);
53 
54  return t->updatefb(x, y, w, h);
55 }
56 
57 // Dispatch from this static callback context to the member context.
58 void VncClientThread::cuttextStatic(rfbClient *cl, const char *text, int textlen)
59 {
60  VncClientThread *t = (VncClientThread *)rfbClientGetClientData(cl, 0);
61  Q_ASSERT(t);
62 
63  t->cuttext(text, textlen);
64 }
65 
66 // Dispatch from this static callback context to the member context.
67 char *VncClientThread::passwdHandlerStatic(rfbClient *cl)
68 {
69  VncClientThread *t = (VncClientThread *)rfbClientGetClientData(cl, 0);
70  Q_ASSERT(t);
71 
72  return t->passwdHandler();
73 }
74 
75 // Dispatch from this static callback context to the member context.
76 rfbCredential *VncClientThread::credentialHandlerStatic(rfbClient *cl, int credentialType)
77 {
78  VncClientThread *t = (VncClientThread *)rfbClientGetClientData(cl, 0);
79  Q_ASSERT(t);
80 
81  return t->credentialHandler(credentialType);
82 }
83 
84 // Dispatch from this static callback context to the member context.
85 void VncClientThread::outputHandlerStatic(const char *format, ...)
86 {
87  VncClientThread **t = instances.localData();
88 
89  va_list args;
90  va_start(args, format);
91  (*t)->outputHandler(format, args);
92  va_end(args);
93 }
94 
95 void VncClientThread::setClientColorDepth(rfbClient* cl, VncClientThread::ColorDepth cd)
96 {
97  switch(cd) {
98  case bpp8:
99  if (m_colorTable.isEmpty()) {
100  m_colorTable.resize(256);
101  int r,g,b;
102  for (int i = 0; i < 256; ++i) {
103  //pick out the red (3 bits), green (3 bits) and blue (2 bits) bits and make them maximum significant in 8bits
104  //this gives a colortable for 8bit true colors
105  r= (i & 0x07) << 5;
106  g= (i & 0x38) << 2;
107  b= i & 0xc0;
108  m_colorTable[i] = qRgb(r, g, b);
109  }
110  }
111  cl->format.depth = 8;
112  cl->format.bitsPerPixel = 8;
113  cl->format.redShift = 0;
114  cl->format.greenShift = 3;
115  cl->format.blueShift = 6;
116  cl->format.redMax = 7;
117  cl->format.greenMax = 7;
118  cl->format.blueMax = 3;
119  break;
120  case bpp16:
121  cl->format.depth = 16;
122  cl->format.bitsPerPixel = 16;
123  cl->format.redShift = 11;
124  cl->format.greenShift = 5;
125  cl->format.blueShift = 0;
126  cl->format.redMax = 0x1f;
127  cl->format.greenMax = 0x3f;
128  cl->format.blueMax = 0x1f;
129  break;
130  case bpp32:
131  default:
132  cl->format.depth = 24;
133  cl->format.bitsPerPixel = 32;
134  cl->format.redShift = 16;
135  cl->format.greenShift = 8;
136  cl->format.blueShift = 0;
137  cl->format.redMax = 0xff;
138  cl->format.greenMax = 0xff;
139  cl->format.blueMax = 0xff;
140  }
141 }
142 
143 rfbBool VncClientThread::newclient()
144 {
145  //8bit color hack for Intel(r) AMT KVM "classic vnc" = vnc server built in in Intel Vpro chipsets.
146  if (INTEL_AMT_KVM_STRING == cl->desktopName) {
147  kDebug(5011) << "Intel(R) AMT KVM: switching to 8 bit color depth (workaround, recent libvncserver needed)";
148  setColorDepth(bpp8);
149  }
150  setClientColorDepth(cl, colorDepth());
151 
152  const int width = cl->width, height = cl->height, depth = cl->format.bitsPerPixel;
153  const int size = width * height * (depth / 8);
154  if (frameBuffer)
155  delete [] frameBuffer; // do not leak if we get a new framebuffer size
156  frameBuffer = new uint8_t[size];
157  cl->frameBuffer = frameBuffer;
158  memset(cl->frameBuffer, '\0', size);
159 
160  switch (quality()) {
161  case RemoteView::High:
162  cl->appData.encodingsString = "copyrect zlib hextile raw";
163  cl->appData.compressLevel = 0;
164  cl->appData.qualityLevel = 9;
165  break;
166  case RemoteView::Medium:
167  cl->appData.encodingsString = "copyrect tight zrle ultra zlib hextile corre rre raw";
168  cl->appData.compressLevel = 5;
169  cl->appData.qualityLevel = 7;
170  break;
171  case RemoteView::Low:
172  case RemoteView::Unknown:
173  default:
174  cl->appData.encodingsString = "copyrect tight zrle ultra zlib hextile corre rre raw";
175  cl->appData.compressLevel = 9;
176  cl->appData.qualityLevel = 1;
177  }
178 
179  SetFormatAndEncodings(cl);
180  kDebug(5011) << "Client created";
181  return true;
182 }
183 
184 void VncClientThread::updatefb(int x, int y, int w, int h)
185 {
186 // kDebug(5011) << "updated client: x: " << x << ", y: " << y << ", w: " << w << ", h: " << h;
187 
188  const int width = cl->width, height = cl->height;
189  QImage img;
190  switch(colorDepth()) {
191  case bpp8:
192  img = QImage(cl->frameBuffer, width, height, QImage::Format_Indexed8);
193  img.setColorTable(m_colorTable);
194  break;
195  case bpp16:
196  img = QImage(cl->frameBuffer, width, height, QImage::Format_RGB16);
197  break;
198  case bpp32:
199  img = QImage(cl->frameBuffer, width, height, QImage::Format_RGB32);
200  break;
201  }
202 
203  if (img.isNull()) {
204  kDebug(5011) << "image not loaded";
205  }
206 
207  if (m_stopped) {
208  return; // sending data to a stopped thread is not a good idea
209  }
210 
211  setImage(img);
212 
213  emitUpdated(x, y, w, h);
214 }
215 
216 void VncClientThread::cuttext(const char *text, int textlen)
217 {
218  const QString cutText = QString::fromUtf8(text, textlen);
219  kDebug(5011) << cutText;
220 
221  if (!cutText.isEmpty()) {
222  emitGotCut(cutText);
223  }
224 }
225 
226 char *VncClientThread::passwdHandler()
227 {
228  kDebug(5011) << "password request";
229 
230  // Never request a password during a reconnect attempt.
231  if (!m_keepalive.failed) {
232  passwordRequest();
233  m_passwordError = true;
234  }
235  return strdup(m_password.toUtf8());
236 }
237 
238 rfbCredential *VncClientThread::credentialHandler(int credentialType)
239 {
240  kDebug(5011) << "credential request" << credentialType;
241 
242  rfbCredential *cred = 0;
243 
244  switch (credentialType) {
245  case rfbCredentialTypeUser:
246  passwordRequest(true);
247  m_passwordError = true;
248 
249  cred = new rfbCredential;
250  cred->userCredential.username = strdup(username().toUtf8());
251  cred->userCredential.password = strdup(password().toUtf8());
252  break;
253  default:
254  kError(5011) << "credential request failed, unspported credentialType:" << credentialType;
255  outputErrorMessage(i18n("VNC authentication type is not supported."));
256  break;
257  }
258  return cred;
259 }
260 
261 void VncClientThread::outputHandler(const char *format, ...)
262 {
263  va_list args;
264  va_start(args, format);
265 
266  QString message;
267  message.vsprintf(format, args);
268 
269  va_end(args);
270 
271  message = message.trimmed();
272 
273  kDebug(5011) << message;
274 
275  if ((message.contains("Couldn't convert ")) ||
276  (message.contains("Unable to connect to VNC server"))) {
277  // Don't show a dialog if a reconnection is needed. Never contemplate
278  // reconnection if we don't have a password.
279  QString tmp = i18n("Server not found.");
280  if (m_keepalive.set && !m_password.isNull()) {
281  m_keepalive.failed = true;
282  if (m_previousDetails != tmp) {
283  m_previousDetails = tmp;
284  clientStateChange(RemoteView::Disconnected, tmp);
285  }
286  } else {
287  outputErrorMessageString = tmp;
288  }
289  }
290 
291  // Process general authentication failures before more specific authentication
292  // failures. All authentication failures cancel any auto-reconnection that
293  // may be in progress.
294  if (message.contains("VNC connection failed: Authentication failed")) {
295  m_keepalive.failed = false;
296  outputErrorMessageString = i18n("VNC authentication failed.");
297  }
298  if ((message.contains("VNC connection failed: Authentication failed, too many tries")) ||
299  (message.contains("VNC connection failed: Too many authentication failures"))) {
300  m_keepalive.failed = false;
301  outputErrorMessageString = i18n("VNC authentication failed because of too many authentication tries.");
302  }
303 
304  if (message.contains("VNC server closed connection"))
305  outputErrorMessageString = i18n("VNC server closed connection.");
306 
307  // If we are not going to attempt a reconnection, at least tell the user
308  // the connection went away.
309  if (message.contains("read (")) {
310  // Don't show a dialog if a reconnection is needed. Never contemplate
311  // reconnection if we don't have a password.
312  QString tmp = i18n("Disconnected: %1.", message);
313  if (m_keepalive.set && !m_password.isNull()) {
314  m_keepalive.failed = true;
315  clientStateChange(RemoteView::Disconnected, tmp);
316  } else {
317  outputErrorMessageString = tmp;
318  }
319  }
320 
321  // internal messages, not displayed to user
322  if (message.contains("VNC server supports protocol version 3.889")) // see http://bugs.kde.org/162640
323  outputErrorMessageString = "INTERNAL:APPLE_VNC_COMPATIBILTY";
324 }
325 
326 VncClientThread::VncClientThread(QObject *parent)
327  : QThread(parent)
328  , frameBuffer(0)
329  , cl(0)
330  , m_stopped(false)
331 {
332  // We choose a small value for interval...after all if the connection is
333  // supposed to sustain a VNC session, a reasonably frequent ping should
334  // be perfectly supportable.
335  m_keepalive.intervalSeconds = 1;
336  m_keepalive.failedProbes = 3;
337  m_keepalive.set = false;
338  m_keepalive.failed = false;
339  m_previousDetails = QString::null;
340  outputErrorMessageString.clear(); //don't deliver error messages of old instances...
341  QMutexLocker locker(&mutex);
342 
343  QTimer *outputErrorMessagesCheckTimer = new QTimer(this);
344  outputErrorMessagesCheckTimer->setInterval(500);
345  connect(outputErrorMessagesCheckTimer, SIGNAL(timeout()), this, SLOT(checkOutputErrorMessage()));
346  outputErrorMessagesCheckTimer->start();
347 }
348 
349 VncClientThread::~VncClientThread()
350 {
351  if(isRunning()) {
352  stop();
353  terminate();
354  const bool quitSuccess = wait(1000);
355  kDebug(5011) << "Attempting to stop in deconstructor, will crash if this fails:" << quitSuccess;
356  }
357 
358  clientDestroy();
359 
360  delete [] frameBuffer;
361 }
362 
363 void VncClientThread::checkOutputErrorMessage()
364 {
365  if (!outputErrorMessageString.isEmpty()) {
366  kDebug(5011) << outputErrorMessageString;
367  QString errorMessage = outputErrorMessageString;
368  outputErrorMessageString.clear();
369  // show authentication failure error only after the 3rd unsuccessful try
370  if ((errorMessage != i18n("VNC authentication failed.")) || m_passwordError)
371  outputErrorMessage(errorMessage);
372  }
373 }
374 
375 void VncClientThread::setHost(const QString &host)
376 {
377  QMutexLocker locker(&mutex);
378  m_host = host;
379 }
380 
381 void VncClientThread::setPort(int port)
382 {
383  QMutexLocker locker(&mutex);
384  m_port = port;
385 }
386 
387 void VncClientThread::setQuality(RemoteView::Quality quality)
388 {
389  m_quality = quality;
390  //set color depth dependent on quality
391  switch(quality) {
392  case RemoteView::Low:
393  setColorDepth(bpp8);
394  break;
395  case RemoteView::High:
396  setColorDepth(bpp32);
397  break;
398  case RemoteView::Medium:
399  default:
400  setColorDepth(bpp16);
401  }
402 }
403 
404 void VncClientThread::setColorDepth(ColorDepth colorDepth)
405 {
406  m_colorDepth= colorDepth;
407 }
408 
409 RemoteView::Quality VncClientThread::quality() const
410 {
411  return m_quality;
412 }
413 
414 VncClientThread::ColorDepth VncClientThread::colorDepth() const
415 {
416  return m_colorDepth;
417 }
418 
419 void VncClientThread::setImage(const QImage &img)
420 {
421  QMutexLocker locker(&mutex);
422  m_image = img;
423 }
424 
425 const QImage VncClientThread::image(int x, int y, int w, int h)
426 {
427  QMutexLocker locker(&mutex);
428 
429  if (w == 0) // full image requested
430  return m_image;
431  else
432  return m_image.copy(x, y, w, h);
433 }
434 
435 void VncClientThread::emitUpdated(int x, int y, int w, int h)
436 {
437  emit imageUpdated(x, y, w, h);
438 }
439 
440 void VncClientThread::emitGotCut(const QString &text)
441 {
442  emit gotCut(text);
443 }
444 
445 void VncClientThread::stop()
446 {
447  QMutexLocker locker(&mutex);
448  m_stopped = true;
449 }
450 
451 void VncClientThread::run()
452 {
453  QMutexLocker locker(&mutex);
454 
455  VncClientThread **threadTls = new VncClientThread *();
456  *threadTls = this;
457  instances.setLocalData(threadTls);
458  while (!m_stopped) { // try to connect as long as the server allows
459  locker.relock();
460  m_passwordError = false;
461  locker.unlock();
462 
463  if (clientCreate(false)) {
464  // The initial connection attempt worked!
465  break;
466  }
467 
468  locker.relock();
469  if (m_passwordError) {
470  locker.unlock();
471  // Try again.
472  continue;
473  }
474 
475  // The initial connection attempt failed, and not because of a
476  // password problem. Bail out.
477  m_stopped = true;
478  locker.unlock();
479  }
480 
481  locker.relock();
482  kDebug(5011) << "--------------------- Starting main VNC event loop ---------------------";
483  while (!m_stopped) {
484  locker.unlock();
485  const int i = WaitForMessage(cl, 500);
486  if (m_stopped || i < 0) {
487  break;
488  }
489  if (i) {
490  if (!HandleRFBServerMessage(cl)) {
491  if (m_keepalive.failed) {
492  do {
493  // Reconnect after a short delay. That way, if the
494  // attempt fails very quickly, we don't sit in a very
495  // tight loop.
496  clientDestroy();
497  msleep(1000);
498  clientStateChange(RemoteView::Connecting, i18n("Reconnecting."));
499  } while (!clientCreate(true));
500  continue;
501  }
502  kError(5011) << "HandleRFBServerMessage failed";
503  break;
504  }
505  }
506 
507  locker.relock();
508  while (!m_eventQueue.isEmpty()) {
509  ClientEvent* clientEvent = m_eventQueue.dequeue();
510  locker.unlock();
511  clientEvent->fire(cl);
512  delete clientEvent;
513  locker.relock();
514  }
515  }
516 
517  m_stopped = true;
518 }
519 
528 bool VncClientThread::clientCreate(bool reinitialising)
529 {
530  rfbClientLog = outputHandlerStatic;
531  rfbClientErr = outputHandlerStatic;
532 
533  //24bit color dept in 32 bits per pixel = default. Will change colordepth and bpp later if needed
534  cl = rfbGetClient(8, 3, 4);
535  setClientColorDepth(cl, this->colorDepth());
536  cl->MallocFrameBuffer = newclientStatic;
537  cl->canHandleNewFBSize = true;
538  cl->GetPassword = passwdHandlerStatic;
539  cl->GetCredential = credentialHandlerStatic;
540  cl->GotFrameBufferUpdate = updatefbStatic;
541  cl->GotXCutText = cuttextStatic;
542  rfbClientSetClientData(cl, 0, this);
543 
544  cl->serverHost = strdup(m_host.toUtf8().constData());
545 
546  if (m_port < 0 || !m_port) // port is invalid or empty...
547  m_port = 5900; // fallback: try an often used VNC port
548 
549  if (m_port >= 0 && m_port < 100) // the user most likely used the short form (e.g. :1)
550  m_port += 5900;
551  cl->serverPort = m_port;
552 
553  kDebug(5011) << "--------------------- trying init ---------------------";
554 
555  if (!rfbInitClient(cl, 0, 0)) {
556  if (!reinitialising) {
557  // Don't whine on reconnection failure: presumably the network
558  // is simply still down.
559  kError(5011) << "rfbInitClient failed";
560  }
561  cl = 0;
562  return false;
563  }
564 
565  if (reinitialising) {
566  clientStateChange(RemoteView::Connected, i18n("Reconnected."));
567  } else {
568  clientStateChange(RemoteView::Connected, i18n("Connected."));
569  }
570  clientSetKeepalive();
571  return true;
572 }
573 
577 void VncClientThread::clientDestroy()
578 {
579 
580  if (cl) {
581  // Disconnect from vnc server & cleanup allocated resources
582  rfbClientCleanup(cl);
583  cl = 0;
584  }
585 }
586 
591 void VncClientThread::clientSetKeepalive()
592 {
593  // If keepalive is disabled, do nothing.
594  m_keepalive.set = false;
595  m_keepalive.failed = false;
596  if (!m_keepalive.intervalSeconds) {
597  return;
598  }
599  int optval;
600  socklen_t optlen = sizeof(optval);
601 
602  // Try to set the option active
603  optval = 1;
604  if (setsockopt(cl->sock, SOL_SOCKET, SO_KEEPALIVE, &optval, optlen) < 0) {
605  kError(5011) << "setsockopt(SO_KEEPALIVE)" << strerror(errno);
606  return;
607  }
608 
609  optval = m_keepalive.intervalSeconds;
610  if (setsockopt(cl->sock, IPPROTO_TCP, TCP_KEEPIDLE, &optval, optlen) < 0) {
611  kError(5011) << "setsockopt(TCP_KEEPIDLE)" << strerror(errno);
612  return;
613  }
614 
615  optval = m_keepalive.intervalSeconds;
616  if (setsockopt(cl->sock, IPPROTO_TCP, TCP_KEEPINTVL, &optval, optlen) < 0) {
617  kError(5011) << "setsockopt(TCP_KEEPINTVL)" << strerror(errno);
618  return;
619  }
620 
621  optval = m_keepalive.failedProbes;
622  if(setsockopt(cl->sock, IPPROTO_TCP, TCP_KEEPCNT, &optval, optlen) < 0) {
623  kError(5011) << "setsockopt(TCP_KEEPCNT)" << strerror(errno);
624  return;
625  }
626  m_keepalive.set = true;
627  kDebug(5011) << "TCP keepalive set";
628 }
629 
633 void VncClientThread::clientStateChange(RemoteView::RemoteStatus status, const QString &details)
634 {
635  kDebug(5011) << status << details << m_host << ":" << m_port;
636  emit clientStateChanged(status, details);
637 }
638 
639 ClientEvent::~ClientEvent()
640 {
641 }
642 
643 void PointerClientEvent::fire(rfbClient* cl)
644 {
645  SendPointerEvent(cl, m_x, m_y, m_buttonMask);
646 }
647 
648 void KeyClientEvent::fire(rfbClient* cl)
649 {
650  SendKeyEvent(cl, m_key, m_pressed);
651 }
652 
653 void ClientCutEvent::fire(rfbClient* cl)
654 {
655  SendClientCutText(cl, text.toUtf8().data(), text.size());
656 }
657 
658 void VncClientThread::mouseEvent(int x, int y, int buttonMask)
659 {
660  QMutexLocker lock(&mutex);
661  if (m_stopped)
662  return;
663 
664  m_eventQueue.enqueue(new PointerClientEvent(x, y, buttonMask));
665 }
666 
667 void VncClientThread::keyEvent(int key, bool pressed)
668 {
669  QMutexLocker lock(&mutex);
670  if (m_stopped)
671  return;
672 
673  m_eventQueue.enqueue(new KeyClientEvent(key, pressed));
674 }
675 
676 void VncClientThread::clientCut(const QString &text)
677 {
678  QMutexLocker lock(&mutex);
679  if (m_stopped)
680  return;
681 
682  m_eventQueue.enqueue(new ClientCutEvent(text));
683 }
684 
685 #include "moc_vncclientthread.cpp"
RemoteView::Low
Definition: remoteview.h:71
VncClientThread::bpp8
Definition: vncclientthread.h:106
VncClientThread::mouseEvent
void mouseEvent(int x, int y, int buttonMask)
Definition: vncclientthread.cpp:658
RemoteView::Quality
Quality
Definition: remoteview.h:67
RemoteView::RemoteStatus
RemoteStatus
State of the connection.
Definition: remoteview.h:108
RemoteView::Unknown
Definition: remoteview.h:68
VncClientThread::bpp32
Definition: vncclientthread.h:104
VncClientThread::setQuality
void setQuality(RemoteView::Quality quality)
Definition: vncclientthread.cpp:387
VncClientThread::password
const QString password() const
Definition: vncclientthread.h:122
PointerClientEvent::fire
void fire(rfbClient *)
Definition: vncclientthread.cpp:643
VncClientThread::colorDepth
ColorDepth colorDepth() const
Definition: vncclientthread.cpp:414
VncClientThread::clientStateChanged
void clientStateChanged(RemoteView::RemoteStatus status, const QString &details)
When we connect/disconnect/reconnect/etc., this signal will be emitted.
ClientCutEvent::fire
void fire(rfbClient *)
Definition: vncclientthread.cpp:653
VncClientThread::keyEvent
void keyEvent(int key, bool pressed)
Definition: vncclientthread.cpp:667
QObject
VncClientThread::quality
RemoteView::Quality quality() const
Definition: vncclientthread.cpp:409
ClientEvent::~ClientEvent
virtual ~ClientEvent()
Definition: vncclientthread.cpp:639
VncClientThread::gotCut
void gotCut(const QString &text)
RemoteView::Medium
Definition: remoteview.h:70
ClientCutEvent
Definition: vncclientthread.h:84
VncClientThread::imageUpdated
void imageUpdated(int x, int y, int w, int h)
VncClientThread::passwordRequest
void passwordRequest(bool includingUsername=false)
VncClientThread::run
void run()
Definition: vncclientthread.cpp:451
ClientEvent
Definition: vncclientthread.h:49
INTEL_AMT_KVM_STRING
static const QString INTEL_AMT_KVM_STRING
Definition: vncclientthread.cpp:36
PointerClientEvent
Definition: vncclientthread.h:70
vncclientthread.h
VncClientThread::emitGotCut
void emitGotCut(const QString &text)
Definition: vncclientthread.cpp:440
VncClientThread::outputErrorMessage
void outputErrorMessage(const QString &message)
RemoteView::Connecting
Definition: remoteview.h:109
VncClientThread::username
const QString username() const
Definition: vncclientthread.h:128
VncClientThread::ColorDepth
ColorDepth
Definition: vncclientthread.h:103
VncClientThread::setHost
void setHost(const QString &host)
Definition: vncclientthread.cpp:375
VncClientThread::image
const QImage image(int x=0, int y=0, int w=0, int h=0)
Definition: vncclientthread.cpp:425
VncClientThread::VncClientThread
VncClientThread(QObject *parent=0)
Definition: vncclientthread.cpp:326
RemoteView::High
Definition: remoteview.h:69
VncClientThread::emitUpdated
void emitUpdated(int x, int y, int w, int h)
Definition: vncclientthread.cpp:435
instances
static QThreadStorage< VncClientThread ** > instances
Definition: vncclientthread.cpp:37
VncClientThread::clientCut
void clientCut(const QString &text)
Definition: vncclientthread.cpp:676
VncClientThread::setPort
void setPort(int port)
Definition: vncclientthread.cpp:381
VncClientThread::stop
void stop()
Definition: vncclientthread.cpp:445
VncClientThread::frameBuffer
uint8_t * frameBuffer
Definition: vncclientthread.h:134
VncClientThread
Definition: vncclientthread.h:96
VncClientThread::setImage
void setImage(const QImage &img)
Definition: vncclientthread.cpp:419
VncClientThread::~VncClientThread
~VncClientThread()
Definition: vncclientthread.cpp:349
ClientEvent::fire
virtual void fire(rfbClient *)=0
RemoteView::Disconnected
Definition: remoteview.h:114
QThread
KeyClientEvent
Definition: vncclientthread.h:57
RemoteView::Connected
Definition: remoteview.h:112
VncClientThread::bpp16
Definition: vncclientthread.h:105
KeyClientEvent::fire
void fire(rfbClient *)
Definition: vncclientthread.cpp:648
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:54:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

krdc

Skip menu "krdc"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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