|
#ifndef __CeFtpTansfer_h__
#define __CeFtpTansfer_h__
#include "CeThread.h"
#include "FtpViewRes.h"
class CeFtpUpDownThread: public CeWorkerThread
{
public:
CeFtpClient* m_pClient;
LPCTSTR m_lpszSrc;
LPCTSTR m_lpszDest;
bool m_bPut;
DWORD m_dwSize;
CeFtpUpDownThread(CeFtpClient* pClient, LPCTSTR lpszSrc, LPCTSTR lpszDest, DWORD dwSize, bool bPut)
{
m_pClient = pClient;
m_lpszSrc = lpszSrc;
m_lpszDest = lpszDest;
m_bPut = bPut;
m_dwSize = dwSize;
}
virtual UINT ThreadProc()
{
if (m_bPut)
{
if (! m_pClient->PutFile(m_lpszSrc, m_lpszDest, m_dwSize))
return 1;
}
else
{
if (! m_pClient->GetFile(m_lpszSrc, m_lpszDest, m_dwSize))
return 1;
}
return 0;
}
};
class CeFtpTransferDlg: public CeDialog
{
CeFtpUpDownThread m_thread;
CeFtpClient* m_pClient;
public:
CeFtpTransferDlg(CeFtpClient* pClient, LPCTSTR lpszSrc, LPCTSTR lpszDest, DWORD dwSize, bool bPut);
~CeFtpTransferDlg();
virtual BOOL OnInitDialog();
virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnCancel();
virtual void OnOK();
};
#endif // __CeFtpTansfer_h__
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.