| 177 | } |
| 178 | |
| 179 | const QString COperateTelnet::Description() |
| 180 | { |
| 181 | QString szDescription; |
| 182 | if(!Name().isEmpty()) |
| 183 | szDescription = tr("Name: ") + Name() + "\n"; |
| 184 | |
| 185 | if(!GetTypeName().isEmpty()) |
| 186 | szDescription += tr("Type: ") + GetTypeName() + "\n"; |
| 187 | |
| 188 | if(!Protocol().isEmpty()) { |
| 189 | szDescription += tr("Protocol: ") + Protocol(); |
| 190 | #ifdef DEBUG |
| 191 | if(!GetPlugin()->DisplayName().isEmpty()) |
| 192 | szDescription += " - " + GetPlugin()->DisplayName(); |
| 193 | #endif |
| 194 | szDescription += "\n"; |
| 195 | } |
| 196 | |
| 197 | auto &net = m_Parameters.m_Net; |
| 198 | if(!net.GetHost().isEmpty()) |
| 199 | szDescription += tr("Server address: ") + net.GetHost() |
| 200 | + ":" + QString::number(net.GetPort()) + "\n"; |
| 201 | |
| 202 | CSecurityLevel sl(GetSecurityLevel()); |
| 203 | if(!(GetSecurityLevel() & CSecurityLevel::Level::No)) { |
| 204 | szDescription += tr("Security level: "); |
| 205 | if(!sl.GetUnicodeIcon().isEmpty()) |
| 206 | szDescription += sl.GetUnicodeIcon() + " "; |
| 207 | szDescription += sl.GetString() + "\n"; |
| 208 | } |
| 209 | |
| 210 | if(!GetPlugin()->Description().isEmpty()) |
| 211 | szDescription += tr("Description: ") + GetPlugin()->Description(); |
| 212 | |
| 213 | return szDescription; |
| 214 | } |
| 215 | |
| 216 | void COperateTelnet::slotNewData(const char *buf, int len) |
| 217 | { |
nothing calls this directly
no test coverage detected