예제 #1
0
void UserInputServer::onClipboardUpdate(const StringStorage *newClipboard)
{
  AutoLock al(m_forwGate);
  try {
    m_forwGate->writeUInt8(CLIPBOARD_CHANGED);
    sendNewClipboard(newClipboard, m_forwGate);
  } catch (...) {
    m_extTerminationListener->onAnObjectEvent();
  }
}
예제 #2
0
void UserInputServer::onClipboardUpdate(const StringStorage *newClipboard)
{
  AutoLock al(m_forwGate);
  try {
    // Send clipboard data
    if (newClipboard->getLength() != 0) {
      m_forwGate->writeUInt8(CLIPBOARD_CHANGED);
      sendNewClipboard(newClipboard, m_forwGate);
    }
  } catch (Exception &e) {
    m_log->error(_T("An error has been occurred while sending a")
               _T(" CLIPBOARD_CHANGED message from UserInputServer: %s"),
               e.getMessage());
    m_extTerminationListener->onAnObjectEvent();
  }
}