Added the file transfer feature to the server side.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@534 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/winvnc/VNCServerWin32.cxx b/winvnc/VNCServerWin32.cxx
index 67b3ec5..5b2adbe 100644
--- a/winvnc/VNCServerWin32.cxx
+++ b/winvnc/VNCServerWin32.cxx
@@ -27,6 +27,7 @@
#include <rfb/SSecurityFactoryStandard.h>
#include <rfb/Hostname.h>
#include <rfb/LogWriter.h>
+#include <rfb_win32/SFileTransferWin32.h>
using namespace rfb;
using namespace win32;
@@ -41,6 +42,8 @@
const UINT VNCM_REG_CHANGED = WM_USER;
const UINT VNCM_COMMAND = WM_USER + 1;
+extern const UINT VNCM_FT_DOWNLOAD;
+
static IntParameter http_port("HTTPPortNumber",
"TCP/IP port on which the server will serve the Java applet VNC Viewer ", 5800);
@@ -130,6 +133,8 @@
// Register the desktop's event to be handled
sockMgr.addEvent(desktop.getUpdateEvent(), &desktop);
+
+ vncServer.setFTManager((rfb::SFileTransferManager *)&m_FTManager);
}
VNCServerWin32::~VNCServerWin32() {
@@ -220,6 +225,8 @@
break;
if (msg.message == VNCM_COMMAND)
doCommand();
+ if (msg.message == VNCM_FT_DOWNLOAD)
+ m_FTManager.processDownloadMsg(msg);
}
TranslateMessage(&msg);
DispatchMessage(&msg);
diff --git a/winvnc/VNCServerWin32.h b/winvnc/VNCServerWin32.h
index 0af5fd5..9cc0f1e 100644
--- a/winvnc/VNCServerWin32.h
+++ b/winvnc/VNCServerWin32.h
@@ -26,6 +26,7 @@
#include <rfb_win32/SDisplay.h>
#include <rfb_win32/SocketManager.h>
#include <rfb_win32/TCharArray.h>
+#include <rfb_win32/SFileTransferManagerWin32.h>
#include <winvnc/QueryConnectDialog.h>
#include <winvnc/JavaViewer.h>
//#include <rfb/ListConnInfo.h>
@@ -97,6 +98,7 @@
rfb::win32::RegistryReader config;
rfb::win32::SocketManager sockMgr;
QueryConnectDialog* queryConnectDialog;
+ rfb::win32::SFileTransferManagerWin32 m_FTManager;
};
};