blob: 2748d9c0cd5f0b549c1654738c5f29797a42190c [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>
31#include <rfb_win32/Dialog.h>
32#include <vncviewer/FileTransfer.h>
33#include <vncviewer/resource.h>
34
35namespace rfb {
36 namespace win32 {
37 class FTDialog : public Dialog
38 {
39 public:
40 FTDialog(HINSTANCE hInst, FileTransfer *pFT);
41 ~FTDialog();
42
43 bool createFTDialog();
44 void closeFTDialog();
45
46 static BOOL CALLBACK FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
47
48 void addLocalLVItems(FileInfo *pFI);
49 void addRemoteLVItems(FileInfo *pFI);
50
51 void reloadLocalFileList();
52 void reloadRemoteFileList();
53
54 char *getLocalPath() { return m_szLocalPath; };
55 char *getRemotePath() { return m_szRemotePath; };
56
57 private:
58 FileTransfer *m_pFileTransfer;
59
60 HWND m_hwndFTDialog;
61 HINSTANCE m_hInstance;
62
63 void onLocalItemActivate(LPNMITEMACTIVATE lpnmia);
64 void onRemoteItemActivate(LPNMITEMACTIVATE lpnmia);
65
66 bool initFTDialog();
67
68 void onLocalOneUpFolder(char *pPath);
69 void onRemoteOneUpFolder(char *pPath);
70
71 char m_szLocalPath[MAX_PATH];
72 char m_szRemotePath[MAX_PATH];
73 char m_szLocalPathTmp[MAX_PATH];
74 char m_szRemotePathTmp[MAX_PATH];
75
76 bool m_bDlgShown;
77 };
78 }
79}
80
81#endif // __RFB_WIN32_FTDIALOG_H__