* \return * \li OnInitReturnValue::Fail: error * \li OnInitReturnValue::UseOnProcess: Use OnProcess (non-Qt event loop) * \li OnInitReturnValue::NotUseOnProcess: Don't use OnProcess (qt event loop) */
| 195 | * \li OnInitReturnValue::NotUseOnProcess: Don't use OnProcess (qt event loop) |
| 196 | */ |
| 197 | CBackendVnc::OnInitReturnValue CBackendVnc::OnInit() |
| 198 | { |
| 199 | qDebug(log) << "CConnectVnc::OnInit()"; |
| 200 | int nRet = 0; |
| 201 | |
| 202 | if(m_pPara->GetIce()) |
| 203 | nRet = IceInit(); |
| 204 | else { |
| 205 | #ifdef HAVE_LIBSSH |
| 206 | if(m_pPara->m_Proxy.GetUsedType() == CParameterProxy::TYPE::SSHTunnel) { |
| 207 | nRet = SSHInit(); |
| 208 | if(nRet) return OnInitReturnValue::Fail; // error |
| 209 | return OnInitReturnValue::UseOnProcess; |
| 210 | } |
| 211 | #endif |
| 212 | nRet = SocketInit(); |
| 213 | } |
| 214 | if(nRet) return OnInitReturnValue::Fail; // error |
| 215 | // Don't use OnProcess (qt event loop) |
| 216 | return OnInitReturnValue::NotUseOnProcess; |
| 217 | } |
| 218 | |
| 219 | int CBackendVnc::IceInit() |
| 220 | { |
nothing calls this directly
no test coverage detected