This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
#ifndef _REMOTEPSAPP_CONNECTIONTHREAD_HPP_
#define _REMOTEPSAPP_CONNECTIONTHREAD_HPP_
#ifndef _REMOTEPSAPP_REMOTEPROCESSINFO_HPP_
#include <remotepsapp/remoteprocessinfo.hpp>
#endif
#ifndef _THREAD_MESSAGETHREAD_HPP_
#include <thread/mthread.hpp>
#endif
#ifndef _THREAD_MUTEX_HPP_
#include <thread/mutex.hpp>
#endif
class ConnectionThread : public MessageThread
{
public:
ConnectionThread(void);
virtual ~ConnectionThread();
void handleConnect(const String &serverName);
bool isInConnect(void)const;
const String &serverName(void)const;
protected:
virtual void connectionHandler(RemoteProcessInfo &remoteProcessInfo);
virtual void errorHandler(void);
virtual void preConnect(const String &strServerName);
virtual void preDisconnect(const String &strServerName);
private:
enum {MsgConnect};
ConnectionThread(const ConnectionThread &someConnectionThread);
ConnectionThread &operator=(const ConnectionThread &someConnectionThread);
DWORD threadHandler(ThreadMessage &threadMessage);
void thConnect(const String &strServerName);
ThreadCallback<ConnectionThread> mThreadHandler;
Mutex mConnectionMutex;
RemoteProcessInfo mRemoteProcessInfo;
String mStrServerName;
bool mIsInConnect;
};
inline
bool ConnectionThread::isInConnect(void)const
{
return mIsInConnect;
}
inline
const String &ConnectionThread::serverName(void)const
{
return mStrServerName;
}
#endif