Myssh Class Reference

#include <myssh.hpp>

List of all members.

Public Member Functions

 Myssh ()
int connect_ssh (char *, char *, char *)
void disconnect_ssh ()
void shell ()
int auth_kbdint ()
QString getErrMsg ()
QStringList send_cmd (QString)
bool isConnected ()

Public Attributes

CHANNEL * channel

Private Member Functions

void _lock ()
void _unlock ()
QString _getStdOut ()
QString _getStdErr ()

Private Attributes

bool connected
SSH_SESSION * session
SSH_OPTIONS * options
bool _isLocked
QString _errmsg


Detailed Description

Handle connections to SSH hosts. Use libssh.

Definition at line 36 of file myssh.hpp.


Constructor & Destructor Documentation

Myssh::Myssh (  )  [inline]

Definition at line 50 of file myssh.hpp.

References _isLocked, and connected.


Member Function Documentation

void Myssh::_lock (  )  [private]

Lock the access to this ssh connection

Definition at line 31 of file myssh.cpp.

References _isLocked.

Referenced by connect_ssh(), and send_cmd().

void Myssh::_unlock (  )  [private]

Unlock the access to this ssh connection

Definition at line 39 of file myssh.cpp.

References _isLocked.

Referenced by connect_ssh(), and send_cmd().

QString Myssh::_getStdOut (  )  [private]

Get the standard output

Definition at line 73 of file myssh.cpp.

References channel, and MYSSH_BUFFER_SIZE.

Referenced by send_cmd().

QString Myssh::_getStdErr (  )  [private]

Get the error output

Definition at line 99 of file myssh.cpp.

References channel, and MYSSH_BUFFER_SIZE.

Referenced by send_cmd().

int Myssh::connect_ssh ( char *  login,
char *  passwd,
char *  host 
)

Connect to an SSH host

Parameters:
login login
passwd password
host host

Definition at line 205 of file myssh.cpp.

References _errmsg, _lock(), _unlock(), auth_kbdint(), connected, options, session, and shell().

Referenced by SSHConnect::run().

Here is the call graph for this function:

void Myssh::disconnect_ssh (  ) 

Disconnect

Definition at line 192 of file myssh.cpp.

References connected, and session.

Referenced by MainWindowImpl::connectDisconnectSSH().

void Myssh::shell (  ) 

Request a shell

Definition at line 123 of file myssh.cpp.

References _errmsg, cfmakeraw(), channel, session, and terminal.

Referenced by connect_ssh().

Here is the call graph for this function:

int Myssh::auth_kbdint (  ) 

Definition at line 153 of file myssh.cpp.

References session.

Referenced by connect_ssh().

QString Myssh::getErrMsg (  )  [inline]

Definition at line 57 of file myssh.hpp.

References _errmsg.

Referenced by SSHConnect::run().

QStringList Myssh::send_cmd ( QString  s  ) 

Send a command to ssh host

Parameters:
s command to send

Definition at line 49 of file myssh.cpp.

References _getStdErr(), _getStdOut(), _lock(), _unlock(), and channel.

Referenced by SSHExecuteThread::run(), and JobExecute::run().

Here is the call graph for this function:

bool Myssh::isConnected (  )  [inline]

Definition at line 59 of file myssh.hpp.

References connected.

Referenced by MainWindowImpl::connectDisconnectSSH(), JobEditorWidget::executeJob(), Stats::refresh(), PBSNodes::refresh(), and SSHConnect::run().


Member Data Documentation

bool Myssh::connected [private]

Definition at line 39 of file myssh.hpp.

Referenced by connect_ssh(), disconnect_ssh(), isConnected(), and Myssh().

SSH_SESSION* Myssh::session [private]

Definition at line 40 of file myssh.hpp.

Referenced by auth_kbdint(), connect_ssh(), disconnect_ssh(), and shell().

SSH_OPTIONS* Myssh::options [private]

Definition at line 41 of file myssh.hpp.

Referenced by connect_ssh().

bool Myssh::_isLocked [private]

Definition at line 43 of file myssh.hpp.

Referenced by _lock(), _unlock(), and Myssh().

QString Myssh::_errmsg [private]

Definition at line 48 of file myssh.hpp.

Referenced by connect_ssh(), getErrMsg(), and shell().

CHANNEL* Myssh::channel

Definition at line 51 of file myssh.hpp.

Referenced by _getStdErr(), _getStdOut(), send_cmd(), and shell().


The documentation for this class was generated from the following files:
Generated on Mon Mar 16 18:46:09 2009 for QCJM by  doxygen 1.5.4