Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

DlgFileCopy.h

Go to the documentation of this file.
00001 //
00002 // DlgFileCopy.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 //
00021 
00022 #if !defined(AFX_DLGFILECOPY_H__35C04685_7B85_4022_A702_983686FCBD9B__INCLUDED_)
00023 #define AFX_DLGFILECOPY_H__35C04685_7B85_4022_A702_983686FCBD9B__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "DlgSkinDialog.h"
00028 #include "CtrlSharedFolder.h"
00029 
00030 class CLibraryFile;
00031 
00032 
00033 class CFileCopyDlg : public CSkinDialog
00034 {
00035 // Construction
00036 public:
00037         CFileCopyDlg(CWnd* pParent = NULL, BOOL bMove = FALSE);
00038 
00039 // Dialog Data
00040 public:
00041         //{{AFX_DATA(CFileCopyDlg)
00042         enum { IDD = IDD_FILE_COPY };
00043         CStatic m_wndMove;
00044         CStatic m_wndCopy;
00045         CStatic m_wndFileName;
00046         CProgressCtrl   m_wndFileProg;
00047         CButton m_wndCancel;
00048         CButton m_wndOK;
00049         CProgressCtrl   m_wndProgress;
00050         CStatic m_wndPlaceholder;
00051         //}}AFX_DATA
00052 
00053 // Attributes
00054 public:
00055         CString                         m_sTarget;
00056 protected:
00057         BOOL                            m_bMove;
00058         CPtrList                        m_pFiles;
00059         CLibraryFolderCtrl      m_wndTree;
00060         DWORD                           m_nCookie;
00061 protected:
00062         HANDLE                          m_hThread;
00063         BOOL                            m_bThread;
00064         BOOL                            m_bCancel;
00065         int                                     m_nFileProg;
00066 
00067 // Operations
00068 public:
00069         void            AddFile(CLibraryFile* pFile);
00070 protected:
00071         void            StartOperation();
00072         void            StopOperation();
00073         void            OnRun();
00074         BOOL            ProcessFile(CString& strName, CString& strPath, BOOL bMetaData);
00075         BOOL            CheckTarget(LPCTSTR pszTarget);
00076         BOOL            ProcessMove(LPCTSTR pszSource, LPCTSTR pszTarget);
00077         BOOL            ProcessCopy(LPCTSTR pszSource, LPCTSTR pszTarget);
00078 protected:
00079         static UINT                     ThreadStart(LPVOID pParam);
00080         static DWORD WINAPI     CopyCallback(LARGE_INTEGER TotalFileSize, LARGE_INTEGER TotalBytesTransferred, LARGE_INTEGER StreamSize, LARGE_INTEGER StreamBytesTransferred, DWORD dwStreamNumber, DWORD dwCallbackReason, HANDLE hSourceFile, HANDLE hDestinationFile, LPVOID lpData);
00081 
00082 
00083 // Overrides
00084 public:
00085         //{{AFX_VIRTUAL(CFileCopyDlg)
00086         protected:
00087         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00088         virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
00089         //}}AFX_VIRTUAL
00090 
00091 // Implementation
00092 protected:
00093         //{{AFX_MSG(CFileCopyDlg)
00094         virtual BOOL OnInitDialog();
00095         virtual void OnOK();
00096         afx_msg void OnTimer(UINT nIDEvent);
00097         virtual void OnCancel();
00098         //}}AFX_MSG
00099         DECLARE_MESSAGE_MAP()
00100 
00101 };
00102 
00103 //{{AFX_INSERT_LOCATION}}
00104 
00105 #define IDC_FOLDERS     100
00106 
00107 #endif // !defined(AFX_DLGFILECOPY_H__35C04685_7B85_4022_A702_983686FCBD9B__INCLUDED_)

Generated on Thu Dec 15 10:39:39 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2