From ea3546444207a69a3127b6bbde0b138c10adc7a8 Mon Sep 17 00:00:00 2001 From: Dennis Syrovatsky Date: Sun, 18 Dec 2005 13:10:26 +0000 Subject: [PATCH] Added the file transfer messages routine for the server side code. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@460 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- rfb/SMsgHandler.h | 2 ++ rfb/SMsgReaderV3.cxx | 12 ++++++++++++ rfb/VNCSConnectionST.cxx | 5 +++++ rfb/VNCSConnectionST.h | 2 ++ 4 files changed, 21 insertions(+) diff --git a/rfb/SMsgHandler.h b/rfb/SMsgHandler.h index f326ad43..148403f8 100644 --- a/rfb/SMsgHandler.h +++ b/rfb/SMsgHandler.h @@ -56,6 +56,8 @@ namespace rfb { // specially for this purpose. virtual void supportsLocalCursor(); + virtual bool processFTMsg(int type) = 0; + ConnParams cp; }; } diff --git a/rfb/SMsgReaderV3.cxx b/rfb/SMsgReaderV3.cxx index e5ae744a..0ce1bcab 100644 --- a/rfb/SMsgReaderV3.cxx +++ b/rfb/SMsgReaderV3.cxx @@ -50,6 +50,18 @@ void SMsgReaderV3::readMsg() case msgTypeKeyEvent: readKeyEvent(); break; 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/rfb/VNCSConnectionST.cxx b/rfb/VNCSConnectionST.cxx index 41e4eb3b..8b6adda6 100644 --- a/rfb/VNCSConnectionST.cxx +++ b/rfb/VNCSConnectionST.cxx @@ -699,4 +699,9 @@ int VNCSConnectionST::getStatus() if ((accessRights & (AccessPtrEvents | AccessKeyEvents | AccessView)) == 0x0000) return 2; return 4; +} + +bool VNCSConnectionST::processFTMsg(int type) +{ + return false; } \ No newline at end of file diff --git a/rfb/VNCSConnectionST.h b/rfb/VNCSConnectionST.h index b81c3a51..7813c04e 100644 --- a/rfb/VNCSConnectionST.h +++ b/rfb/VNCSConnectionST.h @@ -108,6 +108,8 @@ namespace rfb { void setStatus(int status); int getStatus(); + bool processFTMsg(int type); + private: // SConnection callbacks -- 2.39.5