void SnoopDump::load(VXml xml) { SnoopProcess::load(xml); filePath = xml.getStr("filePath", filePath); linkType = xml.getInt("linkType", linkType); }
void SnoopDump::save(VXml xml) { SnoopProcess::save(xml); xml.setStr("filePath", filePath); xml.setInt("linkType", linkType); }
void SnoopDelay::save(VXml xml) { SnoopProcess::save(xml); QString writerName = writer == NULL ? "" : writer->name; xml.setStr("writer", writerName); xml.setULong("timeout", timeout); }
void VLogFile::load(VXml xml) { VLog::load(xml); QString _folder = xml.getStr("folder", folder()); setFolder(_folder); fileName = xml.getStr("fileName", fileName); closeOnWrite = xml.getBool("closeOnWrite", closeOnWrite); }
void SnoopDelay::load(VXml xml) { SnoopProcess::load(xml); QString writerName = xml.getStr("writer", ""); if (writerName != "") writer = (SnoopCapture*)(((VGraph*)owner)->objectList.findByName(writerName)); timeout = xml.getULong("timeout", timeout); }
void VLogFile::save(VXml xml) { VLog::save(xml); xml.setStr("folder", folder()); xml.setStr("fileName", fileName); xml.setBool("closeOnWrite", closeOnWrite); }
void VSslServer::load(VXml xml) { VTcpServer::load(xml); methodType = xml.getInt("methodType", (int)methodType); certificatePath = xml.getStr("certificatePath", certificatePath); defaultKeyCrtFileName = xml.getStr("defaultKeyCrtFileName", defaultKeyCrtFileName); processConnectMessage = xml.getBool("processConnectMessage", processConnectMessage); }
void VSslServer::save(VXml xml) { VTcpServer::save(xml); xml.setInt("methodType", (int)methodType); xml.setStr("certificatePath", certificatePath); xml.setStr("defaultKeyCrtFileName", defaultKeyCrtFileName); xml.setBool("processConnectMessage", processConnectMessage); }
VXml VXmlDoc::root() { //QDomElement element = this->documentElement(); // gilgil temp 2012.05.31 //VXml res = *((VXml*)&element); VXml res = QDomDocument::documentElement(); #ifdef _DEBUG if (res.isNull()) { LOG_WARN("root is NULL"); } #endif // _DEBUG return res; }
void VLogHttp::load(VXml xml) { VLog::load(xml); port = xml.getInt("port", port); close(); open(); }
void MainWindow::save(VXml xml) { { VXml coordXml = xml.gotoChild("coord"); QRect rect = geometry(); coordXml.setInt("left", rect.left()); coordXml.setInt("top", rect.top()); coordXml.setInt("width", rect.width()); coordXml.setInt("height", rect.height()); } xml.setBool("showLog", ui->actionShowLog->isChecked()); xml.setBool("alwaysOnTop", ui->actionAlwaysOnTop->isChecked()); xml.setBool("wordWrap", ui->actionWordWrap->isChecked()); }
QObject* VFactory::createObjectByDefaultDoc(const QString& path) { VXmlDoc& doc = VXmlDoc::instance(); VXml xml = doc.root().findChilds(path); if (xml.isNull()) return NULL; QString className = xml.getStr("_class", ""); if (className == "") { return NULL; } VObject* obj = dynamic_cast<VObject*>(VFactory::instance().createObjectByClassName(className)); if (obj == NULL) { return NULL; } obj->load(xml); return obj; }
void SnoopWinDivert::load(VXml xml) { SnoopCapture::load(xml); filter = xml.getStr("filter", filter); priority = (UINT16)xml.getInt("priority", (int)priority); layer = (DIVERT_LAYER)xml.getInt("layer", (int)layer); flags = (UINT64)xml.getInt("flags", (int)flags); queueLen = (UINT64)xml.getInt("queueLen", (int)queueLen); queueTime = (UINT64)xml.getInt("queueTime", (int)queueTime); autoCorrectChecksum = xml.getBool("autoCorrectChecksum", autoCorrectChecksum); }
void SnoopWinDivert::save(VXml xml) { SnoopCapture::save(xml); xml.setStr("filter", filter); xml.setInt("priority", (int)priority); xml.setInt("layer", (int)layer); xml.setInt("flags", (int)flags); xml.setInt("queueLen", (int)queueLen); xml.setInt("queueTime", (int)queueTime); xml.setBool("autoCorrectChecksum", autoCorrectChecksum); }
void MainWindow::load(VXml xml) { { VXml coordXml = xml.findChild("coord"); if (!coordXml.isNull()) { QRect rect = geometry(); rect.setLeft ((coordXml.getInt("left", 0))); rect.setTop ((coordXml.getInt("top", 0))); rect.setWidth ((coordXml.getInt("width", 640))); rect.setHeight((coordXml.getInt("height", 480))); setGeometry(rect); } } ui->actionShowLog->setChecked(xml.getBool("showLog", ui->actionShowLog->isChecked())); ui->actionAlwaysOnTop->setChecked(xml.getBool("alwaysOnTop", ui->actionAlwaysOnTop->isChecked())); ui->actionWordWrap->setChecked(xml.getBool("wordWrap", ui->actionWordWrap->isChecked())); }
void SnoopInterface::save(VXml xml) { xml.setInt("index", index); xml.setStr("name", name); xml.setStr("description", description); }
void SnoopInterface::load(VXml xml) { index = xml.getInt("index", index); name = xml.getStr("name", name); description = xml.getStr("description", description); }
void VLogStdout::save(VXml xml) { VLog::save(xml); xml.setBool("autoFlush", autoFlush); }
void VLogStdout::load(VXml xml) { VLog::load(xml); autoFlush = xml.getBool("autoFlush", autoFlush); }
void SnoopAdapter::load(VXml xml) { SnoopPcap::load(xml); adapterIndex = xml.getInt("adapterIndex", adapterIndex); }
void SnoopAdapter::save(VXml xml) { SnoopPcap::save(xml); xml.setInt("adapterIndex", adapterIndex); }
void BypassHttpProxy::load(VXml xml) { VHttpProxy::load(xml); blockMsg = xml.getStr("blockMsg", blockMsg).toLatin1(); hostMgr.load(xml.gotoChild("hostMgr")); }
void BypassHttpProxy::save(VXml xml) { VHttpProxy::save(xml); xml.setStr("blockMsg", blockMsg); hostMgr.save(xml.gotoChild("hostMgr")); }
void Widget::save(VXml xml) { { VXml coordXml = xml.gotoChild("coord"); QRect rect = geometry(); coordXml.setInt("left", rect.left()); coordXml.setInt("top", rect.top()); coordXml.setInt("width", rect.width()); coordXml.setInt("height", rect.height()); } xml.setInt("showHexa", (int)ui->chkShowHexa->checkState()); xml.setInt("sendHexa", (int)ui->chkSendHexa->checkState()); xml.setInt("echo", (int)ui->chkEcho->checkState()); xml.setInt("echoBroadcast", (int)ui->chkEchoBroadcast->checkState()); xml.setInt("currentIndex", ui->tabOption->currentIndex()); xml.setStr("tcpPort", ui->leTcpPort->text()); xml.setStr("udpPort", ui->leUdpPort->text()); xml.setStr("sslPort", ui->leSslPort->text()); xml.setStr("sendText", ui->pteSend->toPlainText()); { VXml sizesXml = xml.gotoChild("sizes"); QList<int> sizes = ui->splitter->sizes(); QString strList; strList.clear(); foreach (int size, sizes) strList += QString::number(size) + ","; strList = strList.left(strList.count() - 1); sizesXml.setStr("splitter", strList); } tcpServer.save(xml.gotoChilds("netClient/tcpServer")); udpServer.save(xml.gotoChilds("netClient/udpServer")); sslServer.save(xml.gotoChilds("netClient/sslServer")); }
void Widget::load(VXml xml) { { VXml coordXml = xml.findChild("coord"); if (!coordXml.isNull()) { QRect rect = geometry(); rect.setLeft ((coordXml.getInt("left", 0))); rect.setTop ((coordXml.getInt("top", 0))); rect.setWidth ((coordXml.getInt("width", 640))); rect.setHeight((coordXml.getInt("height", 480))); setGeometry(rect); } } ui->chkShowHexa->setCheckState((Qt::CheckState)xml.getInt("showHexa", (int)ui->chkShowHexa->checkState())); ui->chkSendHexa->setCheckState((Qt::CheckState)xml.getInt("sendHexa", (int)ui->chkSendHexa->checkState())); ui->chkEcho->setCheckState((Qt::CheckState)xml.getInt("echo", (int)ui->chkEcho->checkState())); ui->chkEchoBroadcast->setCheckState((Qt::CheckState)xml.getInt("echoBroadcast", (int)ui->chkEchoBroadcast->checkState())); ui->tabOption->setCurrentIndex(xml.getInt("currentIndex", 0)); ui->leTcpPort->setText(xml.getStr("tcpPort", ui->leTcpPort->text())); ui->leUdpPort->setText(xml.getStr("udpPort", ui->leUdpPort->text())); ui->leSslPort->setText(xml.getStr("sslPort", ui->leSslPort->text())); ui->pteSend->insertPlainText(xml.getStr("sendText", ui->pteSend->toPlainText())); { VXml sizesXml = xml.findChild("sizes"); QList<int> sizes; if (!sizesXml.isNull()) { QStringList strList = sizesXml.getStr("splitter").split(","); foreach (QString s, strList) sizes << s.toInt(); ui->splitter->setSizes(sizes); } } tcpServer.load(xml.gotoChilds("netClient/tcpServer")); udpServer.load(xml.gotoChilds("netClient/udpServer")); sslServer.load(xml.gotoChilds("netClient/sslServer")); }
void VNetClient::save(VXml &xml) { VNet::save(xml); if (onceWriteSize != 0) xml.setInt("onceWriteSize", onceWriteSize); }
void VHttpProxy::load(VXml xml) { tcpServer.load(xml.gotoChild("tcpServer")); autoOpen = xml.getBool("autoOpen", autoOpen); }
void VHttpProxy::save(VXml xml) { tcpServer.save(xml.gotoChild("tcpServer")); xml.setBool("autoOpen", autoOpen); }
void VLogHttp::save(VXml xml) { VLog::save(xml); xml.setInt("port", port); }
void VNetClient::load(VXml &xml) { VNet::load(xml); onceWriteSize = xml.getInt("onceWriteSize", onceWriteSize); }