ssh tunnel class
More...
#include <ChannelSSHTunnel.h>
|
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.
|
|
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
|
|
|
virtual qint64 | readData (char *data, qint64 maxlen) override |
|
virtual qint64 | writeData (const char *data, qint64 len) override |
|
| CChannel (QObject *parent=nullptr) |
|
virtual bool | isSequential () const override |
|
|
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 void | cb_log (ssh_session session, int priority, const char *message, void *userdata) |
|
ssh tunnel class
Definition at line 29 of file ChannelSSHTunnel.h.
◆ CChannelSSHTunnel()
static Channel SSH log CChannelSSHTunnel::CChannelSSHTunnel |
( |
QSharedPointer< CParameterChannelSSH > |
parameter, |
|
|
bool |
bWakeUp = true , |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ ~CChannelSSHTunnel()
CChannelSSHTunnel::~CChannelSSHTunnel |
( |
| ) |
|
|
virtual |
◆ 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 |
◆ cb_log()
void CChannelSSHTunnel::cb_log |
( |
ssh_session |
session, |
|
|
int |
priority, |
|
|
const char * |
message, |
|
|
void * |
userdata |
|
) |
| |
|
staticprivate |
◆ close()
void CChannelSSHTunnel::close |
( |
| ) |
|
|
overridevirtual |
◆ forward()
int CChannelSSHTunnel::forward |
( |
ssh_session |
session | ) |
|
|
private |
◆ GetDetails()
QString CChannelSSHTunnel::GetDetails |
( |
| ) |
|
|
overridevirtual |
◆ open()
bool CChannelSSHTunnel::open |
( |
OpenMode |
mode | ) |
|
|
overridevirtual |
◆ 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 |
◆ 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
-
className | show windows class name The class must have follower public functions: Q_INVOKABLE void SetContext(void* pContext); Q_INVOKABLE void SetConnecter(CConnecter *pConnecter); |
nRet | If className is QDialog derived class, QDialog::exec() return value. Otherwise, ignore |
pContext | pass context to CConnecter::slotBlockShowWidget() |
- See also
- CConnecter::slotBlockShowWidget() SetConnecter
◆ verifyKnownhost()
int CChannelSSHTunnel::verifyKnownhost |
( |
ssh_session |
session | ) |
|
|
private |
◆ WakeUp()
int CChannelSSHTunnel::WakeUp |
( |
| ) |
|
|
virtual |
◆ writeData()
qint64 CChannelSSHTunnel::writeData |
( |
const char * |
data, |
|
|
qint64 |
len |
|
) |
| |
|
overrideprotectedvirtual |
◆ m_Channel
ssh_channel CChannelSSHTunnel::m_Channel |
|
protected |
◆ m_Parameter
◆ m_pcapFile
ssh_pcap_file CChannelSSHTunnel::m_pcapFile |
|
private |
◆ m_pEvent
◆ m_pSocketException
QSocketNotifier* CChannelSSHTunnel::m_pSocketException |
|
private |
◆ m_pSocketRead
QSocketNotifier* CChannelSSHTunnel::m_pSocketRead |
|
private |
◆ m_pSocketWrite
QSocketNotifier* CChannelSSHTunnel::m_pSocketWrite |
|
private |
◆ m_Session
ssh_session CChannelSSHTunnel::m_Session |
|
protected |
The documentation for this class was generated from the following files: