Dennis Syrovatsky | 139d783 | 2005-11-02 05:36:05 +0000 | [diff] [blame] | 1 | /* Copyright (C) 2005 TightVNC Team. All Rights Reserved. |
| 2 | * |
| 3 | * This is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * This software is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with this software; if not, write to the Free Software |
| 15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 16 | * USA. |
| 17 | * |
| 18 | * TightVNC distribution homepage on the Web: http://www.tightvnc.com/ |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | // -=- FileTransfer.h |
| 23 | |
| 24 | #ifndef __RFB_WIN32_FILETRANSFER_H__ |
| 25 | #define __RFB_WIN32_FILETRANSFER_H__ |
| 26 | |
Dennis Syrovatsky | 5c76117 | 2005-11-09 04:19:05 +0000 | [diff] [blame] | 27 | #include <rdr/InStream.h> |
| 28 | #include <rdr/OutStream.h> |
Dennis Syrovatsky | 63943a3 | 2005-11-10 06:24:56 +0000 | [diff] [blame] | 29 | #include <rfb/msgTypes.h> |
Dennis Syrovatsky | 4ab4185 | 2005-11-07 09:52:36 +0000 | [diff] [blame] | 30 | #include <vncviewer/FTDialog.h> |
Dennis Syrovatsky | 63943a3 | 2005-11-10 06:24:56 +0000 | [diff] [blame] | 31 | #include <vncviewer/FTMsgReader.h> |
| 32 | #include <vncviewer/FTMsgWriter.h> |
Dennis Syrovatsky | 4ab4185 | 2005-11-07 09:52:36 +0000 | [diff] [blame] | 33 | |
Dennis Syrovatsky | 139d783 | 2005-11-02 05:36:05 +0000 | [diff] [blame] | 34 | namespace rfb { |
| 35 | namespace win32 { |
Dennis Syrovatsky | 4ab4185 | 2005-11-07 09:52:36 +0000 | [diff] [blame] | 36 | class FTDialog; |
| 37 | |
Dennis Syrovatsky | 139d783 | 2005-11-02 05:36:05 +0000 | [diff] [blame] | 38 | class FileTransfer |
| 39 | { |
| 40 | public: |
| 41 | FileTransfer(); |
| 42 | ~FileTransfer(); |
Dennis Syrovatsky | 4ab4185 | 2005-11-07 09:52:36 +0000 | [diff] [blame] | 43 | |
Dennis Syrovatsky | 5c76117 | 2005-11-09 04:19:05 +0000 | [diff] [blame] | 44 | bool initialize(rdr::InStream *pIS, rdr::OutStream *pOS); |
Dennis Syrovatsky | 63943a3 | 2005-11-10 06:24:56 +0000 | [diff] [blame] | 45 | bool processFTMsg(int type); |
Dennis Syrovatsky | b595e03 | 2005-11-09 06:24:25 +0000 | [diff] [blame] | 46 | bool show(); |
Dennis Syrovatsky | 4ab4185 | 2005-11-07 09:52:36 +0000 | [diff] [blame] | 47 | |
| 48 | private: |
| 49 | bool m_bFTDlgShown; |
Dennis Syrovatsky | 5c76117 | 2005-11-09 04:19:05 +0000 | [diff] [blame] | 50 | bool m_bInitialized; |
Dennis Syrovatsky | 4ab4185 | 2005-11-07 09:52:36 +0000 | [diff] [blame] | 51 | |
| 52 | FTDialog *m_pFTDialog; |
Dennis Syrovatsky | 5c76117 | 2005-11-09 04:19:05 +0000 | [diff] [blame] | 53 | |
Dennis Syrovatsky | 63943a3 | 2005-11-10 06:24:56 +0000 | [diff] [blame] | 54 | FTMsgReader *m_pReader; |
| 55 | FTMsgWriter *m_pWriter; |
Dennis Syrovatsky | c08f042 | 2005-11-10 06:36:46 +0000 | [diff] [blame^] | 56 | |
| 57 | bool procFileListDataMsg(); |
| 58 | bool procFileSpecDirDataMsg(); |
| 59 | bool procFileDownloadDataMsg(); |
| 60 | bool procFileUploadCancelMsg(); |
| 61 | bool procFileDownloadFailedMsg(); |
| 62 | bool procFileDirSizeDataMsg(); |
| 63 | bool procFileLastRqstFailedMsg(); |
Dennis Syrovatsky | 139d783 | 2005-11-02 05:36:05 +0000 | [diff] [blame] | 64 | }; |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | #endif // __RFB_WIN32_FILETRANSFER_H__ |