mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: send xml answer
This commit is contained in:
@@ -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"){
|
||||
|
||||
Reference in New Issue
Block a user