Page 226 - PDA Robotics Using Your Personal Digital Assistant to Control Your Robot
P. 226
PDA 10 5/27/03 8:51 AM Page 202
BOOL UpdateFtpFile( CString host, PDA Robotics
CString user,
CString password,
CString remote_path,
CString filename,
CString remote_filename,
CString& status_msg );
BOOL CFtp::TestConnect( CString host,
CString user,
CString password,
INTERNET_PORT port,
CString& status_msg);
protected:
CInternetSession* m_pInetSession; // objects one and only session
CFtpConnection* m_pFtpConnection; // If you need another create another Cftp
};
CFtp::CFtp()
{
m_pFtpConnection = NULL;
// the CInternetSession will not be closed or deleted
// until the dialog is closed
CString str;
if (!str.LoadString(IDS_APPNAME))
str = _T("AppUnknown");
m_pInetSession = new CInternetSession(str, 1, PRE_CONFIG_INTERNET_ACCESS);
// Alert the user if the internet session could
// not be started and close app
if (!m_pInetSession)
{
AfxMessageBox(IDS_BAD_SESSION, MB_OK);
OnCancel();
}
}
// Destructor
CFtp::~CFtp()
202