blob: 5bd165c9d2e498b3844de0c2e00d14e41707a2b6 [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 Syrovatsky6c6786d2005-11-07 09:17:38 +000031#include <vncviewer/FTListView.h>
32#include <vncviewer/FTProgress.h>
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000033#include <vncviewer/FileTransfer.h>
34#include <vncviewer/resource.h>
35
36namespace rfb {
37 namespace win32 {
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000038 class FTDialog
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000039 {
40 public:
41 FTDialog(HINSTANCE hInst, FileTransfer *pFT);
42 ~FTDialog();
43
44 bool createFTDialog();
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000045 bool closeFTDialog();
46 void destroyFTDialog();
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000047
48 static BOOL CALLBACK FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
49
50 void addLocalLVItems(FileInfo *pFI);
51 void addRemoteLVItems(FileInfo *pFI);
52
53 void reloadLocalFileList();
54 void reloadRemoteFileList();
55
56 char *getLocalPath() { return m_szLocalPath; };
57 char *getRemotePath() { return m_szRemotePath; };
58
59 private:
60 FileTransfer *m_pFileTransfer;
61
62 HWND m_hwndFTDialog;
63 HINSTANCE m_hInstance;
64
65 void onLocalItemActivate(LPNMITEMACTIVATE lpnmia);
66 void onRemoteItemActivate(LPNMITEMACTIVATE lpnmia);
67
68 bool initFTDialog();
69
70 void onLocalOneUpFolder(char *pPath);
71 void onRemoteOneUpFolder(char *pPath);
72
73 char m_szLocalPath[MAX_PATH];
74 char m_szRemotePath[MAX_PATH];
75 char m_szLocalPathTmp[MAX_PATH];
76 char m_szRemotePathTmp[MAX_PATH];
77
78 bool m_bDlgShown;
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000079
80 FTListView *m_pLocalLV;
81 FTListView *m_pRemoteLV;
82
83 FTProgress *m_pProgress;
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000084 };
85 }
86}
87
88#endif // __RFB_WIN32_FTDIALOG_H__