void RemoteViewerCore::sendEncodings()
{
  // If core isn't connected, then m_output may be isn't initialized.
  // Exit from function, if it is.
  if (!wasConnected()) {
    return;
  }

  RfbSetEncodingsClientMessage encodingsMessage(&m_decoderStore.getDecoderIds());
  encodingsMessage.send(m_output);
}
Example #2
0
void Guitest::init(){
    gui = new clientGUI;

    QObject::connect(gui, SIGNAL(sendConnectInfo(QString,int,QString)), this, SLOT(login(QString,int,QString)));
    QObject::connect(this, SIGNAL(connected()), gui, SLOT(wasConnected()));
    QObject::connect(gui, SIGNAL(sendMsg(QString)), this, SLOT(sendMsg(QString)));
    QObject::connect(this, SIGNAL(newMessage(QString,QString)), gui, SLOT(gotMessage(QString,QString)));
    QObject::connect(gui, SIGNAL(updateStatus(QString)), this, SLOT(status(QString)));
    QObject::connect(this, SIGNAL(listUpdate(QMap<QString,QString>&)), gui, SLOT(updateList(QMap<QString,QString>&)));
    QObject::connect(this, SIGNAL(sendError(QString)), gui, SLOT(catchError(QString)));
    QObject::connect(this, SIGNAL(sendServerDisconnect()), gui, SLOT(onServerDisconnect()));

}
void RemoteViewerCore::sendCutTextEvent(const StringStorage *cutText)
{
  // If core isn't connected, then m_output may be isn't initialized.
  // Exit from function, if it is.

  if (!wasConnected()) {
    return;
  }
  m_logWriter.detail(_T("Sending clipboard cut text: \"%s\"..."), cutText->getString());
  RfbCutTextEventClientMessage cutTextMessage(cutText);
  cutTextMessage.send(m_output);
  m_logWriter.debug(_T("Clipboard cut text: \"%s\" is sent"), cutText->getString());
}
void RemoteViewerCore::sendKeyboardEvent(bool downFlag, UINT32 key)
{
  // If core isn't connected, then m_output may be isn't initialized.
  // Exit from function, if it is.
  if (!wasConnected()) {
    return;
  }

  m_logWriter.detail(_T("Sending key event: %d, %d..."), downFlag, key);
  RfbKeyEventClientMessage keyMessage(downFlag, key);
  keyMessage.send(m_output);
  m_logWriter.debug(_T("Key event: %d, %d is sent"), downFlag, key);
}
void RemoteViewerCore::sendPointerEvent(UINT8 buttonMask,
                                        const Point *position)
{
  // If core isn't connected, then m_output may be isn't initialized.
  // Exit from function, if it is.
  if (!wasConnected()) {
    return;
  }

  m_logWriter.detail(_T("Sending pointer event 0x%X, (%d, %d)..."),
                     static_cast<int>(buttonMask), position->x, position->y);
  // send position to server
  RfbPointerEventClientMessage pointerMessage(buttonMask, position);
  pointerMessage.send(m_output);
  // update position
  m_fbUpdateNotifier.updatePointerPos(position);

  m_logWriter.debug(_T("Pointer event: 0x%X, (%d, %d) is sent"),
                    static_cast<int>(buttonMask), position->x, position->y);
}