diff --git a/CMakeLists.txt b/CMakeLists.txt index 68a49a54..bc23d25a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,10 +298,6 @@ if (GAME_DEVICE_SUPPORT) add_definitions(-DGAME_DEVICE_SUPPORT) endif() -if (VNC_SUPPORT) - add_definitions(-DVNC_SUPPORT) -endif() - add_subdirectory(src) add_subdirectory(tools) diff --git a/src/cmd/synergyc/CMakeLists.txt b/src/cmd/synergyc/CMakeLists.txt index a9b2da74..283da54b 100644 --- a/src/cmd/synergyc/CMakeLists.txt +++ b/src/cmd/synergyc/CMakeLists.txt @@ -55,10 +55,6 @@ if (UNIX) ) endif() -if (VNC_SUPPORT) - list(APPEND libs vnc_server vnc_client) -endif() - include_directories(${inc}) add_executable(synergyc ${src}) target_link_libraries(synergyc diff --git a/src/cmd/synergyd/CMakeLists.txt b/src/cmd/synergyd/CMakeLists.txt index 39eaf59d..c7c26480 100644 --- a/src/cmd/synergyd/CMakeLists.txt +++ b/src/cmd/synergyd/CMakeLists.txt @@ -44,10 +44,6 @@ else() add_executable(synergyd ${src}) endif() -if (VNC_SUPPORT) - list(APPEND libs vnc_server vnc_client) -endif() - target_link_libraries(synergyd arch base common io ipc mt net platform synergy cryptopp ${libs}) diff --git a/src/lib/synergy/CApp.cpp b/src/lib/synergy/CApp.cpp index f88673bf..6379298a 100644 --- a/src/lib/synergy/CApp.cpp +++ b/src/lib/synergy/CApp.cpp @@ -169,12 +169,6 @@ CApp::parseArg(const int& argc, const char* const* argv, int& i) argsBase().m_crypto.setMode(argv[++i]); } -#if VNC_SUPPORT - else if (isArg(i, argc, argv, NULL, "--vnc")) { - argsBase().m_enableVnc = true; - } -#endif - else { // option not supported here return false; diff --git a/src/lib/synergy/CArgsBase.cpp b/src/lib/synergy/CArgsBase.cpp index 5a099048..e8e52e48 100644 --- a/src/lib/synergy/CArgsBase.cpp +++ b/src/lib/synergy/CArgsBase.cpp @@ -38,7 +38,6 @@ m_pname(NULL), m_logFilter(NULL), m_logFile(NULL), m_display(NULL), -m_enableVnc(false), m_enableIpc(false) { } diff --git a/src/lib/synergy/CArgsBase.h b/src/lib/synergy/CArgsBase.h index ff7b7d18..9d388d4d 100644 --- a/src/lib/synergy/CArgsBase.h +++ b/src/lib/synergy/CArgsBase.h @@ -36,7 +36,6 @@ public: const char* m_display; CString m_name; bool m_disableTray; - bool m_enableVnc; bool m_enableIpc; CCryptoOptions m_crypto; #if SYSAPI_WIN32 diff --git a/src/lib/synergy/CClientApp.cpp b/src/lib/synergy/CClientApp.cpp index 00607590..ccd66043 100644 --- a/src/lib/synergy/CClientApp.cpp +++ b/src/lib/synergy/CClientApp.cpp @@ -40,9 +40,6 @@ #if SYSAPI_WIN32 #include "CArchMiscWindows.h" -#if VNC_SUPPORT -#include "vnc/win/winvnc/winvnc.h" -#endif #endif #if SYSAPI_WIN32 && GAME_DEVICE_SUPPORT @@ -66,15 +63,12 @@ CClientApp::CClientApp(CreateTaskBarReceiverFunc createTaskBarReceiver) : CApp(createTaskBarReceiver, new CArgs()), s_client(NULL), -s_clientScreen(NULL), -m_vncThread(NULL) +s_clientScreen(NULL) { } CClientApp::~CClientApp() { - if (m_vncThread) - delete m_vncThread; } CClientApp::CArgs::CArgs() : @@ -618,11 +612,6 @@ CClientApp::runInner(int argc, char** argv, ILogOutputter* outputter, StartupFun void CClientApp::startNode() { - if (args().m_enableVnc) { - m_vncThread = new CThread(new TMethodJob( - this, &CClientApp::vncThread, NULL)); - } - // start the client. if this return false then we've failed and // we shouldn't retry. LOG((CLOG_DEBUG1 "starting client")); @@ -630,11 +619,3 @@ CClientApp::startNode() m_bye(kExitFailed); } } - -void -CClientApp::vncThread(void*) -{ -#if VNC_SUPPORT - vncServerMain(0, NULL); -#endif -} diff --git a/src/lib/synergy/CClientApp.h b/src/lib/synergy/CClientApp.h index a191191a..614a38c0 100644 --- a/src/lib/synergy/CClientApp.h +++ b/src/lib/synergy/CClientApp.h @@ -85,10 +85,8 @@ public: private: virtual bool parseArg(const int& argc, const char* const* argv, int& i); - void vncThread(void*); private: CClient* s_client; CScreen* s_clientScreen; - CThread* m_vncThread; }; diff --git a/src/lib/synergy/CServerApp.cpp b/src/lib/synergy/CServerApp.cpp index 1dddca62..4cca64c6 100644 --- a/src/lib/synergy/CServerApp.cpp +++ b/src/lib/synergy/CServerApp.cpp @@ -34,7 +34,6 @@ #include "LogOutputters.h" #include "CFunctionEventJob.h" #include "TMethodJob.h" -#include "CVncClient.h" #if SYSAPI_WIN32 #include "CArchMiscWindows.h" @@ -65,8 +64,7 @@ s_serverState(kUninitialized), s_serverScreen(NULL), s_primaryClient(NULL), s_listener(NULL), -s_timer(NULL), -m_vncClient(NULL) +s_timer(NULL) { } @@ -324,13 +322,6 @@ CServerApp::handleClientConnected(const CEvent&, void* vlistener) if (client != NULL) { s_server->adoptClient(client); updateStatus(); - - if (args().m_enableVnc) { - // TODO: figure out client IP address from name. - CVncClient* vncClient = new CVncClient("192.168.0.13", client->getName()); - vncClient->start(); - m_vncClients.insert(std::pair(client->getName(), vncClient)); - } } } @@ -733,24 +724,6 @@ CServerApp::handleNoClients(const CEvent&, void*) void CServerApp::handleScreenSwitched(const CEvent& e, void*) { - if (!args().m_enableVnc) - return; - - if (m_vncClient != NULL) { - LOG((CLOG_DEBUG "hiding vnc viewer for: %s", m_vncClient->m_screen.c_str())); - m_vncClient->hideViewer(); - } - - CServer::CSwitchToScreenInfo* info = reinterpret_cast(e.getData()); - std::map::iterator it = m_vncClients.find(info->m_screen); - if (it == m_vncClients.end()) { - LOG((CLOG_DEBUG "could not find vnc client for: %s", info->m_screen)); - return; - } - - LOG((CLOG_DEBUG "showing vnc viewer for: %s", info->m_screen)); - m_vncClient = it->second; - m_vncClient->showViewer(); } int diff --git a/src/lib/synergy/CServerApp.h b/src/lib/synergy/CServerApp.h index 571c2471..30c86287 100644 --- a/src/lib/synergy/CServerApp.h +++ b/src/lib/synergy/CServerApp.h @@ -41,7 +41,6 @@ class CScreen; class CClientListener; class CEventQueueTimer; class ILogOutputter; -class CVncClient; class CServerApp : public CApp { public: @@ -126,10 +125,7 @@ public: private: virtual bool parseArg(const int& argc, const char* const* argv, int& i); - void vncThread(void*); void handleScreenSwitched(const CEvent&, void* data); - std::map m_vncClients; - CVncClient* m_vncClient; }; // configuration file name diff --git a/src/lib/synergy/CVncClient.cpp b/src/lib/synergy/CVncClient.cpp deleted file mode 100644 index 8ffa1c1f..00000000 --- a/src/lib/synergy/CVncClient.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2012 Bolton Software Ltd. - * Copyright (C) 2012 Nick Bolton - * - * This package is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * found in the file COPYING that should have accompanied this file. - * - * This package is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "CVncClient.h" -#include "CThread.h" -#include "TMethodJob.h" - -#if VNC_SUPPORT -#include "vnc/win/vncviewer/vncviewer.h" -#include "vnc/win/vncviewer/CConn.h" -#include "vnc/win/vncviewer/CConnThread.h" -#endif - -CVncClient::CVncClient(const char* hostInfo, const std::string& screen) : -m_hostInfo(hostInfo), -m_screen(screen), -m_thread(NULL), -m_connThread(NULL) -{ -} - -CVncClient::~CVncClient() -{ - if (m_thread) - delete m_thread; -} - -void -CVncClient::thread(void*) -{ -#if VNC_SUPPORT - vncClientMain(this); -#endif -} - -void -CVncClient::start() -{ - m_thread = new CThread(new TMethodJob( - this, &CVncClient::thread, NULL)); -} - -void -CVncClient::showViewer() -{ -#if VNC_SUPPORT - m_connThread->connRef->showViewer(); -#endif -} - -void -CVncClient::hideViewer() -{ -#if VNC_SUPPORT - m_connThread->connRef->hideViewer(); -#endif -} diff --git a/src/lib/synergy/CVncClient.h b/src/lib/synergy/CVncClient.h deleted file mode 100644 index b2bdfbd7..00000000 --- a/src/lib/synergy/CVncClient.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * synergy -- mouse and keyboard sharing utility - * Copyright (C) 2012 Bolton Software Ltd. - * Copyright (C) 2012 Nick Bolton - * - * This package is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * found in the file COPYING that should have accompanied this file. - * - * This package is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include - -class CThread; -namespace rfb { namespace win32 { class CConnThread; } } - -class CVncClient { -public: - CVncClient(const char* hostInfo, const std::string& screen); - virtual ~CVncClient(); - void thread(void*); - void start(); - void showViewer(); - void hideViewer(); - std::string m_screen; -public: - const char* m_hostInfo; - rfb::win32::CConnThread* m_connThread; -private: - CThread* m_thread; -};