3#include "ParameterChannelSSH.h"
4#include "RabbitCommonTools.h"
6CParameterChannelSSH::CParameterChannelSSH(QObject *parent)
9 m_szUser(RabbitCommon::CTools::Instance()->GetCurrentUser()),
10 m_nAuthenticationMethod(SSH_AUTH_METHOD_PASSWORD|SSH_AUTH_METHOD_PUBLICKEY),
11 m_bUseSystemFile(true),
13 m_szSourceHost(
"localhost"),
19 m_szServer = c.m_szServer;
21 m_szUser = c.m_szUser;
22 m_szPassword = c.m_szPassword;
24 m_nAuthenticationMethod = c.m_nAuthenticationMethod;
25 m_szPublicKeyFile = c.m_szPublicKeyFile;
26 m_szPrivateKeyFile = c.m_szPrivateKeyFile;
27 m_szPassphrase = c.m_szPassphrase;
29 m_szRemoteHost = c.m_szRemoteHost;
30 m_nRemotePort = c.m_nRemotePort;
32 m_szSourceHost = c.m_szSourceHost;
33 m_nSourcePort = c.m_nSourcePort;
35 m_pcapFile = c.m_pcapFile;
38QString CParameterChannelSSH::GetServer()
const
43int CParameterChannelSSH::setServer(
const QString &szServer)
45 m_szServer = szServer;
49quint16 CParameterChannelSSH::GetPort()
const
54int CParameterChannelSSH::setPort(
const quint16 nPort)
60QString CParameterChannelSSH::GetUser()
const
65int CParameterChannelSSH::SetUser(
const QString &szUser)
71QString CParameterChannelSSH::GetPassword()
const
76int CParameterChannelSSH::SetPassword(
const QString szPassword)
78 m_szPassword = szPassword;
82int CParameterChannelSSH::GetAuthenticationMethod()
const
84 return m_nAuthenticationMethod;
87int CParameterChannelSSH::SetAuthenticationMethod(
int method)
89 m_nAuthenticationMethod = method;
93QString CParameterChannelSSH::GetPassphrase()
const
95 return m_szPassphrase;
98int CParameterChannelSSH::SetPassphrase(
const QString passphrase)
100 m_szPassphrase = passphrase;
104bool CParameterChannelSSH::GetUseSystemFile()
const
106 return m_bUseSystemFile;
109int CParameterChannelSSH::SetUseSystemFile(
bool use)
111 if(m_bUseSystemFile == use)
113 m_bUseSystemFile = use;
117QString CParameterChannelSSH::GetPublicKeyFile()
const
119 return m_szPublicKeyFile;
122int CParameterChannelSSH::SetPublicKeyFile(
const QString szFile)
124 m_szPublicKeyFile = szFile;
128QString CParameterChannelSSH::GetPrivateKeyFile()
const
130 return m_szPrivateKeyFile;
133int CParameterChannelSSH::SetPrivateKeyFile(
const QString szFile)
135 m_szPrivateKeyFile = szFile;
139QString CParameterChannelSSH::GetRemoteHost()
const
141 return m_szRemoteHost;
144int CParameterChannelSSH::SetRemoteHost(
const QString szHost)
146 m_szRemoteHost = szHost;
150quint16 CParameterChannelSSH::GetRemotePort()
const
152 return m_nRemotePort;
155int CParameterChannelSSH::SetRemotePort(
const quint16 nPort)
157 m_nRemotePort = nPort;
161QString CParameterChannelSSH::GetSourceHost()
const
163 return m_szSourceHost;
166int CParameterChannelSSH::SetSourceHost(
const QString szHost)
168 m_szSourceHost = szHost;
172quint16 CParameterChannelSSH::GetSourcePort()
const
174 return m_nSourcePort;
177int CParameterChannelSSH::SetSourcePort(
const quint16 nPort)
179 m_nSourcePort = nPort;
183QString CParameterChannelSSH::GetPcapFile()
const
188int CParameterChannelSSH::SetPcapFile(
const QString &szFile)