00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef SSHMANAGERCLI_H
00016 #define SSHMANAGERCLI_H
00017
00018 #ifdef ENABLE_SSH
00019
00020 #include <globalsearch/sshmanager.h>
00021
00022 class QSemaphore;
00023
00024 namespace GlobalSearch {
00025 class OptBase;
00026 class SSHConnectionCLI;
00027
00035 class SSHManagerCLI : public SSHManager
00036 {
00037 Q_OBJECT
00038
00039 public:
00045 explicit SSHManagerCLI(unsigned int connections = 5,
00046 OptBase *parent = 0);
00047
00051 virtual ~SSHManagerCLI();
00052
00058 void makeConnections(const QString &host,
00059 const QString &user,
00060 const QString &pass,
00061 unsigned int port);
00062
00063 public slots:
00068 SSHConnection *getFreeConnection();
00069
00074 void unlockConnection(SSHConnection* ssh);
00075
00076 protected:
00077 SSHConnectionCLI *m_conn;
00078 QSemaphore *m_semaphore;
00079 };
00080
00081 }
00082
00083 #endif // ENABLE_SSH
00084 #endif // SSHMANAGER_H