Remove file transfer support.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3677 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/CFTMsgReader.cxx b/common/rfb/CFTMsgReader.cxx
deleted file mode 100644
index 1ecedde..0000000
--- a/common/rfb/CFTMsgReader.cxx
+++ /dev/null
@@ -1,162 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- CFTMsgReader.cxx
-
-#include <rfb/CFTMsgReader.h>
-
-using namespace rfb;
-
-CFTMsgReader::CFTMsgReader(rdr::InStream *pIS)
-{
-  m_pInStream = pIS;
-}
-
-CFTMsgReader::~CFTMsgReader()
-{
-
-}
-
-int 
-CFTMsgReader::readFileListData(FileInfo *pFileInfo)
-{
-  unsigned char flags = m_pInStream->readU8();
-  int numFiles = m_pInStream->readU16();
-  int dataSize = m_pInStream->readU16();
-  int compressedSize = m_pInStream->readU16();
-  
-  if (flags & 0x80) {
-    return -1;
-  } else {
-    if (numFiles > 0) {
-      char *pFilenames = new char[compressedSize];
-      SIZEDATAINFO *pSDI = new SIZEDATAINFO[numFiles];
-      for (int i = 0; i < numFiles; i++) {
-        pSDI[i].size = m_pInStream->readU32();
-        pSDI[i].data = m_pInStream->readU32();
-      }
-      m_pInStream->readBytes((void *)pFilenames, compressedSize);
-      createFileInfo(numFiles, pFileInfo, pSDI, pFilenames);
-      delete [] pSDI;
-      delete [] pFilenames;
-    }
-  }
-  return numFiles;
-}
-
-void * 
-CFTMsgReader::readFileDownloadData(unsigned int *pSize, unsigned int *pModTime)
-{
-  unsigned char compressLevel = m_pInStream->readU8();
-  int realSize = m_pInStream->readU16();
-  int compressedSize = m_pInStream->readU16();
-
-  if ((realSize == 0) && (compressedSize == 0)) {
-    *pSize = 0;
-    *pModTime = m_pInStream->readU32();
-    return NULL;
-  } else {
-    char *pFile = new char [compressedSize];
-    if (pFile == NULL) {
-      m_pInStream->skip(compressedSize);
-      *pModTime = 0;
-      return NULL;
-    } else {
-      m_pInStream->readBytes(pFile, compressedSize);
-      *pSize = compressedSize;
-      return pFile;
-    }
-  }
-}
-
-char * 
-CFTMsgReader::readFileUploadCancel(unsigned int *pReasonSize)
-{
-  m_pInStream->skip(1);
-  return readReasonMsg(pReasonSize);
-}
-
-char * 
-CFTMsgReader::readFileDownloadFailed(unsigned int *pReasonSize)
-{
-  m_pInStream->skip(1);
-  return readReasonMsg(pReasonSize);
-}
-
-int 
-CFTMsgReader::readFileDirSizeData(unsigned short *pDirSizeLow16, 
-                                 unsigned int *pDirSizeHigh32)
-{
-  m_pInStream->skip(1);
-  *pDirSizeLow16 = m_pInStream->readU16();
-  *pDirSizeHigh32 = m_pInStream->readU32();
-  return 1;
-}
-
-char * 
-CFTMsgReader::readFileLastRqstFailed(int *pTypeOfRequest, unsigned int *pReasonSize)
-{
-  *pTypeOfRequest = m_pInStream->readU8();
-  return readReasonMsg(pReasonSize);
-}
-
-bool 
-CFTMsgReader::createFileInfo(unsigned int numFiles, FileInfo *fi, 
-                             SIZEDATAINFO *pSDInfo, char *pFilenames)
-{
-  int pos = 0;
-  int size = 0;
-  for (unsigned int i = 0; i < numFiles; i++) {
-    size = pSDInfo[i].size;
-    if (size == FT_NET_ATTR_DIR) {
-      fi->add((pFilenames + pos), size, pSDInfo[i].data, FT_ATTR_DIR);
-    } else {
-      fi->add((pFilenames + pos), size, pSDInfo[i].data, FT_ATTR_FILE);
-    }
-    pos += strlen(pFilenames + pos) + 1;
-  }
-  return true;
-}
-
-char * 
-CFTMsgReader::readReasonMsg(unsigned int *pReasonSize)
-{
-  int reasonLen = m_pInStream->readU16();
-  int _reasonLen = reasonLen + 1;
-  char *pReason;
-  if (reasonLen == 0) {
-    *pReasonSize = 0;
-    return NULL;
-  } else {
-    pReason = new char [_reasonLen];
-    if (pReason == NULL) {
-      m_pInStream->skip(reasonLen);
-      *pReasonSize = 0;
-      return NULL;
-    }
-    m_pInStream->readBytes(pReason, reasonLen);
-    memset(((char *)pReason+reasonLen), '\0', 1);
-    return pReason;
-  }
-}
-
diff --git a/common/rfb/CFTMsgReader.h b/common/rfb/CFTMsgReader.h
deleted file mode 100644
index eab824d..0000000
--- a/common/rfb/CFTMsgReader.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- CFTMsgReader.h
-
-#ifndef __RFB_CFTMSGREADER_H__
-#define __RFB_CFTMSGREADER_H__
-
-#include <rdr/InStream.h>
-#include <rfb/FileInfo.h>
-
-namespace rfb {
-  class CFTMsgReader
-  {
-  public:
-    CFTMsgReader(rdr::InStream *pIS);
-    ~CFTMsgReader();
-    
-    int readFileListData(FileInfo *pFileInfo);
-    int readFileDirSizeData(unsigned short *pDirSizeLow16, unsigned int *pDirSizeHigh32);
-    
-    char *readFileUploadCancel(unsigned int *pReasonSize);
-    char *readFileDownloadFailed(unsigned int *pReasonSize);
-    char *readFileLastRqstFailed(int *pTypeOfRequest, unsigned int *pReasonSize);
-    void *readFileDownloadData(unsigned int *pSize, unsigned int *pModTime);
-    
-  private:
-    rdr::InStream *m_pInStream;
-    
-    bool createFileInfo(unsigned int numFiles, FileInfo *fi, 
-                        SIZEDATAINFO *pSDInfo, char *pFilenames);
-    char *readReasonMsg(unsigned int *pReasonSize);
-  };
-}
-
-#endif // __RFB_CFTMSGREADER_H__
diff --git a/common/rfb/CFTMsgWriter.cxx b/common/rfb/CFTMsgWriter.cxx
deleted file mode 100644
index 6925484..0000000
--- a/common/rfb/CFTMsgWriter.cxx
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- CFTMsgWriter.cxx
-
-#include <rfb/CFTMsgWriter.h>
-
-using namespace rfb;
-
-CFTMsgWriter::CFTMsgWriter(rdr::OutStream *pOS)
-{
-  m_pOutStream = pOS;
-}
-
-CFTMsgWriter::~CFTMsgWriter()
-{
-}
-
-bool 
-CFTMsgWriter::writeFileListRqst(unsigned short dirnameLen, char *pDirName, 
-                                bool bDirOnly)
-{
-  if (dirnameLen >= FT_FILENAME_SIZE) return false;
-
-  unsigned char flags = 0;
-  if (bDirOnly) flags = 0x10;
-
-  m_pOutStream->writeU8(msgTypeFileListRequest);
-  m_pOutStream->writeU8(flags);
-  m_pOutStream->writeU16(dirnameLen);
-  m_pOutStream->writeBytes((void *)pDirName, dirnameLen);
-  m_pOutStream->flush();
-
-  return true;
-}
-
-
-bool 
-CFTMsgWriter::writeFileDownloadCancel(unsigned short reasonLen, char *pReason)
-{
-  m_pOutStream->writeU8(msgTypeFileDownloadCancel);
-  return writeU8U16StringMsg(reasonLen, pReason);
-}
-
-bool 
-CFTMsgWriter::writeFileDownloadRqst(unsigned short filenameLen, char *pFilename, 
-                                    unsigned int position)
-{
-  if (filenameLen >= FT_FILENAME_SIZE) return false;
-
-  m_pOutStream->writeU8(msgTypeFileDownloadRequest);
-  m_pOutStream->writeU8(0);
-  m_pOutStream->writeU16(filenameLen);
-  m_pOutStream->writeU32(position);
-  m_pOutStream->writeBytes(pFilename, filenameLen);
-  m_pOutStream->flush();
-
-  return true;
-}
-
-bool 
-CFTMsgWriter::writeFileUploadData(unsigned short dataSize, char *pData)
-{
-  m_pOutStream->writeU8(msgTypeFileUploadData);
-  m_pOutStream->writeU8(0);
-  m_pOutStream->writeU16(dataSize);
-  m_pOutStream->writeU16(dataSize);
-  m_pOutStream->writeBytes(pData, dataSize);
-  m_pOutStream->flush();
-
-  return true;
-}
-
-bool 
-CFTMsgWriter::writeFileUploadData(unsigned int modTime)
-{
-  m_pOutStream->writeU8(msgTypeFileUploadData);
-  m_pOutStream->writeU8(0);
-  m_pOutStream->writeU16(0);
-  m_pOutStream->writeU16(0);
-  m_pOutStream->writeU32(modTime);
-  m_pOutStream->flush();
-
-  return true;
-}
-
-bool 
-CFTMsgWriter::writeFileUploadFailed(unsigned short reasonLen, char *pReason)
-{
-  m_pOutStream->writeU8(msgTypeFileUploadFailed);
-  return writeU8U16StringMsg(reasonLen, pReason);
-}
-
-bool 
-CFTMsgWriter::writeFileUploadRqst(unsigned short filenameLen, char *pFilename, 
-                                  unsigned int position)
-{
-  if (filenameLen >= FT_FILENAME_SIZE) return false;
-
-  m_pOutStream->writeU8(msgTypeFileUploadRequest);
-  m_pOutStream->writeU8(0);
-  m_pOutStream->writeU16(filenameLen);
-  m_pOutStream->writeU32(position);
-  m_pOutStream->writeBytes((void *)pFilename, filenameLen);
-  m_pOutStream->flush();
-
-  return true;
-}
-
-bool 
-CFTMsgWriter::writeFileCreateDirRqst(unsigned short dirNameLen, char *pDirName)
-{
-  if (dirNameLen >= FT_FILENAME_SIZE) return false;
-
-  m_pOutStream->writeU8(msgTypeFileCreateDirRequest);
-  return writeU8U16StringMsg(dirNameLen, pDirName);
-}
-
-bool 
-CFTMsgWriter::writeFileDirSizeRqst(unsigned short dirNameLen, char *pDirName)
-{
-  if (dirNameLen >= FT_FILENAME_SIZE) return false;
-
-  m_pOutStream->writeU8(msgTypeFileDirSizeRequest);
-  return writeU8U16StringMsg(dirNameLen, pDirName);
-}
-
-bool 
-CFTMsgWriter::writeFileRenameRqst(unsigned short oldNameLen, unsigned short newNameLen,
-                                  char *pOldName, char *pNewName)
-{
-  if ((oldNameLen >= FT_FILENAME_SIZE) || (newNameLen >= FT_FILENAME_SIZE)) return false;
-
-  m_pOutStream->writeU8(msgTypeFileRenameRequest);
-  m_pOutStream->writeU8(0);
-  m_pOutStream->writeU16(oldNameLen);
-  m_pOutStream->writeU16(newNameLen);
-  m_pOutStream->writeBytes(pOldName, oldNameLen);
-  m_pOutStream->writeBytes(pNewName, newNameLen);
-  m_pOutStream->flush();
-  
-  return true;
-}
-
-bool 
-CFTMsgWriter::writeFileDeleteRqst(unsigned short nameLen, char *pName)
-{
-  if (nameLen >= FT_FILENAME_SIZE) return false;
-
-  m_pOutStream->writeU8(msgTypeFileDeleteRequest);
-  return writeU8U16StringMsg(nameLen, pName);
-}
-
-bool 
-CFTMsgWriter::writeU8U16StringMsg(unsigned short strLength, char *pString)
-{
-  m_pOutStream->writeU8(0);
-  m_pOutStream->writeU16(strLength);
-  m_pOutStream->writeBytes(pString, strLength);
-  m_pOutStream->flush();
-  return true;
-}
diff --git a/common/rfb/CFTMsgWriter.h b/common/rfb/CFTMsgWriter.h
deleted file mode 100644
index 4c06693..0000000
--- a/common/rfb/CFTMsgWriter.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- CFTMsgWriter.h
-
-#ifndef __RFB_CFTMSGWRITER_H__
-#define __RFB_CFTMSGWRITER_H__
-
-#include <rdr/types.h>
-#include <rdr/OutStream.h>
-#include <rfb/msgTypes.h>
-#include <rfb/fttypes.h>
-
-namespace rfb {
-  class CFTMsgWriter
-  {
-  public:
-    CFTMsgWriter(rdr::OutStream *pOS);
-    ~CFTMsgWriter();
-    
-    bool writeFileListRqst(unsigned short dirnameLen, char *pDirName, bool bDirOnly);
-    
-    bool writeFileDownloadCancel(unsigned short reasonLen, char *pReason);
-    bool writeFileDownloadRqst(unsigned short filenameLen, char *pFilename, 
-                               unsigned int position);
-    
-    bool writeFileUploadData(unsigned short dataSize, char *pData);
-    bool writeFileUploadData(unsigned int modTime);
-    bool writeFileUploadFailed(unsigned short reasonLen, char *pReason);
-    bool writeFileUploadRqst(unsigned short filenameLen, char *pFilename, 
-                             unsigned int position);
-    
-    bool writeFileCreateDirRqst(unsigned short dirNameLen, char *pDirName);
-    bool writeFileDirSizeRqst(unsigned short dirNameLen, char *pDirName);
-    
-    bool writeFileRenameRqst(unsigned short oldNameLen, unsigned short newNameLen,
-                             char *pOldName, char *pNewName);
-    bool writeFileDeleteRqst(unsigned short nameLen, char *pName);
-    
-  private:
-    rdr::OutStream *m_pOutStream;
-    
-    bool writeU8U16StringMsg(unsigned short strLength, char *pString);
-  };
-}
-
-#endif // __RFB_CFTMSGWRITER_H__
diff --git a/common/rfb/CMsgReaderV3.cxx b/common/rfb/CMsgReaderV3.cxx
index b2ba113..2b5196f 100644
--- a/common/rfb/CMsgReaderV3.cxx
+++ b/common/rfb/CMsgReaderV3.cxx
@@ -59,14 +59,6 @@
     case msgTypeBell:                readBell(); break;
     case msgTypeServerCutText:       readServerCutText(); break;
 
-    case msgTypeFileListData:
-    case msgTypeFileDownloadData:
-    case msgTypeFileUploadCancel:
-    case msgTypeFileDownloadFailed:
-    case msgTypeFileDirSizeData:
-    case msgTypeFileLastRequestFailed:
-      handler->processFTMsg(type); break;
-
     default:
       fprintf(stderr, "unknown message type %d\n", type);
       throw Exception("unknown message type");
diff --git a/common/rfb/DirManager.h b/common/rfb/DirManager.h
deleted file mode 100644
index e0d5736..0000000
--- a/common/rfb/DirManager.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- DirManager.cxx
-
-#ifndef __RFB_DIRMANAGER_H__
-#define __RFB_DIRMANAGER_H__
-
-#include <rfb/FileInfo.h>
-
-namespace rfb {
-  class DirManager {
-  public:
-    virtual ~DirManager() {};
-    virtual bool createDir(char *pFullPath) = 0;
-    virtual bool renameIt(char *pOldName, char *pNewName) = 0;
-    virtual bool deleteIt(char *pFullPath) = 0;
-
-    virtual bool getDirInfo(char *pPath, FileInfo *pFileInfo, unsigned int dirOnly) = 0;
-  };
-}
-
-#endif // __RFB_DIRMANAGER_H__
diff --git a/common/rfb/FileInfo.cxx b/common/rfb/FileInfo.cxx
deleted file mode 100644
index f2e0291..0000000
--- a/common/rfb/FileInfo.cxx
+++ /dev/null
@@ -1,244 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-#include <rfb/FileInfo.h>
-#include <rfb/util.h>
-
-#ifdef _WIN32
-#define strcasecmp _stricmp
-#endif
-
-using namespace rfb;
-
-// FIXME: Under Unix, file names are case-sensitive.
-
-int 
-CompareFileInfo(const void *F, const void *S)
-{
-  FILEINFO *pF = (FILEINFO *) F;
-  FILEINFO *pS = (FILEINFO *) S;
-  if (pF->info.flags == pS->info.flags) {
-    return strcasecmp(pF->name, pS->name);
-  } else {
-	if (pF->info.flags == FT_ATTR_DIR) return -1;
-	if (pS->info.flags == FT_ATTR_DIR)
-      return 1;
-	else
-      return strcasecmp(pF->name, pS->name);
-  }
-  
-  return 0;
-}
-
-FileInfo::FileInfo()
-{
-  m_numEntries = 0;
-  m_pEntries = NULL;
-}
-
-FileInfo::~FileInfo()
-{
-  free();
-}
-
-void 
-FileInfo::add(FileInfo *pFI)
-{
-  m_numEntries = pFI->getNumEntries();
-  FILEINFO *pTemporary = new FILEINFO[m_numEntries];
-  memcpy(pTemporary, pFI->getNameAt(0), m_numEntries * sizeof(FILEINFO));
-  
-  m_pEntries = pTemporary;
-  pTemporary = NULL;
-}
-
-void 
-FileInfo::add(FILEINFO *pFIStruct)
-{
-  add(pFIStruct->name, pFIStruct->info.size, pFIStruct->info.data, pFIStruct->info.flags);
-}
-
-void 
-FileInfo::add(char *pName, unsigned int size, unsigned int data, unsigned int flags)
-{
-  FILEINFO *pTemporary = new FILEINFO[m_numEntries + 1];
-  if (m_numEntries != 0) 
-    memcpy(pTemporary, m_pEntries, m_numEntries * sizeof(FILEINFO));
-  strcpy(pTemporary[m_numEntries].name, pName);
-  pTemporary[m_numEntries].info.size = size;
-  pTemporary[m_numEntries].info.data = data;
-  pTemporary[m_numEntries].info.flags = flags;
-  if (m_pEntries != NULL) {
-    delete [] m_pEntries;
-    m_pEntries = NULL;
-  }
-  m_pEntries = pTemporary;
-  pTemporary = NULL;
-  m_numEntries++;
-}
-
-char *
-FileInfo::getNameAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].name;
-  }
-  return NULL;
-}
-
-bool 
-FileInfo::setNameAt(unsigned int number, char *pName)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    strcpy(m_pEntries[number].name, pName);
-    return true;
-  }
-  return false;
-}
-
-unsigned int
-FileInfo::getSizeAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].info.size;
-  }
-  return 0;
-}
-
-unsigned int
-FileInfo::getDataAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].info.data;
-  }
-  return 0;
-}
-
-unsigned int
-FileInfo::getFlagsAt(unsigned int number)
-{
-	if ((number >= 0) && (number < m_numEntries)) {
-		return m_pEntries[number].info.flags;
-	}
-	return 0;
-}
-
-FILEINFO * 
-FileInfo::getFullDataAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return &m_pEntries[number];
-  }
-  return NULL;
-}
-	
-bool 
-FileInfo::setSizeAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.size = value;
-    return true;
-  }
-  return false;
-}
-
-bool 
-FileInfo::setDataAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.data = value;
-    return true;
-  }
-  return false;
-}
-
-bool 
-FileInfo::setFlagsAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.flags = value;
-    return true;
-  }
-  return false;
-}
-
-bool 
-FileInfo::deleteAt(unsigned int number)
-{
-  if ((number >= m_numEntries) || (number < 0)) return false;
-  
-  FILEINFO *pTemporary = new FILEINFO[m_numEntries - 1];
-  
-  if (number == 0) {
-    memcpy(pTemporary, &m_pEntries[1], (m_numEntries - 1) * sizeof(FILEINFO));
-  } else {
-    memcpy(pTemporary, m_pEntries, number * sizeof(FILEINFO));
-    if (number != (m_numEntries - 1)) 
-      memcpy(&pTemporary[number], &m_pEntries[number + 1], (m_numEntries - number - 1) * sizeof(FILEINFO));
-  }
-  
-  if (m_pEntries != NULL) {
-    delete [] m_pEntries;
-    m_pEntries = NULL;
-  }
-  m_pEntries = pTemporary;
-  pTemporary = NULL;
-  m_numEntries--;
-  return true;
-}
-
-unsigned int 
-FileInfo::getNumEntries()
-{
-  return m_numEntries;
-}
-
-void 
-FileInfo::sort()
-{
-  qsort(m_pEntries, m_numEntries, sizeof(FILEINFO), CompareFileInfo);
-}
-
-void 
-FileInfo::free()
-{
-  if (m_pEntries != NULL) {
-    delete [] m_pEntries;
-    m_pEntries = NULL;
-  }
-  m_numEntries = 0;
-}
-
-unsigned int
-FileInfo::getFilenamesSize()
-{
-  if (getNumEntries() == 0) return 0;
-
-  unsigned int filenamesSize = 0;
-
-  for (unsigned int i = 0; i < getNumEntries(); i++) {
-    filenamesSize += strlen(getNameAt(i));
-  }
-
-  return filenamesSize;
-}
diff --git a/common/rfb/FileInfo.h b/common/rfb/FileInfo.h
deleted file mode 100644
index f51bd16..0000000
--- a/common/rfb/FileInfo.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileInfo.
-
-#ifndef __RFB_FILEINFO_H__
-#define __RFB_FILEINFO_H__
-
-#include <stdlib.h>
-
-#include <rfb/fttypes.h>
-
-namespace rfb {
-  class FileInfo  
-  {
-  public:
-    void add(FileInfo *pFI);
-    void add(FILEINFO *pFIStruct);
-    void add(char *pName, unsigned int size, unsigned int data, unsigned int flags);
-    
-    char *getNameAt(unsigned int number);
-    
-    bool setNameAt(unsigned int number, char *pName);
-    
-    unsigned int getSizeAt(unsigned int number);
-    unsigned int getDataAt(unsigned int number);
-    unsigned int getFlagsAt(unsigned int number);
-    
-    FILEINFO *getFullDataAt(unsigned int number);
-    
-    bool setSizeAt(unsigned int number, unsigned int value);
-    bool setDataAt(unsigned int number, unsigned int value);
-    bool setFlagsAt(unsigned int number, unsigned int value);
-    
-    bool deleteAt(unsigned int number);
-    
-    unsigned int getNumEntries();
-
-    unsigned int getFilenamesSize();
-    
-    void sort();
-    void free();
-    
-    FileInfo();
-    ~FileInfo();
-    
-  private:
-    FILEINFO *m_pEntries;
-    unsigned int m_numEntries;
-
-  };
-}
-
-#endif // __RFB_FILEINFO_H__
diff --git a/common/rfb/FileManager.cxx b/common/rfb/FileManager.cxx
deleted file mode 100644
index 89601d1..0000000
--- a/common/rfb/FileManager.cxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileManager.cxx
-
-#include <rfb/FileManager.h>
-
-using namespace rfb;
-
-FileManager::FileManager()
-{
-  m_pFile = NULL;
-}
-
-FileManager::~FileManager()
-{
-  close();
-}
-
-bool 
-FileManager::create(char *pFilename)
-{
-  if (m_pFile != NULL) return false;
-  
-  strcpy(m_szFilename, pFilename);
-
-  m_pFile = fopen(m_szFilename, m_szMode);
-
-  if (m_pFile == NULL) {
-    return false;
-  } else {
-    return true;
-  }
-}
-
-bool 
-FileManager::close()
-{
-  if (m_pFile == NULL) return false;
-  
-  int result = fclose(m_pFile);
-  
-  if (result != 0) {
-    return false;
-  } else {
-    m_pFile = NULL;
-    return true;
-  }
-}
-
-bool 
-FileManager::isCreated()
-{
-  if (m_pFile != NULL) return true; else return false;
-}
-
-char *
-FileManager::getFilename()
-{
-  return m_szFilename;
-}
diff --git a/common/rfb/FileManager.h b/common/rfb/FileManager.h
deleted file mode 100644
index f6cbc03..0000000
--- a/common/rfb/FileManager.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileManager.
-
-#ifndef __RFB_FILEMANAGER_H__
-#define __RFB_FILEMANAGER_H__
-
-#include <rfb/fttypes.h>
-
-namespace rfb {
-  class FileManager {
-  public:
-    FileManager();
-    ~FileManager();
-    
-    bool create(char *pFilename);
-    bool close();
-    
-    bool isCreated();
-
-    char *getFilename();
-
-  protected:
-    FILE *m_pFile;
-    char m_szMode[4];
-    char m_szFilename[FT_FILENAME_SIZE];
-  };
-}
-#endif // __RFB_FILEMANAGER_H__
diff --git a/common/rfb/FileReader.cxx b/common/rfb/FileReader.cxx
deleted file mode 100644
index f31f9cf..0000000
--- a/common/rfb/FileReader.cxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileReader.cxx
-
-#include <rfb/FileReader.h>
-
-using namespace rfb;
-
-FileReader::FileReader()
-{
-  strcpy(m_szMode, "rb");
-}
-
-bool 
-FileReader::read(void *pBuf, unsigned int count, unsigned int *pBytesRead)
-{
-  if (!isCreated()) return false;
-
-  *pBytesRead = fread(pBuf, 1, count, m_pFile);
-  
-  if (ferror(m_pFile)) return false;
- 
-  return true;
-}
-
-unsigned int 
-FileReader::getTime()
-{
-  return 0;
-}
diff --git a/common/rfb/FileReader.h b/common/rfb/FileReader.h
deleted file mode 100644
index e3f91c8..0000000
--- a/common/rfb/FileReader.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileReader.h
-
-#ifndef __RFB_FILEREADER_H__
-#define __RFB_FILEREADER_H__
-
-#include <rfb/FileManager.h>
-
-namespace rfb {
-  class FileReader : public FileManager {
-  public:
-    FileReader();
-
-    bool read(void *pBuf, unsigned int count, unsigned int *pBytesRead);
-
-    unsigned int getTime();
-  };
-}
-#endif // __RFB_FILEREADER_H__
diff --git a/common/rfb/FileWriter.cxx b/common/rfb/FileWriter.cxx
deleted file mode 100644
index 0649a98..0000000
--- a/common/rfb/FileWriter.cxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileWriter.cxx
-
-#include <rfb/FileWriter.h>
-
-using namespace rfb;
-
-FileWriter::FileWriter()
-{
-  strcpy(m_szMode, "wb");
-}
-
-bool 
-FileWriter::write(const void *pBuf, unsigned int count, unsigned int *pBytesWritten)
-{
-  if (!isCreated()) return false;
-
-  unsigned int bytesWritten = fwrite(pBuf, 1, count, m_pFile);
-
-  if (ferror(m_pFile)) return false;
-
-  *pBytesWritten = bytesWritten;
-  return true;
-}
-
-bool 
-FileWriter::setTime(unsigned int modTime)
-{
-  return false;
-}
diff --git a/common/rfb/FileWriter.h b/common/rfb/FileWriter.h
deleted file mode 100644
index 7a0573b..0000000
--- a/common/rfb/FileWriter.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- FileWriter.h
-
-#ifndef __RFB_FILEWRITER_H__
-#define __RFB_FILEWRITER_H__
-
-#include <rfb/FileManager.h>
-
-namespace rfb {
-  class FileWriter : public FileManager {
-  public:
-    FileWriter();
-
-    bool write(const void *pBuf, unsigned int count, unsigned int *pBytesWritten);
-    bool setTime(unsigned int modTime);
-  };
-}
-
-#endif // __RFB_FILEWRITER_H__
diff --git a/common/rfb/Makefile.am b/common/rfb/Makefile.am
index 8087d61..c194aaf 100644
--- a/common/rfb/Makefile.am
+++ b/common/rfb/Makefile.am
@@ -1,12 +1,11 @@
 noinst_LTLIBRARIES = librfb.la
 
-HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h CFTMsgReader.h \
-	CFTMsgWriter.h CMsgHandler.h CMsgReader.h CMsgReaderV3.h CMsgWriter.h \
+HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h \
+	CMsgHandler.h CMsgReader.h CMsgReaderV3.h CMsgWriter.h \
 	CMsgWriterV3.h ColourCube.h ColourMap.h ComparingUpdateTracker.h \
 	Configuration.h ConnParams.h CSecurity.h CSecurityNone.h \
-	CSecurityVncAuth.h Cursor.h Decoder.h DirManager.h d3des.h Encoder.h \
-	encodings.h Exception.h FileInfo.h FileManager.h FileReader.h \
-	FileWriter.h fttypes.h hextileConstants.h hextileDecode.h \
+	CSecurityVncAuth.h Cursor.h Decoder.h d3des.h Encoder.h \
+	encodings.h Exception.h fttypes.h hextileConstants.h hextileDecode.h \
 	HextileDecoder.h hextileEncodeBetter.h hextileEncode.h \
 	HextileEncoder.h Hostname.h HTTPServer.h ImageGetter.h InputHandler.h \
 	KeyRemapper.h keysymdef.h \
@@ -14,34 +13,31 @@
 	msgTypes.h Password.h PixelBuffer.h PixelFormat.h PixelFormat.inl Pixel.h \
 	RawDecoder.h RawEncoder.h Rect.h Region.h rreDecode.h RREDecoder.h \
 	rreEncode.h RREEncoder.h ScaledPixelBuffer.h ScaleFilters.h \
-	SConnection.h SDesktop.h secTypes.h ServerCore.h SFileTransfer.h \
-	SFileTransferManager.h SFTMsgReader.h SFTMsgWriter.h SMsgHandler.h \
+	SConnection.h SDesktop.h secTypes.h ServerCore.h SMsgHandler.h \
 	SMsgReader.h SMsgReaderV3.h SMsgWriter.h SMsgWriterV3.h \
 	SSecurityFactoryStandard.h SSecurity.h SSecurityNone.h \
 	SSecurityVncAuth.h Threading.h tightDecode.h TightDecoder.h \
-	tightEncode.h TightEncoder.h TightPalette.h Timer.h TransferQueue.h \
+	tightEncode.h TightEncoder.h TightPalette.h Timer.h \
 	TransImageGetter.h transInitTempl.h transTempl.h TrueColourMap.h \
 	UpdateTracker.h UserPasswdGetter.h util.h VNCSConnectionST.h \
 	VNCServer.h VNCServerST.h zrleDecode.h ZRLEDecoder.h zrleEncode.h \
 	ZRLEEncoder.h
 
-librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CFTMsgReader.cxx CFTMsgWriter.cxx CMsgHandler.cxx \
+librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CMsgHandler.cxx \
 	CMsgReader.cxx CMsgReaderV3.cxx CMsgWriter.cxx CMsgWriterV3.cxx \
 	CSecurityVncAuth.cxx CapsContainer.cxx CapsList.cxx \
 	ComparingUpdateTracker.cxx Configuration.cxx ConnParams.cxx \
-	Cursor.cxx Decoder.cxx d3des.c Encoder.cxx FileInfo.cxx \
-	FileManager.cxx FileReader.cxx FileWriter.cxx \
+	Cursor.cxx Decoder.cxx d3des.c Encoder.cxx \
 	HTTPServer.cxx HextileDecoder.cxx HextileEncoder.cxx \
 	KeyRemapper.cxx LogWriter.cxx Logger.cxx Logger_file.cxx \
 	Logger_stdio.cxx Password.cxx PixelBuffer.cxx PixelFormat.cxx \
 	RREEncoder.cxx RREDecoder.cxx RawDecoder.cxx RawEncoder.cxx \
-	Region.cxx SConnection.cxx SFTMsgReader.cxx SFTMsgWriter.cxx \
-	SFileTransfer.cxx SFileTransferManager.cxx SMsgHandler.cxx \
+	Region.cxx SConnection.cxx SMsgHandler.cxx \
 	SMsgReader.cxx SMsgReaderV3.cxx SMsgWriter.cxx SMsgWriterV3.cxx \
 	ServerCore.cxx SSecurityFactoryStandard.cxx SSecurityVncAuth.cxx \
 	ScaledPixelBuffer.cxx ScaleFilters.cxx Timer.cxx TightDecoder.cxx \
 	TightEncoder.cxx TightPalette.cxx TransImageGetter.cxx \
-	TransferQueue.cxx UpdateTracker.cxx VNCSConnectionST.cxx \
+	UpdateTracker.cxx VNCSConnectionST.cxx \
 	VNCServerST.cxx ZRLEEncoder.cxx ZRLEDecoder.cxx encodings.cxx \
 	secTypes.cxx util.cxx
 
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index 9c6ffe3..084fcd3 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -429,36 +429,12 @@
 
   CapsList scaps;
 
-  // File transfer:
-  /* FIXME: File transfers are not finished yet: 
-  scaps.addTightExt(msgTypeFileListData,            "FTS_LSDT");
-  scaps.addTightExt(msgTypeFileDownloadData,        "FTS_DNDT");
-  scaps.addTightExt(msgTypeFileUploadCancel,        "FTS_UPCN");
-  scaps.addTightExt(msgTypeFileDownloadFailed,      "FTS_DNFL");
-  scaps.addTightExt(msgTypeFileDirSizeData,         "FTS_DSDT");
-  scaps.addTightExt(msgTypeFileLastRequestFailed,   "FTS_RQFL");
-  */
-
   //
   // Advertise support for non-standard client-to-server messages
   //
 
   CapsList ccaps;
 
-  // File transfer:
-  /* FIXME: File transfers are not finished yet: 
-  ccaps.addTightExt(msgTypeFileListRequest,         "FTC_LSRQ");
-  ccaps.addTightExt(msgTypeFileDownloadRequest,     "FTC_DNRQ");
-  ccaps.addTightExt(msgTypeFileUploadRequest,       "FTC_UPRQ");
-  ccaps.addTightExt(msgTypeFileUploadRequest,       "FTC_UPDT");
-  ccaps.addTightExt(msgTypeFileDownloadCancel,      "FTC_DNCN");
-  ccaps.addTightExt(msgTypeFileUploadFailed,        "FTC_UPFL");
-  ccaps.addTightExt(msgTypeFileCreateDirRequest,    "FTC_FCDR");
-  ccaps.addTightExt(msgTypeFileDirSizeRequest,      "FTC_DSRQ");
-  ccaps.addTightExt(msgTypeFileRenameRequest,       "FTC_RNRQ");
-  ccaps.addTightExt(msgTypeFileDeleteRequest,       "FTC_RMRQ");
-  */
-
   //
   // Advertise all supported encoding types (except raw encoding).
   //
diff --git a/common/rfb/SFTMsgReader.cxx b/common/rfb/SFTMsgReader.cxx
deleted file mode 100644
index cd79215..0000000
--- a/common/rfb/SFTMsgReader.cxx
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFTMsgReader.cxx
-
-#include <rfb/SFTMsgReader.h>
-
-using namespace rfb;
-
-SFTMsgReader::SFTMsgReader(rdr::InStream *pIS)
-{
-  m_pIS = pIS;
-}
-
-SFTMsgReader::~SFTMsgReader()
-{
-}
-    
-bool 
-SFTMsgReader::readFileListRqst(unsigned int *pDirNameSize, char *pDirName, 
-                               unsigned int *pFlags)
-{
-  *pFlags = m_pIS->readU8();
-  unsigned int dirNameSize = m_pIS->readU16();
-
-  if (dirNameSize >= FT_FILENAME_SIZE) {
-    m_pIS->skip(dirNameSize);
-    return false;
-  } else {
-    m_pIS->readBytes(pDirName, dirNameSize);
-    *pDirNameSize = dirNameSize;
-    pDirName[dirNameSize] = '\0';
-    return true;
-  }
-}
-    
-bool 
-SFTMsgReader::readFileDownloadRqst(unsigned int *pFilenameSize, char *pFilename, 
-                                   unsigned int *pPosition)
-{
-  unsigned char compressedLevel = 0;
-  return readU8U16U32StringMsg(&compressedLevel, pFilenameSize, pPosition, pFilename);
-}
-
-bool 
-SFTMsgReader::readFileUploadRqst(unsigned int *pFilenameSize, char *pFilename, 
-                                 unsigned int *pPosition)
-{
-  unsigned char compressedLevel = 0;
-  return readU8U16U32StringMsg(&compressedLevel, pFilenameSize, pPosition, pFilename);
-}
-    
-char *
-SFTMsgReader::readFileUploadData(unsigned int *pDataSize, unsigned int *pModTime)
-{
-  /*
-   * Compressed level is not used now so we have to skip one byte
-   *
-   * unsigned char compressedLevel = m_pIS->readU8();
-   */
-  (void) m_pIS->readU8();
-  unsigned int realSize = m_pIS->readU16();
-  unsigned int compressedSize = m_pIS->readU16();
-
-  if ((realSize == 0) && (compressedSize == 0)) {
-    *pDataSize = 0;
-    *pModTime = m_pIS->readU32();
-    return NULL;
-  } else {
-    char *pData = new char [compressedSize];
-    m_pIS->readBytes(pData, compressedSize);
-    *pDataSize = compressedSize;
-    *pModTime = 0;
-    return pData;
-  }
-}
-    
-bool 
-SFTMsgReader::readFileCreateDirRqst(unsigned int *pDirNameSize, char *pDirName)
-{
-  return readU8U16StringMsg(pDirNameSize, pDirName);
-}
-
-bool 
-SFTMsgReader::readFileDirSizeRqst(unsigned int *pDirNameSize, char *pDirName)
-{
-  return readU8U16StringMsg(pDirNameSize, pDirName);
-}
-
-bool 
-SFTMsgReader::readFileDeleteRqst(unsigned int *pNameSize, char *pName)
-{
-  return readU8U16StringMsg(pNameSize, pName);
-}
-    
-bool 
-SFTMsgReader::readFileRenameRqst(unsigned int *pOldNameSize, 
-                                 unsigned int *pNewNameSize,
-                                 char *pOldName, char *pNewName)
-{
-  m_pIS->skip(1);
-
-  unsigned int oldNameSize = m_pIS->readU16();
-  unsigned int newNameSize = m_pIS->readU16();
-
-  if ((oldNameSize >= *pOldNameSize) || (newNameSize >= *pNewNameSize)) {
-    m_pIS->skip(oldNameSize);
-    m_pIS->skip(newNameSize);
-    return false;
-  }
-
-  if (oldNameSize != 0) {
-    m_pIS->readBytes(pOldName, oldNameSize);
-    pOldName[oldNameSize] = '\0';
-    *pOldNameSize = oldNameSize;
-  } else {
-    *pOldNameSize = 0;
-    pOldName[0] = '\0';
-  }
-
-  if (newNameSize != 0) {
-    m_pIS->readBytes(pNewName, newNameSize);
-    pNewName[newNameSize] = '\0';
-  } else {
-    *pNewNameSize = 0;
-    pNewName[0] = '\0';
-  }
-
-  return true;
-}
-
-bool
-SFTMsgReader::readFileDownloadCancel(unsigned int *pReasonSize, char *pReason)
-{
-  return readU8U16StringMsg(pReasonSize, pReason);
-}
-
-bool
-SFTMsgReader::readFileUploadFailed(unsigned int *pReasonSize, char *pReason)
-{
-  return readU8U16StringMsg(pReasonSize, pReason);
-}
-
-bool 
-SFTMsgReader::readU8U16StringMsg(unsigned int *pReasonSize, char *pReason)
-{
-  m_pIS->skip(1);
-  unsigned int reasonSize = m_pIS->readU16();
-
-  if (reasonSize >= FT_FILENAME_SIZE) {
-    m_pIS->skip(reasonSize);
-    return false;
-  } else {
-    if (reasonSize == 0) {
-      pReason[0] = '\0';
-    } else {
-      m_pIS->readBytes(pReason, reasonSize);
-      pReason[reasonSize] = '\0';
-    }
-      *pReasonSize = reasonSize;
-    return true;
-  }
-}
-
-bool 
-SFTMsgReader::readU8U16U32StringMsg(unsigned char *pU8, unsigned int *pU16, 
-                                    unsigned int *pU32, char *pString)
-{
-  *pU8 = m_pIS->readU8();
-  unsigned int strSize = m_pIS->readU16();
-  *pU32 = m_pIS->readU32();
-
-  if (strSize >= FT_FILENAME_SIZE) {
-    m_pIS->skip(strSize);
-    return false;
-  } else {
-    *pU16 = strSize;
-    if (strSize == 0) {
-      pString[0] = '\0';
-    } else {
-      m_pIS->readBytes(pString, strSize);
-      pString[strSize] = '\0';
-    }
-    return true;
-  }
-}
diff --git a/common/rfb/SFTMsgReader.h b/common/rfb/SFTMsgReader.h
deleted file mode 100644
index 173253b..0000000
--- a/common/rfb/SFTMsgReader.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFTMsgReader.h
-
-#ifndef __RFB_SFTMSGREADER_H__
-#define __RFB_SFTMSGREADER_H__
-
-#include <rdr/InStream.h>
-#include <rfb/fttypes.h>
-
-namespace rfb {
-  class SFTMsgReader
-  {
-  public:
-    SFTMsgReader(rdr::InStream *pIS);
-    ~SFTMsgReader();
-    
-    bool readFileListRqst(unsigned int *pDirNameSize, char *pDirName, 
-                          unsigned int *pFlags);
-    
-    
-    bool readFileDownloadRqst(unsigned int *pFilenameSize, char *pFilename, 
-                              unsigned int *pPosition);
-
-    bool readFileUploadRqst(unsigned int *pFilenameSize, char *pFilename, 
-                            unsigned int *pPosition);
-    
-    char *readFileUploadData(unsigned int *pDataSize, unsigned int *pModTime);
-
-    
-    bool readFileCreateDirRqst(unsigned int *pDirNameSize, char *pDirName);
-    bool readFileDirSizeRqst(unsigned int *pDirNameSize, char *pDirName);
-    bool readFileDeleteRqst(unsigned int *pNameSize, char *pName);
-    
-    bool readFileRenameRqst(unsigned int *pOldNameSize, unsigned int *pNewNameSize,
-                            char *pOldName, char *pNewName);
-
-    bool readFileDownloadCancel(unsigned int *pReasonSize, char *pReason);
-    bool readFileUploadFailed(unsigned int *pReasonSize, char *pReason);
-
-  private:
-    rdr::InStream *m_pIS;
-
-    bool readU8U16StringMsg(unsigned int *pReasonSize, char *pReason);
-    bool readU8U16U32StringMsg(unsigned char *pU8, unsigned int *pU16, 
-                               unsigned int *pU32, char *pString);
-  };
-}
-
-#endif // __RFB_SFTMSGREADER_H__
diff --git a/common/rfb/SFTMsgWriter.cxx b/common/rfb/SFTMsgWriter.cxx
deleted file mode 100644
index 3a44b99..0000000
--- a/common/rfb/SFTMsgWriter.cxx
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFTMsgWriter.cxx
-
-#include <rfb/SFTMsgWriter.h>
-
-using namespace rfb;
-
-SFTMsgWriter::SFTMsgWriter(rdr::OutStream *pOS)
-{
-  m_pOS = pOS;
-}
-
-SFTMsgWriter::~SFTMsgWriter()
-{
-}
-    
-bool 
-SFTMsgWriter::writeFileListData(unsigned char flags, rfb::FileInfo *pFileInfo)
-{
-  unsigned int numFiles = pFileInfo->getNumEntries();
-
-  m_pOS->writeU8(msgTypeFileListData);
-  m_pOS->writeU8(flags);
-  m_pOS->writeU16(numFiles);
-  
-  if (numFiles == 0) {
-    m_pOS->writeU16(0);
-    m_pOS->writeU16(0);
-  } else {
-    unsigned int filenamesSize = pFileInfo->getFilenamesSize() + numFiles;
-
-    m_pOS->writeU16(filenamesSize);
-    m_pOS->writeU16(filenamesSize);
-
-    char *pFilenames = new char [filenamesSize];
-    unsigned int pos = 0;
-
-    for (unsigned int i = 0; i < numFiles; i++) {
-      char *pName = pFileInfo->getNameAt(i);
-      unsigned int len = strlen(pName);
-
-      memcpy((void *)&pFilenames[pos], pName, len + 1);
-      pos += (len + 1);
-
-      if (pFileInfo->getFlagsAt(i) & FT_ATTR_DIR) {
-        m_pOS->writeU32(FT_NET_ATTR_DIR);
-      } else {
-        m_pOS->writeU32(pFileInfo->getSizeAt(i));
-      }
-      m_pOS->writeU32(pFileInfo->getDataAt(i));
-    }
-
-    m_pOS->writeBytes(pFilenames, filenamesSize);
-
-    delete [] pFilenames;
-  }
-
-  m_pOS->flush();
-
-  return true;
-}
-
-bool 
-SFTMsgWriter::writeFileDownloadData(unsigned int dataSize, void *pData)
-{
-  m_pOS->writeU8(msgTypeFileDownloadData);
-  m_pOS->writeU8(0);
-  m_pOS->writeU16(dataSize);
-  m_pOS->writeU16(dataSize);
-  m_pOS->writeBytes(pData, dataSize);
-  m_pOS->flush();
-  return true;
-}
-
-bool 
-SFTMsgWriter::writeFileDownloadData(unsigned int modTime)
-{
-  m_pOS->writeU8(msgTypeFileDownloadData);
-  m_pOS->writeU8(0);
-  m_pOS->writeU16(0);
-  m_pOS->writeU16(0);
-  m_pOS->writeU32(modTime);
-  m_pOS->flush();
-  return true;
-}
-
-bool
-SFTMsgWriter::writeFileUploadCancel(unsigned int reasonLen, char *pReason)
-{
-  m_pOS->writeU8(msgTypeFileUploadCancel);
-  return writeU8U16StringMsg(0, reasonLen, pReason);
-}
-
-bool 
-SFTMsgWriter::writeFileDownloadFailed(unsigned int reasonLen, char *pReason)
-{
-  m_pOS->writeU8(msgTypeFileDownloadFailed);
-  return writeU8U16StringMsg(0, reasonLen, pReason);
-}
-
-bool 
-SFTMsgWriter::writeFileDirSizeData(unsigned int dirSizeLow, 
-                                   unsigned short dirSizeHigh)
-{
-  m_pOS->writeU8(msgTypeFileDirSizeData);
-  m_pOS->writeU8(0);
-  m_pOS->writeU16(dirSizeHigh);
-  m_pOS->writeU32(dirSizeLow);
-  m_pOS->flush();
-  return true;
-}
-
-bool 
-SFTMsgWriter::writeFileLastRqstFailed(unsigned char lastRequest, 
-                                      unsigned short reasonLen,
-                                      char *pReason)
-{
-  m_pOS->writeU8(msgTypeFileLastRequestFailed);
-  return writeU8U16StringMsg(lastRequest, reasonLen, pReason);
-}
-
-bool
-SFTMsgWriter::writeU8U16StringMsg(unsigned char p1, unsigned short p2, char *pP3)
-{
-  m_pOS->writeU8(p1);
-  m_pOS->writeU16(p2);
-  m_pOS->writeBytes(pP3, p2);
-  m_pOS->flush();
-  return true;
-}
diff --git a/common/rfb/SFTMsgWriter.h b/common/rfb/SFTMsgWriter.h
deleted file mode 100644
index 39cbbde..0000000
--- a/common/rfb/SFTMsgWriter.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFTMsgWriter.h
-
-#ifndef __RFB_SFTMSGWRITER_H__
-#define __RFB_SFTMSGWRITER_H__
-
-#include <rdr/OutStream.h>
-#include <rfb/FileInfo.h>
-#include <rfb/msgTypes.h>
-
-namespace rfb {
-  class SFTMsgWriter
-  {
-  public:
-    SFTMsgWriter(rdr::OutStream *pOS);
-    ~SFTMsgWriter();
-    
-    bool writeFileListData(unsigned char flags, rfb::FileInfo *pFileInfo);
-    bool writeFileDownloadData(unsigned int dataSize, void *pData);
-    bool writeFileDownloadData(unsigned int modTime);
-    bool writeFileUploadCancel(unsigned int reasonLen, char *pReason);
-    bool writeFileDownloadFailed(unsigned int reasonLen, char *pReason);
-    bool writeFileDirSizeData(unsigned int dirSizeLow, unsigned short dirSizeHigh);
-    bool writeFileLastRqstFailed(unsigned char lastRequest, unsigned short reasonLen, 
-                                 char *pReason);
-
-  private:
-    rdr::OutStream *m_pOS;
-
-    bool writeU8U16StringMsg(unsigned char p1, unsigned short p2, char *pP3);
-  };
-}
-
-#endif // __RFB_SFTMSGWRITER_H__
diff --git a/common/rfb/SFileTransfer.cxx b/common/rfb/SFileTransfer.cxx
deleted file mode 100644
index a5b4372..0000000
--- a/common/rfb/SFileTransfer.cxx
+++ /dev/null
@@ -1,335 +0,0 @@
-/* Copyright (C) 2006 TightVNC Team.  All Rights Reserved.
- *    
- * Developed by Dennis Syrovatsky
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFileTransfer.cxx
-
-#include <rfb/msgTypes.h>
-#include <rfb/SFileTransfer.h>
-
-using namespace rfb;
-
-SFileTransfer::SFileTransfer(network::Socket *sock) : 
-  m_bUploadStarted(false), m_bDownloadStarted(false),
-  m_reader(&sock->inStream()), m_writer(&sock->outStream()), m_pSocket(sock)
-{
-}
-
-SFileTransfer::~SFileTransfer()
-{
-}
-
-bool
-SFileTransfer::processMessages(int type)
-{
-  switch(type)
-  {
-    case msgTypeFileListRequest:
-      return processFileListRequest();
-    case msgTypeFileDownloadRequest:
-      return processFileDownloadRequest();
-    case msgTypeFileUploadRequest:
-      return processFileUploadRequest();
-    case msgTypeFileUploadData:
-      return processFileUploadData();
-    case msgTypeFileDownloadCancel:
-      return processFileDownloadCancel();
-    case msgTypeFileUploadFailed:
-      return processFileUploadFailed();
-    case msgTypeFileCreateDirRequest:
-      return processFileCreateDirRequest();
-    case msgTypeFileDirSizeRequest:
-      return processFileDirSizeRequest();
-    case msgTypeFileRenameRequest:
-      return processFileRenameRequest();
-    case msgTypeFileDeleteRequest:
-      return processFileDeleteRequest();
-    default:
-      return false;
-  }
-}
-
-bool 
-SFileTransfer::processFileListRequest()
-{
-  char szDirName[FT_FILENAME_SIZE] = {0};
-  unsigned int dirNameSize = FT_FILENAME_SIZE;
-  unsigned int flags = 0;
-
-  if (!m_reader.readFileListRqst(&dirNameSize, szDirName, &flags)) return false;
-
-  if (!convertPathFromNet(szDirName)) return false;
-
-  bool bDirOnly = false;
-  if (flags & 0x10) bDirOnly = true;
-
-  FileInfo fi;
-  if (!makeFileList(szDirName, &fi, bDirOnly)) {
-    flags = (flags | 0x80);  
-  }
-  return m_writer.writeFileListData((unsigned char)flags, &fi);
-}
-
-bool 
-SFileTransfer::processFileDownloadRequest()
-{
-  char szName[FT_FILENAME_SIZE] = {0};
-  unsigned int nameSize = FT_FILENAME_SIZE;
-  unsigned int position = 0;
-
-  if (!m_reader.readFileDownloadRqst(&nameSize, szName, &position)) return false;
-
-  if (!convertPathFromNet(szName)) return false;
-
-  if (m_bDownloadStarted) {
-    char reason[] = "The download is already started";
-    m_writer.writeFileLastRqstFailed(msgTypeFileDownloadRequest, strlen(reason), reason);
-    return false;
-  }
-
-  if (!m_fileReader.create(szName)) return false;
-
-  m_bDownloadStarted = true;
-
-  sendFileDownloadPortion();
-
-  return true;
-}
-
-bool
-SFileTransfer::sendFileDownloadPortion()
-{
-  char buffer[FT_MAX_SENDING_SIZE];
-  unsigned int bytesRead = 0;
-
-  if (m_fileReader.read((void *)buffer, FT_MAX_SENDING_SIZE, &bytesRead)) {
-    if (bytesRead == 0) {
-      m_writer.writeFileDownloadData(m_fileReader.getTime());
-      m_fileReader.close();
-      m_bDownloadStarted = false;
-      return true;
-    } else {
-      m_writer.writeFileDownloadData(bytesRead, buffer);
-      return initDownloadCallback();
-    }
-  } else {
-    char reason[] = "Error while reading from file";
-    m_writer.writeFileDownloadFailed(strlen(reason), reason);
-    m_fileReader.close();
-    m_bDownloadStarted = false;
-    return true;
-  }
-}
-
-bool 
-SFileTransfer::processFileUploadRequest()
-{
-  char szName[FT_FILENAME_SIZE] = {0};
-  unsigned int nameSize = FT_FILENAME_SIZE;
-  unsigned int position = 0;
-
-  if (!m_reader.readFileUploadRqst(&nameSize, szName, &position)) return false;
-
-  if (!convertPathFromNet(szName)) return false;
-
-  if (m_bUploadStarted) {
-    char reason[] = "The upload is already started";
-    m_writer.writeFileLastRqstFailed(msgTypeFileUploadRequest, strlen(reason), reason);
-    return false;
-  }
-
-  if (!m_fileWriter.create(szName)) {
-    char reason[] = "Can't create local file";
-    m_writer.writeFileLastRqstFailed(msgTypeFileUploadRequest, strlen(reason), reason);
-    return true;
-  }
-
-  m_bUploadStarted = true;
-
-  return true;
-}
-
-bool 
-SFileTransfer::processFileUploadData()
-{
-  unsigned int dataSize = 0;
-  unsigned int modTime = 0;
-
-  char *pUploadData = m_reader.readFileUploadData(&dataSize, &modTime);
-
-  if (!m_bUploadStarted) {
-      char reason[] = "Upload is impossible";
-      m_writer.writeFileUploadCancel(strlen(reason), reason);
-  } else {
-    if (pUploadData == NULL) {
-      if (modTime == 0) {
-        char reason[] = "Upload failed";
-        m_writer.writeFileUploadCancel(strlen(reason), reason);
-      } else {
-        m_fileWriter.setTime(modTime);
-      }
-      m_fileWriter.close();
-      m_bUploadStarted = false;
-    } else {
-      unsigned int dataWritten = 0;
-      m_fileWriter.write(pUploadData, dataSize, &dataWritten);
-      if (dataWritten != dataSize) {
-        char reason[] = "Upload failed";
-        m_writer.writeFileUploadCancel(strlen(reason), reason);
-        m_fileWriter.close();
-        m_bUploadStarted = false;
-      }
-    }
-  }
-  delete [] pUploadData;
-  return true;
-}
-
-bool 
-SFileTransfer::processFileDownloadCancel()
-{
-  char szReason[FT_FILENAME_SIZE] = {0};
-  unsigned int reasonSize = FT_FILENAME_SIZE;
-
-  if (!m_reader.readFileDownloadCancel(&reasonSize, szReason)) return false;
-
-  m_fileReader.close();
-  m_bDownloadStarted = false;
-  return true;
-}
-
-bool 
-SFileTransfer::processFileUploadFailed()
-{
-  char szReason[FT_FILENAME_SIZE] = {0};
-  unsigned int reasonSize = FT_FILENAME_SIZE;
-
-  if (!m_reader.readFileUploadFailed(&reasonSize, szReason)) return false;
-
-  deleteIt(m_fileWriter.getFilename());
-  m_fileWriter.close();
-  m_bUploadStarted = false;
-  return true;
-}
-
-bool 
-SFileTransfer::processFileCreateDirRequest()
-{
-  char szName[FT_FILENAME_SIZE] = {0};
-  unsigned int nameSize = FT_FILENAME_SIZE;
-
-  if (!m_reader.readFileCreateDirRqst(&nameSize, szName)) return false;
-
-  if (!convertPathFromNet(szName)) return false;
-
-  return createDir(szName);
-}
-
-bool 
-SFileTransfer::processFileDirSizeRequest()
-{
-  char szName[FT_FILENAME_SIZE] = {0};
-  unsigned int nameSize = FT_FILENAME_SIZE;
-
-  if (!m_reader.readFileDirSizeRqst(&nameSize, szName)) return false;
-
-  if (!convertPathFromNet(szName)) return false;
-
-  unsigned short highSize16 = 0;
-  unsigned int lowSize32 = 0;
-
-  if (!getDirSize(szName, &highSize16, &lowSize32)) return false;
-
-  return m_writer.writeFileDirSizeData(lowSize32, highSize16);
-}
-
-bool 
-SFileTransfer::processFileRenameRequest()
-{
-  char szOldName[FT_FILENAME_SIZE] = {0};
-  char szNewName[FT_FILENAME_SIZE] = {0};
-
-  unsigned int oldNameSize = FT_FILENAME_SIZE;
-  unsigned int newNameSize = FT_FILENAME_SIZE;
-
-  if (!m_reader.readFileRenameRqst(&oldNameSize, &newNameSize, szOldName, szNewName)) return false;
-
-  if ((!convertPathFromNet(szOldName)) || (!convertPathFromNet(szNewName))) return false;
-
-  return renameIt(szOldName, szNewName);
-}
-
-bool 
-SFileTransfer::processFileDeleteRequest()
-{
-  char szName[FT_FILENAME_SIZE] = {0};
-  unsigned int nameSize = FT_FILENAME_SIZE;
-
-  if (!m_reader.readFileDeleteRqst(&nameSize, szName)) return false;
-
-  if (!convertPathFromNet(szName)) return false;
-
-  return deleteIt(szName);
-}
-
-bool 
-SFileTransfer::convertPathFromNet(char *pszPath)
-{
-  return true;
-}
-
-bool 
-SFileTransfer::makeFileList(char *pszPath, FileInfo *pFI, bool bDirOnly)
-{
-  return false;
-}
-
-bool 
-SFileTransfer::deleteIt(char *pszPath)
-{
-  return false;
-}
-
-bool 
-SFileTransfer::renameIt(char *pszOldPath, char *pszNewPath)
-{
-  return false;
-}
-
-bool 
-SFileTransfer::createDir(char *pszPath)
-{
-  return false;
-}
-
-bool 
-SFileTransfer::getDirSize(char *pszName, unsigned short *pHighSize16, 
-                          unsigned int *pLowSize32)
-{
-  return false;
-}
-
-bool
-SFileTransfer::initDownloadCallback()
-{
-  return false;
-}
diff --git a/common/rfb/SFileTransfer.h b/common/rfb/SFileTransfer.h
deleted file mode 100644
index ecf6493..0000000
--- a/common/rfb/SFileTransfer.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright (C) 2006 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFileTransfer.h
-
-#ifndef __RFB_SFILETRANSFER_H__
-#define __RFB_SFILETRANSFER_H__
-
-#include <network/Socket.h>
-#include <rfb/SFTMsgReader.h>
-#include <rfb/SFTMsgWriter.h>
-#include <rfb/FileWriter.h>
-#include <rfb/FileReader.h>
-#include <rfb/FileInfo.h>
-#include <rfb/fttypes.h>
-
-namespace rfb {
-  class SFileTransfer
-  {
-  public:
-    SFileTransfer(network::Socket *sock);
-    virtual ~SFileTransfer();
-
-    bool processMessages(int type);
-    bool sendFileDownloadPortion();
-
-  protected:
-    bool processFileListRequest();
-    bool processFileDownloadRequest();
-    bool processFileUploadRequest();
-    bool processFileUploadData();
-    bool processFileDownloadCancel();
-    bool processFileUploadFailed();
-    bool processFileCreateDirRequest();
-    bool processFileDirSizeRequest();
-    bool processFileRenameRequest();
-    bool processFileDeleteRequest();
-
-    virtual bool initDownloadCallback();
-    virtual bool makeFileList(char *pszPath, FileInfo *pFI, bool bDirOnly);
-    virtual bool convertPathFromNet(char *pszPath);
-
-    virtual bool deleteIt(char *pszPath);
-    virtual bool renameIt(char *pszOldPath, char *pszNewPath);
-    virtual bool createDir(char *pszPath);
-
-    virtual bool getDirSize(char *pszName, unsigned short *pHighSize16, unsigned int *pLowSize32);
-
-    bool m_bUploadStarted;
-    bool m_bDownloadStarted;
-    
-  private:
-    SFTMsgReader m_reader;
-    SFTMsgWriter m_writer;
-
-    FileWriter m_fileWriter;
-    FileReader m_fileReader;
-
-    network::Socket *m_pSocket;
-  };
-}
-
-#endif // __RFB_SFILETRANSFER_H__
diff --git a/common/rfb/SFileTransferManager.cxx b/common/rfb/SFileTransferManager.cxx
deleted file mode 100644
index fda9812..0000000
--- a/common/rfb/SFileTransferManager.cxx
+++ /dev/null
@@ -1,55 +0,0 @@
-/* Copyright (C) 2006 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFileTransferManager.cxx
-
-#include <rfb/SFileTransferManager.h>
-
-using namespace rfb;
-
-SFileTransferManager::SFileTransferManager()
-{
-
-}
-
-SFileTransferManager::~SFileTransferManager()
-{
-  destroy();
-}
-
-void
-SFileTransferManager::destroyObject(SFileTransfer *pFT)
-{
-  if (pFT == NULL) return;
-
-  m_lstFTObjects.remove(pFT);
-
-  delete pFT;
-}
-
-void
-SFileTransferManager::destroy()
-{
-  while(!m_lstFTObjects.empty())
-    delete m_lstFTObjects.front();
-}
diff --git a/common/rfb/SFileTransferManager.h b/common/rfb/SFileTransferManager.h
deleted file mode 100644
index 1ee8c17..0000000
--- a/common/rfb/SFileTransferManager.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright (C) 2006 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- SFileTransferManager.h
-
-#ifndef __RFB_SFILETRANSFERMANAGER_H__
-#define __RFB_SFILETRANSFERMANAGER_H__
-
-#include <list>
-
-#include <rfb/SFileTransfer.h>
-#include <network/Socket.h>
-
-namespace rfb {
-  class SFileTransferManager
-  {
-  public:
-    SFileTransferManager();
-    virtual ~SFileTransferManager();
-
-    virtual SFileTransfer *createObject(network::Socket *sock) = 0;
-    void destroyObject(SFileTransfer *pFT);
-
-  protected:
-    std::list<SFileTransfer*> m_lstFTObjects;
-
-    void destroy();
-  };
-}
-
-#endif // __RFB_SFILETRANSFERMANAGER_H__
diff --git a/common/rfb/SMsgHandler.h b/common/rfb/SMsgHandler.h
index cf3377d..50a2dc4 100644
--- a/common/rfb/SMsgHandler.h
+++ b/common/rfb/SMsgHandler.h
@@ -56,8 +56,6 @@
     // specially for this purpose.
     virtual void supportsLocalCursor();
 
-    virtual bool processFTMsg(int type) = 0;
-
     ConnParams cp;
   };
 }
diff --git a/common/rfb/SMsgReaderV3.cxx b/common/rfb/SMsgReaderV3.cxx
index 165b23e..8e870cd 100644
--- a/common/rfb/SMsgReaderV3.cxx
+++ b/common/rfb/SMsgReaderV3.cxx
@@ -52,17 +52,6 @@
   case msgTypePointerEvent:             readPointerEvent(); break;
   case msgTypeClientCutText:            readClientCutText(); break;
 
-  case msgTypeFileListRequest:
-  case msgTypeFileDownloadRequest:
-  case msgTypeFileUploadRequest:
-  case msgTypeFileUploadData:
-  case msgTypeFileDownloadCancel:
-  case msgTypeFileUploadFailed:
-  case msgTypeFileCreateDirRequest:
-  case msgTypeFileDirSizeRequest:
-  case msgTypeFileRenameRequest:
-  case msgTypeFileDeleteRequest:        handler->processFTMsg(msgType); break;
-
   default:
     fprintf(stderr, "unknown message type %d\n", msgType);
     throw Exception("unknown message type");
diff --git a/common/rfb/TransferQueue.cxx b/common/rfb/TransferQueue.cxx
deleted file mode 100644
index 2b58362..0000000
--- a/common/rfb/TransferQueue.cxx
+++ /dev/null
@@ -1,311 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- TransferQueue.
-
-#include <rfb/TransferQueue.h>
-
-using namespace rfb;
-
-TransferQueue::TransferQueue()
-{
-	 m_numEntries = 0;
-     m_pEntries = NULL;
-}
-
-TransferQueue::~TransferQueue()
-{
-  free();
-}
-
-void
-TransferQueue::add(TransferQueue *pTQ)
-{
-  for (unsigned int i = 0; i < pTQ->getNumEntries(); i++) {
-    add(pTQ->getLocPathAt(i), pTQ->getRemPathAt(i),	pTQ->getLocNameAt(i), 
-      pTQ->getRemNameAt(i), pTQ->getSizeAt(i), pTQ->getDataAt(i), pTQ->getFlagsAt(i));
-  }
-}
-
-void
-TransferQueue::add(char *pLocPath, char *pRemPath, FileInfo *pFI, unsigned int flags)
-{
-  char locPath[FT_FILENAME_SIZE];
-  char remPath[FT_FILENAME_SIZE];
-  strcpy(locPath, pLocPath);
-  strcpy(remPath, pRemPath);
-  
-  for (unsigned int i = 0; i < pFI->getNumEntries(); i++) {
-    add(locPath, remPath, pFI->getNameAt(i), pFI->getNameAt(i), 
-      pFI->getSizeAt(i), pFI->getDataAt(i), (pFI->getFlagsAt(i) | flags));
-  }
-}
-
-void 
-TransferQueue::add(char *pLocPath, char *pRemPath, char *pLocName, char *pRemName, 
-                   unsigned int size, unsigned int data, unsigned int flags)
-{
-  FILEINFOEX *pTemporary = new FILEINFOEX[m_numEntries + 1];
-  if (m_numEntries != 0) 
-    memcpy(pTemporary, m_pEntries, m_numEntries * sizeof(FILEINFOEX));
-  
-  strcpy(pTemporary[m_numEntries].locPath, pLocPath);
-  strcpy(pTemporary[m_numEntries].locName, pLocName);
-  strcpy(pTemporary[m_numEntries].remPath, pRemPath);
-  strcpy(pTemporary[m_numEntries].remName, pRemName);
-  
-  pTemporary[m_numEntries].info.size = size;
-  pTemporary[m_numEntries].info.data = data;
-  pTemporary[m_numEntries].info.flags = flags;
-  
-  if (m_pEntries != NULL) {
-    delete [] m_pEntries;
-    m_pEntries = NULL;
-  }
-  
-  m_pEntries = pTemporary;
-  pTemporary = NULL;
-  m_numEntries++;
-}
-
-char *
-TransferQueue::getLocPathAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].locPath;
-  }
-  return NULL;
-}
-
-char *
-TransferQueue::getLocNameAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].locName;
-  }
-  return NULL;
-}
-
-char *
-TransferQueue::getRemPathAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].remPath;
-  }
-  return NULL;
-}
-
-char *
-TransferQueue::getRemNameAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].remName;
-  }
-  return NULL;
-}
-
-char *
-TransferQueue::getFullLocPathAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    sprintf(m_szFullLocPath, "%s\\%s", getLocPathAt(number), getLocNameAt(number));
-    return m_szFullLocPath;
-  }
-  return NULL;
-}
-
-char *
-TransferQueue::getFullRemPathAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    sprintf(m_szFullRemPath, "%s\\%s", getRemPathAt(number), getRemNameAt(number));
-    return m_szFullRemPath;
-  }
-  return NULL;
-}
-
-SIZEDATAFLAGSINFO * 
-TransferQueue::getSizeDataFlagsAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return &m_pEntries[number].info;
-  }
-  return NULL;
-}
-
-bool 
-TransferQueue::setLocPathAt(unsigned int number, char *pName)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    strcpy(m_pEntries[number].locPath, pName);
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::setLocNameAt(unsigned int number, char *pName)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    strcpy(m_pEntries[number].locName, pName);
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::setRemPathAt(unsigned int number, char *pName)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    strcpy(m_pEntries[number].remPath, pName);
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::setRemNameAt(unsigned int number, char *pName)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    strcpy(m_pEntries[number].remName, pName);
-    return true;
-  }
-  return false;
-}
-
-unsigned int
-TransferQueue::getSizeAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].info.size;
-  }
-  return 0;
-}
-
-unsigned int
-TransferQueue::getDataAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].info.data;
-  }
-  return 0;
-}
-
-unsigned int 
-TransferQueue::getFlagsAt(unsigned int number)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    return m_pEntries[number].info.flags;
-  }
-  return 0;
-}
-
-bool 
-TransferQueue::setSizeAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.size = value;
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::setDataAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.data = value;
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::setFlagsAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.flags = m_pEntries[number].info.flags | value;
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::clearFlagAt(unsigned int number, unsigned int value)
-{
-  if ((number >= 0) && (number < m_numEntries)) {
-    m_pEntries[number].info.flags = (m_pEntries[number].info.flags & (value ^ 0xFFFFFFFF));
-    return true;
-  }
-  return false;
-}
-
-bool 
-TransferQueue::setFlagToAll(unsigned int flag)
-{
-  for (unsigned int i = 0; i < m_numEntries; i++) {
-    setFlagsAt(i, flag);
-  }
-  return true;
-}
-
-bool 
-TransferQueue::deleteAt(unsigned int number)
-{
-  if ((number >= m_numEntries) || (number < 0)) return false;
-  
-  FILEINFOEX *pTemporary = new FILEINFOEX[m_numEntries - 1];
-  
-  if (number == 0) {
-    memcpy(pTemporary, &m_pEntries[1], (m_numEntries - 1) * sizeof(FILEINFOEX));
-  } else {
-    memcpy(pTemporary, m_pEntries, number * sizeof(FILEINFOEX));
-    if (number != (m_numEntries - 1)) 
-      memcpy(&pTemporary[number], &m_pEntries[number + 1], (m_numEntries - number - 1) * sizeof(FILEINFOEX));
-  }
-  
-  if (m_pEntries != NULL) {
-    delete [] m_pEntries;
-    m_pEntries = NULL;
-  }
-  m_pEntries = pTemporary;
-  pTemporary = NULL;
-  m_numEntries--;
-  return true;
-}
-
-unsigned int 
-TransferQueue::getNumEntries()
-{
-  return m_numEntries;
-}
-
-void 
-TransferQueue::free()
-{
-  if (m_pEntries != NULL) {
-    delete [] m_pEntries;
-    m_pEntries = NULL;
-  }
-  m_numEntries = 0;
-}
diff --git a/common/rfb/TransferQueue.h b/common/rfb/TransferQueue.h
deleted file mode 100644
index 8a31bbc..0000000
--- a/common/rfb/TransferQueue.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* Copyright (C) 2005 TightVNC Team.  All Rights Reserved.
- *
- * Developed by Dennis Syrovatsky.
- *    
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- * 
- * This software 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 software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
- * USA.
- *
- * 
- *
- */
-
-// -=- TransferQueue.
-
-#ifndef __RFB_TRANSFERQUEUE_H__
-#define __RFB_TRANSFERQUEUE_H__
-
-#include <stdlib.h>
-
-#include <rfb/FileInfo.h>
-#include <rfb/fttypes.h>
-
-namespace rfb {
-  class TransferQueue  
-  {
-  public:
-    TransferQueue();
-    ~TransferQueue();
-
-    void add(TransferQueue *pTQ);
-    void add(char *pLocPath, char*pRemPath, FileInfo *pFI, unsigned int flags);
-    void add(char *pLocPath, char *pRemPath, char *pLocName, char *pRemName,
-      unsigned int size, unsigned int data, unsigned int flags);
-    
-    char *getLocPathAt(unsigned int number);
-    char *getLocNameAt(unsigned int number);
-    char *getRemPathAt(unsigned int number);
-    char *getRemNameAt(unsigned int number);
-    
-    char *getFullLocPathAt(unsigned int number);
-    char *getFullRemPathAt(unsigned int number);
-    
-    bool setLocPathAt(unsigned int number, char *pName);
-    bool setLocNameAt(unsigned int number, char *pName);
-    bool setRemPathAt(unsigned int number, char *pName);
-    bool setRemNameAt(unsigned int number, char *pName);
-    
-    unsigned int getSizeAt(unsigned int number);
-    unsigned int getDataAt(unsigned int number);
-    unsigned int getFlagsAt(unsigned int number);
-    
-    SIZEDATAFLAGSINFO * getSizeDataFlagsAt(unsigned int number);
-    
-    
-    bool setSizeAt(unsigned int number, unsigned int value);
-    bool setDataAt(unsigned int number, unsigned int value);
-    bool setFlagsAt(unsigned int number, unsigned int value);
-    bool clearFlagAt(unsigned int number, unsigned int value);
-    bool setFlagToAll(unsigned int flag);
-    
-    bool deleteAt(unsigned int number);
-    
-    unsigned int getNumEntries();
-    
-    void free();
-    
-  private:
-    FILEINFOEX *m_pEntries;
-    unsigned int m_numEntries;
-    
-    char m_szFullLocPath[FT_FILENAME_SIZE];
-    char m_szFullRemPath[FT_FILENAME_SIZE];
-  };
-}
-
-#endif // __RFB_TRANSFERQUEUE_H__
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 8e23474..e021aa6 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -36,7 +36,7 @@
     updates(false), image_getter(server->useEconomicTranslate),
     drawRenderedCursor(false), removeRenderedCursor(false),
     pointerEventTime(0), accessRights(AccessDefault),
-    startTime(time(0)), m_pFileTransfer(0)
+    startTime(time(0))
 {
   setStreams(&sock->inStream(), &sock->outStream());
   peerEndpoint.buf = sock->getPeerEndpoint();
@@ -46,14 +46,6 @@
   setSocketTimeouts();
   lastEventTime = time(0);
 
-  // Add this client to the VNCServerST
-  if (server->m_pFTManager != NULL) {
-    SFileTransfer *pFT = server->m_pFTManager->createObject(sock);
-    if (pFT != NULL) {
-      m_pFileTransfer = pFT;
-    }
-  }
-
   server->clients.push_front(this);
 }
 
@@ -72,9 +64,6 @@
   if (server->pointerClient == this)
     server->pointerClient = 0;
 
-  if (m_pFileTransfer) 
-    server->m_pFTManager->destroyObject(m_pFileTransfer);
-
   // Remove this client from the server
   server->clients.remove(this);
 
@@ -747,10 +736,3 @@
   return 4;
 }
 
-bool VNCSConnectionST::processFTMsg(int type)
-{
-  if (m_pFileTransfer != NULL) 
-    return m_pFileTransfer->processMessages(type);
-  else 
-    return false;
-}
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h
index d17bf6b..2121150 100644
--- a/common/rfb/VNCSConnectionST.h
+++ b/common/rfb/VNCSConnectionST.h
@@ -31,7 +31,6 @@
 #include <rfb/SMsgWriter.h>
 #include <rfb/TransImageGetter.h>
 #include <rfb/VNCServerST.h>
-#include <rfb/SFileTransfer.h>
 
 namespace rfb {
   class VNCSConnectionST : public SConnection,
@@ -110,8 +109,6 @@
     void setStatus(int status);
     int getStatus();
 
-    bool processFTMsg(int type);
-
   private:
     // SConnection callbacks
 
@@ -170,8 +167,6 @@
 
     CharArray closeReason;
     time_t startTime;
-
-    SFileTransfer *m_pFileTransfer;
   };
 }
 #endif
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 8f160e8..5da6e71 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -47,6 +47,8 @@
 // otherwise blacklisted connections might be "forgotten".
 
 
+#include <stdlib.h>
+
 #include <rfb/ServerCore.h>
 #include <rfb/VNCServerST.h>
 #include <rfb/VNCSConnectionST.h>
@@ -72,7 +74,7 @@
 VNCServerST::VNCServerST(const char* name_, SDesktop* desktop_,
                          SSecurityFactory* sf)
   : blHosts(&blacklist), desktop(desktop_), desktopStarted(false), pb(0),
-    m_pFTManager(0), name(strDup(name_)), pointerClient(0), comparer(0),
+    name(strDup(name_)), pointerClient(0), comparer(0),
     renderedCursorInvalid(false),
     securityFactory(sf ? sf : &defaultSecurityFactory),
     queryConnectionHandler(0), keyRemapper(&KeyRemapper::defInstance),
diff --git a/common/rfb/VNCServerST.h b/common/rfb/VNCServerST.h
index 7503bd3..4035f93 100644
--- a/common/rfb/VNCServerST.h
+++ b/common/rfb/VNCServerST.h
@@ -33,7 +33,6 @@
 #include <rfb/Cursor.h>
 #include <network/Socket.h>
 #include <rfb/ListConnInfo.h>
-#include <rfb/SFileTransferManager.h>
 
 namespace rfb {
 
@@ -189,8 +188,6 @@
     bool getDisable() { return disableclients;};
     void setDisable(bool disable) { disableclients = disable;};
 
-    void setFTManager(rfb::SFileTransferManager *pFTManager) { m_pFTManager = pFTManager; };
-
   protected:
 
     friend class VNCSConnectionST;
@@ -205,8 +202,6 @@
     bool desktopStarted;
     PixelBuffer* pb;
 
-    SFileTransferManager *m_pFTManager;
-
     CharArray name;
 
     std::list<VNCSConnectionST*> clients;
diff --git a/common/rfb/msgTypes.h b/common/rfb/msgTypes.h
index ec26adc..2b24f3c 100644
--- a/common/rfb/msgTypes.h
+++ b/common/rfb/msgTypes.h
@@ -26,13 +26,6 @@
   const int msgTypeBell = 2;
   const int msgTypeServerCutText = 3;
 
-  const int msgTypeFileListData = 130;
-  const int msgTypeFileDownloadData = 131;
-  const int msgTypeFileUploadCancel = 132;
-  const int msgTypeFileDownloadFailed = 133;
-  const int msgTypeFileDirSizeData = 134;
-  const int msgTypeFileLastRequestFailed = 135;
-
   const int msgTypeEndOfContinuousUpdates = 150;
 
   // client to server
@@ -45,17 +38,6 @@
   const int msgTypePointerEvent = 5;
   const int msgTypeClientCutText = 6;
 
-  const int msgTypeFileListRequest = 130;
-  const int msgTypeFileDownloadRequest = 131;
-  const int msgTypeFileUploadRequest = 132;
-  const int msgTypeFileUploadData = 133;
-  const int msgTypeFileDownloadCancel = 134;
-  const int msgTypeFileUploadFailed = 135;
-  const int msgTypeFileCreateDirRequest = 136;
-  const int msgTypeFileDirSizeRequest = 137;
-  const int	msgTypeFileRenameRequest = 138;
-  const int msgTypeFileDeleteRequest = 139;
-
   const int msgTypeEnableContinuousUpdates = 150;
 }
 #endif
diff --git a/common/rfb/rfb.dsp b/common/rfb/rfb.dsp
index d5bbf57..edbec72 100644
--- a/common/rfb/rfb.dsp
+++ b/common/rfb/rfb.dsp
@@ -126,14 +126,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\CFTMsgReader.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\CFTMsgWriter.cxx

-# End Source File

-# Begin Source File

-

 SOURCE=.\CMsgHandler.cxx

 # End Source File

 # Begin Source File

@@ -191,22 +183,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\FileInfo.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\FileManager.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\FileReader.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\FileWriter.cxx

-# End Source File

-# Begin Source File

-

 SOURCE=.\HextileDecoder.cxx

 # End Source File

 # Begin Source File

@@ -291,22 +267,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\SFileTransfer.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\SFileTransferManager.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\SFTMsgReader.cxx

-# End Source File

-# Begin Source File

-

-SOURCE=.\SFTMsgWriter.cxx

-# End Source File

-# Begin Source File

-

 SOURCE=.\SMsgHandler.cxx

 # End Source File

 # Begin Source File

@@ -349,10 +309,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\TransferQueue.cxx

-# End Source File

-# Begin Source File

-

 SOURCE=.\TransImageGetter.cxx

 # End Source File

 # Begin Source File

@@ -401,14 +357,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\CFTMsgReader.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\CFTMsgWriter.h

-# End Source File

-# Begin Source File

-

 SOURCE=.\CMsgHandler.h

 # End Source File

 # Begin Source File

@@ -473,10 +421,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\DirManager.h

-# End Source File

-# Begin Source File

-

 SOURCE=.\Encoder.h

 # End Source File

 # Begin Source File

@@ -489,22 +433,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\FileInfo.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\FileManager.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\FileReader.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\FileWriter.h

-# End Source File

-# Begin Source File

-

 SOURCE=.\hextileConstants.h

 # End Source File

 # Begin Source File

@@ -657,22 +585,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\SFileTransfer.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\SFileTransferManager.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\SFTMsgReader.h

-# End Source File

-# Begin Source File

-

-SOURCE=.\SFTMsgWriter.h

-# End Source File

-# Begin Source File

-

 SOURCE=.\SMsgHandler.h

 # End Source File

 # Begin Source File

@@ -733,10 +645,6 @@
 # End Source File

 # Begin Source File

 

-SOURCE=.\TransferQueue.h

-# End Source File

-# Begin Source File

-

 SOURCE=.\TransImageGetter.h

 # End Source File

 # Begin Source File