#ifndef _REMOTE_HOST_H_ #define _REMOTE_HOST_H_ #pragma once #include "host.hpp" // For Remote Host class RemoteHost : public host { public: RemoteHost(presetHandler pHandle, CLIHandler *cHandle, outputHandler *oHandle, string strHostIP = ""); RemoteHost(); ~RemoteHost(); protected: virtual bool ExecCommand(string strCommand, connectionHandler* pConnectionHandle = NULL); //virtual string SetPaths(string strPath, string strCmdToFind); virtual bool ProcessCommand(string command, bool pWriteToFile , ofstream* pFilePtr , vector* v = NULL, connectionHandler* pConnectionHandle = NULL, string strFileName = "temp_file_0", bool bParallel = false); virtual string GetHostOSType(); virtual void GenerateSnapFiles(); virtual void GenerateAwrReportFile(string strFile); virtual bool RemoveFileFromHost(string strFile); private: bool ProcessThruRSH(string strCmd, string fileName = "temp_rsh", bool bWriteToVec = false, vector* vec_strFileData = NULL, bool bWriteToTemp = false, ofstream* pFilePtr = NULL); void checkRSHConnection(bool& brsh); void GetRemoteHostOSType(); void ProcessTimer(int* maxTime); void ProcessTimer1(int maxTime, bool* bdone); void killRshOrSshProcess(); bool m_bConnection; // Connected or not string m_strUserName; // User name of the Remote Host string m_strPassWord; // Password of the Remote Host string m_strRSH; // RSH Connection for the remote host bool brshEnabled; #ifdef WIN32 CkSshKey* m_pSSHKey; #endif }; #endif // _REMOTE_HOST_H_