46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#ifndef _FTP_FTPTHREAD_HPP_
|
|
#define _FTP_FTPTHREAD_HPP_
|
|
#ifndef _FTP_INTERPRETER_HPP_
|
|
#include <ftp/interprt.hpp>
|
|
#endif
|
|
#ifndef _THREAD_MESSAGETHREAD_HPP_
|
|
#include <thread/mthread.hpp>
|
|
#endif
|
|
|
|
class EditMonitor;
|
|
|
|
class FTPThread : private FTPInterpreter, public MessageThread
|
|
{
|
|
public:
|
|
enum HandlerType{MsgInterpretLine,MsgInterpretFile};
|
|
enum CompletionCode{LineComplete,FileComplete};
|
|
FTPThread(void);
|
|
virtual ~FTPThread();
|
|
WORD interpretLine(const String &lineString);
|
|
WORD interpretFile(const String &pathFileName);
|
|
void setDisplay(Monitor<EditWindow> &displayWindow);
|
|
void setCompletionHandler(PureCallback *lpCallback);
|
|
private:
|
|
FTPThread(const FTPThread &someFTPThread);
|
|
FTPThread &operator=(const FTPThread &someFTPThread);
|
|
DWORD threadHandler(ThreadMessage &someThreadMessage);
|
|
void handleInterpretLine(String *pString);
|
|
void handleInterpretFile(String *pString);
|
|
|
|
ThreadCallback<FTPThread> mThreadHandler;
|
|
CallbackPointer mCompletionHandler;
|
|
};
|
|
|
|
inline
|
|
FTPThread &FTPThread::operator=(const FTPThread &/*someFTPThread*/)
|
|
{ // private implementation
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
void FTPThread::setCompletionHandler(PureCallback *lpCallback)
|
|
{
|
|
mCompletionHandler=CallbackPointer(lpCallback);
|
|
}
|
|
#endif
|