#ifndef _REMOTEPSAPP_CONNECTIONTHREAD_HPP_ #define _REMOTEPSAPP_CONNECTIONTHREAD_HPP_ #ifndef _REMOTEPSAPP_REMOTEPROCESSINFO_HPP_ #include #endif #ifndef _THREAD_MESSAGETHREAD_HPP_ #include #endif #ifndef _THREAD_MUTEX_HPP_ #include #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 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