Ejemplo n.º 1
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);
}
Ejemplo n.º 2
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);
}
Ejemplo n.º 3
0
void SnoopDump::load(VXml xml)
{
  SnoopProcess::load(xml);

  filePath = xml.getStr("filePath", filePath);
  linkType = xml.getInt("linkType", linkType);
}
Ejemplo n.º 4
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);
}
Ejemplo n.º 5
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);
}
Ejemplo n.º 6
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"));
}
Ejemplo n.º 7
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;
}
void SnoopInterface::load(VXml xml)
{
	index = xml.getInt("index", index);
	name = xml.getStr("name", name);
	description = xml.getStr("description", description);
}
Ejemplo n.º 9
0
void BypassHttpProxy::load(VXml xml)
{
  VHttpProxy::load(xml);
  blockMsg = xml.getStr("blockMsg", blockMsg).toLatin1();
  hostMgr.load(xml.gotoChild("hostMgr"));
}