예제 #1
0
void SnoopDump::load(VXml xml)
{
  SnoopProcess::load(xml);

  filePath = xml.getStr("filePath", filePath);
  linkType = xml.getInt("linkType", linkType);
}
예제 #2
0
void SnoopDump::save(VXml xml)
{
  SnoopProcess::save(xml);

  xml.setStr("filePath", filePath);
  xml.setInt("linkType", linkType);
}
예제 #3
0
void SnoopDelay::save(VXml xml)
{
  SnoopProcess::save(xml);

  QString writerName = writer == NULL ? "" : writer->name;
  xml.setStr("writer", writerName);
  xml.setULong("timeout", timeout);
}
예제 #4
0
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);
}
예제 #5
0
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);
}
예제 #6
0
void VLogFile::save(VXml xml)
{
  VLog::save(xml);

  xml.setStr("folder",        folder());
  xml.setStr("fileName",      fileName);
  xml.setBool("closeOnWrite", closeOnWrite);
}
예제 #7
0
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);
}
예제 #8
0
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);
}
예제 #9
0
파일: vxmldoc.cpp 프로젝트: idkwim/vdream90
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;
}
예제 #10
0
void VLogHttp::load(VXml xml)
{
  VLog::load(xml);

  port = xml.getInt("port", port);
  close();
  open();
}
예제 #11
0
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());
}
예제 #12
0
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;
}
예제 #13
0
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);
}
예제 #14
0
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);
}
예제 #15
0
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);
}
예제 #18
0
void VLogStdout::save(VXml xml)
{
  VLog::save(xml);

  xml.setBool("autoFlush", autoFlush);
}
예제 #19
0
void VLogStdout::load(VXml xml)
{
  VLog::load(xml);

  autoFlush = xml.getBool("autoFlush", autoFlush);
}
예제 #20
0
void SnoopAdapter::load(VXml xml)
{
  SnoopPcap::load(xml);

  adapterIndex = xml.getInt("adapterIndex", adapterIndex);
}
예제 #21
0
void SnoopAdapter::save(VXml xml)
{
  SnoopPcap::save(xml);

  xml.setInt("adapterIndex", adapterIndex);
}
예제 #22
0
void BypassHttpProxy::load(VXml xml)
{
  VHttpProxy::load(xml);
  blockMsg = xml.getStr("blockMsg", blockMsg).toLatin1();
  hostMgr.load(xml.gotoChild("hostMgr"));
}
예제 #23
0
void BypassHttpProxy::save(VXml xml)
{
  VHttpProxy::save(xml);
  xml.setStr("blockMsg", blockMsg);
  hostMgr.save(xml.gotoChild("hostMgr"));
}
예제 #24
0
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"));
}
예제 #25
0
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"));
}
예제 #26
0
void VNetClient::save(VXml &xml)
{
  VNet::save(xml);
  if (onceWriteSize != 0) xml.setInt("onceWriteSize", onceWriteSize);
}
예제 #27
0
void VHttpProxy::load(VXml xml)
{
  tcpServer.load(xml.gotoChild("tcpServer"));
  autoOpen = xml.getBool("autoOpen", autoOpen);
}
예제 #28
0
void VHttpProxy::save(VXml xml)
{
  tcpServer.save(xml.gotoChild("tcpServer"));
  xml.setBool("autoOpen", autoOpen);
}
예제 #29
0
void VLogHttp::save(VXml xml)
{
  VLog::save(xml);

  xml.setInt("port", port);
}
예제 #30
0
void VNetClient::load(VXml &xml)
{
  VNet::load(xml);
  onceWriteSize = xml.getInt("onceWriteSize", onceWriteSize);
}