feat: send xml answer

This commit is contained in:
semenov
2024-08-15 15:30:22 +03:00
parent f7ebfcca5f
commit 6878eb0697
41 changed files with 1499 additions and 876 deletions

View File

@@ -36,6 +36,28 @@ void DataParser::CreateXML(QList<FileData> fileDataList)
file.close();
}
void DataParser::CreateAuthMessage(ClientAutorization *auth)
{
QFile file(tempName);
file.open(QIODevice::WriteOnly);
QXmlStreamWriter xmlWriter(&file);
xmlWriter.setAutoFormatting(true);
xmlWriter.writeStartDocument();
xmlWriter.writeStartElement("ClientAutorization");
xmlWriter.writeAttribute("Login",auth->Login);
xmlWriter.writeAttribute("Password",auth->Password);
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
xmlWriter.writeEndDocument();
file.close();
}
void DataParser::CreateServerSettings(QString address, QString port)
{
QFile file(settingsName);
@@ -80,6 +102,10 @@ ServerSettings *DataParser::GetServerSettings()
if(name == "Address"){
settings->Address = value;
}
if(name == "Port"){