Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CChannelSSHTunnel Class Reference

ssh tunnel class More...

#include <ChannelSSHTunnel.h>

Inheritance diagram for CChannelSSHTunnel:
CChannel CChannelSSHTunnelForward

Signals

void sigBlockShowMessageBox (const QString &szTitle, const QString &szMessage, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton &nRet, bool &checkBox, QString checkBoxContext=QString())
 Block background threads and display message dialogs in foreground threads (QMessageBox)
 
void sigBlockShowWidget (const QString &className, int &nRet, void *pContext)
 Blocks the background thread and displays the window in the foreground thread.
 
- Signals inherited from CChannel
void sigConnected ()
 emit when the channel is connected.
 
void sigDisconnected ()
 emit when the channel is disconnected
 
void sigError (int nErr, const QString &szErr)
 emit when the channel is error
 

Public Member Functions

 CChannelSSHTunnel (QSharedPointer< CParameterChannelSSH > parameter, bool bWakeUp=true, QObject *parent=nullptr)
 
virtual bool open (OpenMode mode) override
 
virtual void close () override
 
virtual QString GetDetails () override
 
int Process ()
 
virtual int WakeUp ()
 
- Public Member Functions inherited from CChannel
 CChannel (QTcpSocket *pSocket, QObject *parent=nullptr)
 CChannel.
 

Protected Member Functions

virtual qint64 readData (char *data, qint64 maxlen) override
 
virtual qint64 writeData (const char *data, qint64 len) override
 
- Protected Member Functions inherited from CChannel
 CChannel (QObject *parent=nullptr)
 
virtual bool isSequential () const override
 

Protected Attributes

ssh_session m_Session
 
ssh_channel m_Channel
 

Private Member Functions

int verifyKnownhost (ssh_session session)
 
int authentication (ssh_session session, const QString szUser, const QString szPassword, const QString szPassphrase, const int nMethod=SSH_AUTH_METHOD_PASSWORD)
 
int authenticationPublicKey (ssh_session session, const QString szUser, const QString szPublicKeyFile, const QString szPrivateKeyFile, const QString szPassphrase)
 
int forward (ssh_session session)
 

Static Private Member Functions

static void cb_log (ssh_session session, int priority, const char *message, void *userdata)
 

Private Attributes

ssh_pcap_file m_pcapFile
 
QSharedPointer< CParameterChannelSSHm_Parameter
 
QSocketNotifier * m_pSocketRead
 
QSocketNotifier * m_pSocketWrite
 
QSocketNotifier * m_pSocketException
 
Channel::CEventm_pEvent
 

Additional Inherited Members

- Static Public Member Functions inherited from CChannel
static int InitTranslation ()
 
static int RemoveTranslation ()
 

Detailed Description

ssh tunnel class

Definition at line 29 of file ChannelSSHTunnel.h.

Constructor & Destructor Documentation

◆ CChannelSSHTunnel()

static Channel SSH log CChannelSSHTunnel::CChannelSSHTunnel ( QSharedPointer< CParameterChannelSSH parameter,
bool  bWakeUp = true,
QObject *  parent = nullptr 
)
explicit

Definition at line 21 of file ChannelSSHTunnel.cpp.

◆ ~CChannelSSHTunnel()

CChannelSSHTunnel::~CChannelSSHTunnel ( )
virtual

Definition at line 42 of file ChannelSSHTunnel.cpp.

Member Function Documentation

◆ authentication()

int CChannelSSHTunnel::authentication ( ssh_session  session,
const QString  szUser,
const QString  szPassword,
const QString  szPassphrase,
const int  nMethod = SSH_AUTH_METHOD_PASSWORD 
)
private

◆ authenticationPublicKey()

int CChannelSSHTunnel::authenticationPublicKey ( ssh_session  session,
const QString  szUser,
const QString  szPublicKeyFile,
const QString  szPrivateKeyFile,
const QString  szPassphrase 
)
private

Definition at line 459 of file ChannelSSHTunnel.cpp.

◆ cb_log()

void CChannelSSHTunnel::cb_log ( ssh_session  session,
int  priority,
const char *  message,
void *  userdata 
)
staticprivate

Definition at line 54 of file ChannelSSHTunnel.cpp.

◆ close()

void CChannelSSHTunnel::close ( )
overridevirtual

Reimplemented from CChannel.

Definition at line 215 of file ChannelSSHTunnel.cpp.

◆ forward()

int CChannelSSHTunnel::forward ( ssh_session  session)
private

Definition at line 546 of file ChannelSSHTunnel.cpp.

◆ GetDetails()

QString CChannelSSHTunnel::GetDetails ( )
overridevirtual

Reimplemented from CChannel.

Definition at line 49 of file ChannelSSHTunnel.cpp.

◆ open()

bool CChannelSSHTunnel::open ( OpenMode  mode)
overridevirtual
Parameters
pSocketThe Owner is the instance of this class.

Reimplemented from CChannel.

Reimplemented in CChannelSSHTunnelForward.

Definition at line 79 of file ChannelSSHTunnel.cpp.

◆ Process()

int CChannelSSHTunnel::Process ( )
Returns
  • >= 0: continue, Interval call time (msec)
  • = -1: stop
  • < -1: error

Definition at line 598 of file ChannelSSHTunnel.cpp.

◆ readData()

qint64 CChannelSSHTunnel::readData ( char *  data,
qint64  maxlen 
)
overrideprotectedvirtual

Reimplemented from CChannel.

Definition at line 682 of file ChannelSSHTunnel.cpp.

◆ sigBlockShowMessageBox

void CChannelSSHTunnel::sigBlockShowMessageBox ( const QString &  szTitle,
const QString &  szMessage,
QMessageBox::StandardButtons  buttons,
QMessageBox::StandardButton &  nRet,
bool &  checkBox,
QString  checkBoxContext = QString() 
)
signal

Block background threads and display message dialogs in foreground threads (QMessageBox)

Parameters
title
message
buttons
nRet
checkBox
checkBoxContext
See also
CConnecter::slotBlockShowMessageBox()

◆ sigBlockShowWidget

void CChannelSSHTunnel::sigBlockShowWidget ( const QString &  className,
int &  nRet,
void *  pContext 
)
signal

Blocks the background thread and displays the window in the foreground thread.

Parameters
classNameshow windows class name The class must have follower public functions: Q_INVOKABLE void SetContext(void* pContext); Q_INVOKABLE void SetConnecter(CConnecter *pConnecter);
nRetIf className is QDialog derived class, QDialog::exec() return value. Otherwise, ignore
pContextpass context to CConnecter::slotBlockShowWidget()
See also
CConnecter::slotBlockShowWidget() SetConnecter

◆ verifyKnownhost()

int CChannelSSHTunnel::verifyKnownhost ( ssh_session  session)
private

Definition at line 263 of file ChannelSSHTunnel.cpp.

◆ WakeUp()

int CChannelSSHTunnel::WakeUp ( )
virtual

Definition at line 73 of file ChannelSSHTunnel.cpp.

◆ writeData()

qint64 CChannelSSHTunnel::writeData ( const char *  data,
qint64  len 
)
overrideprotectedvirtual

Reimplemented from CChannel.

Definition at line 743 of file ChannelSSHTunnel.cpp.

Member Data Documentation

◆ m_Channel

ssh_channel CChannelSSHTunnel::m_Channel
protected

Definition at line 118 of file ChannelSSHTunnel.h.

◆ m_Parameter

QSharedPointer<CParameterChannelSSH> CChannelSSHTunnel::m_Parameter
private

Definition at line 122 of file ChannelSSHTunnel.h.

◆ m_pcapFile

ssh_pcap_file CChannelSSHTunnel::m_pcapFile
private

Definition at line 121 of file ChannelSSHTunnel.h.

◆ m_pEvent

Channel::CEvent* CChannelSSHTunnel::m_pEvent
private

Definition at line 128 of file ChannelSSHTunnel.h.

◆ m_pSocketException

QSocketNotifier* CChannelSSHTunnel::m_pSocketException
private

Definition at line 126 of file ChannelSSHTunnel.h.

◆ m_pSocketRead

QSocketNotifier* CChannelSSHTunnel::m_pSocketRead
private

Definition at line 124 of file ChannelSSHTunnel.h.

◆ m_pSocketWrite

QSocketNotifier* CChannelSSHTunnel::m_pSocketWrite
private

Definition at line 125 of file ChannelSSHTunnel.h.

◆ m_Session

ssh_session CChannelSSHTunnel::m_Session
protected

Definition at line 117 of file ChannelSSHTunnel.h.


The documentation for this class was generated from the following files: