blob: f4f822066cca3c1ee169e3242c25d95737062b1e [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.cxx
23
24#include <vncviewer/FTDialog.h>
25
26using namespace rfb;
27using namespace rfb::win32;
28
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000029FTDialog::FTDialog(HINSTANCE hInst, FileTransfer *pFT)
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000030{
31 m_pFileTransfer = pFT;
32 m_hInstance = hInst;
33 m_bDlgShown = false;
34 m_szLocalPath[0] = '\0';
35 m_szRemotePath[0] = '\0';
36 m_szLocalPathTmp[0] = '\0';
37 m_szRemotePathTmp[0] = '\0';
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000038
39 m_pLocalLV = NULL;
40 m_pRemoteLV = NULL;
41 m_pProgress = NULL;
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000042}
43
44FTDialog::~FTDialog()
45{
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000046 destroyFTDialog();
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000047}
48
49bool
50FTDialog::createFTDialog()
51{
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000052 m_hwndFTDialog = CreateDialogParam(m_hInstance,
53 MAKEINTRESOURCE(IDD_FILETRANSFER_DLG),
54 NULL,
55 (DLGPROC) FTDialogProc,
56 (LONG) this);
57
58 if (m_hwndFTDialog == NULL) return false;
59
60 m_pLocalLV = new FTListView(GetDlgItem(m_hwndFTDialog, IDC_FTLOCALLIST));
61 m_pRemoteLV = new FTListView(GetDlgItem(m_hwndFTDialog, IDC_FTREMOTELIST));
62
63 m_pProgress = new FTProgress(m_hwndFTDialog);
64
65 if ((m_pLocalLV == NULL) || (m_pRemoteLV == NULL) || (m_pProgress == NULL)) {
66 destroyFTDialog();
67 return false;
68 }
69
70 m_pLocalLV->initialize(m_hInstance);
71 m_pRemoteLV->initialize(m_hInstance);
72
73 ShowWindow(m_hwndFTDialog, SW_SHOW);
74 UpdateWindow(m_hwndFTDialog);
75 m_bDlgShown = true;
76
77 return true;
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000078}
79
80bool
81FTDialog::initFTDialog()
82{
83 return false;
84}
85
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000086bool
Dennis Syrovatsky139d7832005-11-02 05:36:05 +000087FTDialog::closeFTDialog()
88{
Dennis Syrovatsky6c6786d2005-11-07 09:17:38 +000089 return false;
90}
91
92void
93FTDialog::destroyFTDialog()
94{
95 if (m_pLocalLV != NULL) {
96 delete m_pLocalLV;
97 m_pLocalLV = NULL;
98 }
99
100 if (m_pRemoteLV != NULL) {
101 delete m_pRemoteLV;
102 m_pRemoteLV = NULL;
103 }
104
105 if (m_pProgress != NULL) {
106 delete m_pProgress;
107 m_pProgress = NULL;
108 }
Dennis Syrovatsky139d7832005-11-02 05:36:05 +0000109}
110
111BOOL CALLBACK
112FTDialog::FTDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
113{
114 FTDialog *_this = (FTDialog *) GetWindowLong(hwnd, GWL_USERDATA);
115 return FALSE;
116}
117
118void
119FTDialog::reloadLocalFileList()
120{
121}
122
123void
124FTDialog::reloadRemoteFileList()
125{
126}
127
128void
129FTDialog::onLocalItemActivate(LPNMITEMACTIVATE lpnmia)
130{
131}
132
133void
134FTDialog::onRemoteItemActivate(LPNMITEMACTIVATE lpnmia)
135{
136}
137
138void
139FTDialog::addLocalLVItems(FileInfo *pFI)
140{
141}
142
143void
144FTDialog::addRemoteLVItems(FileInfo *pFI)
145{
146}
147
148void
149FTDialog::onLocalOneUpFolder(char *pPath)
150{
151}
152
153void
154FTDialog::onRemoteOneUpFolder(char *pPath)
155{
156}