blob: a0199100a36ddbfae06c4620d9c6a6ed8b7c1a2f [file] [log] [blame]
Dennis Syrovatsky139d7832005-11-02 05:36:05 +00001/* 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// -=- FTDialog.h
23
24#ifndef __RFB_WIN32_FTDIALOG_H__
25#define __RFB_WIN32_FTDIALOG_H__
26
27#include <windows.h>
28#include <commctrl.h>
29
30#include <rfb/FileInfo.h>
Dennis Syrovatsky4ab41852005-11-07 09:52:36 +000031#include <vncviewer/FileTransfer.h>
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000032#include <vncviewer/FTListView.h>
33#include <vncviewer/FTProgress.h>
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000034#include <vncviewer/resource.h>
35
36namespace rfb {
37 namespace win32 {
Dennis Syrovatsky4ab41852005-11-07 09:52:36 +000038 class FileTransfer;
39
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000040 class FTDialog
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000041 {
42 public:
43 FTDialog(HINSTANCE hInst, FileTransfer *pFT);
44 ~FTDialog();
45
46 bool createFTDialog();
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000047 bool closeFTDialog();
48 void destroyFTDialog();
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000049
50 static BOOL CALLBACK FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
51
52 void addLocalLVItems(FileInfo *pFI);
53 void addRemoteLVItems(FileInfo *pFI);
54
55 void reloadLocalFileList();
56 void reloadRemoteFileList();
57
58 char *getLocalPath() { return m_szLocalPath; };
59 char *getRemotePath() { return m_szRemotePath; };
60
61 private:
62 FileTransfer *m_pFileTransfer;
63
64 HWND m_hwndFTDialog;
65 HINSTANCE m_hInstance;
66
67 void onLocalItemActivate(LPNMITEMACTIVATE lpnmia);
68 void onRemoteItemActivate(LPNMITEMACTIVATE lpnmia);
69
70 bool initFTDialog();
71
72 void onLocalOneUpFolder(char *pPath);
73 void onRemoteOneUpFolder(char *pPath);
74
75 char m_szLocalPath[MAX_PATH];
76 char m_szRemotePath[MAX_PATH];
77 char m_szLocalPathTmp[MAX_PATH];
78 char m_szRemotePathTmp[MAX_PATH];
79
80 bool m_bDlgShown;
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000081
82 FTListView *m_pLocalLV;
83 FTListView *m_pRemoteLV;
84
85 FTProgress *m_pProgress;
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000086 };
87 }
88}
89
90#endif // __RFB_WIN32_FTDIALOG_H__