Commit 5c08cab6 authored by Martin Straka's avatar Martin Straka

Updated code for using of new message envelope class

parent 5f1cff0a
......@@ -37,6 +37,7 @@
#include "src/io/filesystem.h"
#include "ios/src/url_opener.h"
#include "src/models/accountmodel.h"
#include "src/qml_interaction/message_envelope.h"
#include "src/sqlite/file_db_container.h"
#include "src/sqlite/message_db_container.h"
#include "src/net/xml_layer.h"
......@@ -873,7 +874,7 @@ bool Files::parseAndShowXmlData(enum MsgInfo::ZfoType type, QString *idStr,
QXmlStreamReader xml;
XmlLayer xmlLayer;
Messages::Message msg;
MsgEnvelope msg;
QList<Files::File> fileList;
QList<Messages::Event> eventList;
......@@ -919,65 +920,65 @@ bool Files::parseAndShowXmlData(enum MsgInfo::ZfoType type, QString *idStr,
QString html = divStart;
html += "<h3>" + QObject::tr("General") + "</h3>";
html += strongInfoLine(QObject::tr("Subject"), msg.dmAnnotation);
QString size = QString::number(msg.dmAttachmentSize);
html += strongInfoLine(QObject::tr("Subject"), msg.dmAnnotation());
QString size = QString::number(msg.dmAttachmentSize());
html += strongInfoLine(QObject::tr("Attachment size"),
(size == "0") ? "&lt;1 KB" : "~" + size + " KB");
html += strongInfoLine(QObject::tr("Personal delivery"),
(msg.dmPersonalDelivery) ? QObject::tr("Yes") : QObject::tr("No"));
(msg.dmPersonalDelivery()) ? QObject::tr("Yes") : QObject::tr("No"));
html += strongInfoLine(QObject::tr("Delivery by fiction"),
(msg.dmAllowSubstDelivery) ? QObject::tr("Yes") : QObject::tr("No"));
(msg.dmAllowSubstDelivery()) ? QObject::tr("Yes") : QObject::tr("No"));
html += "<h3>" + QObject::tr("Sender") + "</h3>";
html += strongInfoLine(QObject::tr("Databox ID"), msg.dbIDSender);
html += strongInfoLine(QObject::tr("Name"), msg.dmSender);
html += strongInfoLine(QObject::tr("Address"),msg.dmSenderAddress);
html += strongInfoLine(QObject::tr("Databox ID"), msg.dbIDSender());
html += strongInfoLine(QObject::tr("Name"), msg.dmSender());
html += strongInfoLine(QObject::tr("Address"),msg.dmSenderAddress());
html += "<h3>" + QObject::tr("Recipient") + "</h3>";
html += strongInfoLine(QObject::tr("Databox ID"), msg.dbIDRecipient);
html += strongInfoLine(QObject::tr("Name"), msg.dmRecipient);
html += strongInfoLine(QObject::tr("Address"),msg.dmRecipientAddress);
if (!msg.dmToHands.isEmpty()) {
html += strongInfoLine(QObject::tr("Databox ID"), msg.dbIDRecipient());
html += strongInfoLine(QObject::tr("Name"), msg.dmRecipient());
html += strongInfoLine(QObject::tr("Address"),msg.dmRecipientAddress());
if (!msg.dmToHands().isEmpty()) {
html += strongInfoLine(QObject::tr("To hands"),
msg.dmToHands);
msg.dmToHands());
}
QString tmpHtml;
if (!msg.dmSenderIdent.isEmpty()) {
if (!msg.dmSenderIdent().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Our file mark"),
msg.dmSenderIdent);
msg.dmSenderIdent());
}
if (!msg.dmSenderRefNumber.isEmpty()) {
if (!msg.dmSenderRefNumber().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Our reference number"),
msg.dmSenderRefNumber);
msg.dmSenderRefNumber());
}
if (!msg.dmRecipientIdent.isEmpty()) {
if (!msg.dmRecipientIdent().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Your file mark"),
msg.dmRecipientIdent);
msg.dmRecipientIdent());
}
if (!msg.dmRecipientRefNumber.isEmpty()) {
if (!msg.dmRecipientRefNumber().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Your reference number"),
msg.dmRecipientRefNumber);
msg.dmRecipientRefNumber());
}
if (!msg.dmLegalTitleLaw.isEmpty()) {
if (!msg.dmLegalTitleLaw().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Law"),
msg.dmLegalTitleLaw);
msg.dmLegalTitleLaw());
}
if (!msg.dmLegalTitleYear.isEmpty()) {
if (!msg.dmLegalTitleYear().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Year"),
msg.dmLegalTitleYear);
msg.dmLegalTitleYear());
}
if (!msg.dmLegalTitleSect.isEmpty()) {
if (!msg.dmLegalTitleSect().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Section"),
msg.dmLegalTitleSect);
msg.dmLegalTitleSect());
}
if (!msg.dmLegalTitlePar.isEmpty()) {
if (!msg.dmLegalTitlePar().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Paragraph"),
msg.dmLegalTitlePar);
msg.dmLegalTitlePar());
}
if (!msg.dmLegalTitlePoint.isEmpty()) {
if (!msg.dmLegalTitlePoint().isEmpty()) {
tmpHtml += strongInfoLine(QObject::tr("Letter"),
msg.dmLegalTitlePoint);
msg.dmLegalTitlePoint());
}
if (!tmpHtml.isEmpty()) {
html += "<h3>" + QObject::tr("Additional info") + "</h3>";
......@@ -987,14 +988,14 @@ bool Files::parseAndShowXmlData(enum MsgInfo::ZfoType type, QString *idStr,
html += "<h3>" + QObject::tr("Message state") + "</h3>";
html += strongInfoLine(QObject::tr("Delivery time"),
dateTimeStrFromDbFormat(
dateTimeStrToUTCDbFormat(msg.dmDeliveryTime),
dateTimeStrToUTCDbFormat(msg.dmDeliveryTime()),
DATETIME_QML_FORMAT));
html += strongInfoLine(QObject::tr("Accetance time"),
dateTimeStrFromDbFormat(
dateTimeStrToUTCDbFormat(msg.dmAcceptanceTime),
dateTimeStrToUTCDbFormat(msg.dmAcceptanceTime()),
DATETIME_QML_FORMAT));
html += strongInfoLine(QObject::tr("Status"),
QString::number(msg.dmMessageStatus));
QString::number(msg.dmMessageStatus()));
if (type == MsgInfo::TYPE_DELIVERY_INFO) {
html += "<h3>" + QObject::tr("Events") + "</h3>";
......@@ -1011,26 +1012,26 @@ bool Files::parseAndShowXmlData(enum MsgInfo::ZfoType type, QString *idStr,
// Create body for email
QString body = QObject::tr("ID") + ": ";
body += QString::number(msg.dmID) + "\n";
body += QString::number(msg.dmID()) + "\n";
body += QObject::tr("FROM") + ": ";
body += msg.dmSender + "\n";
body += msg.dmSender() + "\n";
body += QObject::tr("TO") + ": ";
body += msg.dmRecipient + "\n";
body += msg.dmRecipient() + "\n";
body += QObject::tr("DELIVERED") + ": ";
body += dateTimeStrFromDbFormat(
dateTimeStrToUTCDbFormat(msg.dmAcceptanceTime),
dateTimeStrToUTCDbFormat(msg.dmAcceptanceTime()),
DATETIME_QML_FORMAT)
+ "\n\n---\n";
body += QObject::tr("This email has been generated with Datovka "
"application based on a data message (%1) delivered "
"to databox.").arg(msg.dmID);
"to databox.").arg(msg.dmID());
body += "\n";
if (idStr != Q_NULLPTR) {
*idStr = QString::number(msg.dmID);
*idStr = QString::number(msg.dmID());
}
if (annotation != Q_NULLPTR) {
*annotation = msg.dmAnnotation;
*annotation = msg.dmAnnotation();
}
if (msgDescrHtml != Q_NULLPTR) {
*msgDescrHtml = html;
......
......@@ -132,64 +132,6 @@ public:
*/
void deleteExpiredMessagesFromDbs(int days);
class Message {
public:
Message(void)
: dmID(-1), dmSender(), dmSenderAddress(), dmSenderType(),
dmRecipient(), dmRecipientAddress(), dmAmbiguousRecipient(),
dmSenderOrgUnit(), dmSenderOrgUnitNum(), dbIDRecipient(),
dmRecipientOrgUnit(), dmRecipientOrgUnitNum(), dmToHands(),
dmAnnotation(), dmRecipientRefNumber(), dmSenderRefNumber(),
dmRecipientIdent(), dmSenderIdent(), dmLegalTitleLaw(),
dmLegalTitleYear(), dmLegalTitleSect(), dmLegalTitlePar(),
dmLegalTitlePoint(), dmPersonalDelivery(false),
dmAllowSubstDelivery(false), dmQTimestamp(),
dmDeliveryTime(), dmAcceptanceTime(), dmMessageStatus(-1),
dmAttachmentSize(-1), dmType(), _dmMessageType(-1),
_dmDownloadDate(), _dmCustomData(),
_dmAttachDownloaded(false), _dmReadLocally(false)
{
}
qint64 dmID;
QString dbIDSender;
QString dmSender;
QString dmSenderAddress;
QString dmSenderType;
QString dmRecipient;
QString dmRecipientAddress;
QString dmAmbiguousRecipient;
QString dmSenderOrgUnit;
QString dmSenderOrgUnitNum;
QString dbIDRecipient;
QString dmRecipientOrgUnit;
QString dmRecipientOrgUnitNum;
QString dmToHands;
QString dmAnnotation;
QString dmRecipientRefNumber;
QString dmSenderRefNumber;
QString dmRecipientIdent;
QString dmSenderIdent;
QString dmLegalTitleLaw;
QString dmLegalTitleYear;
QString dmLegalTitleSect;
QString dmLegalTitlePar;
QString dmLegalTitlePoint;
bool dmPersonalDelivery;
bool dmAllowSubstDelivery;
QString dmQTimestamp;
QString dmDeliveryTime;
QString dmAcceptanceTime;
int dmMessageStatus;
int dmAttachmentSize;
QString dmType;
int _dmMessageType;
QString _dmDownloadDate;
QString _dmCustomData;
bool _dmAttachDownloaded;
bool _dmReadLocally;
};
class Event {
public:
QString dmEventTime;
......
......@@ -119,7 +119,7 @@ QString DbWrapper::createAccountInfoStringForQml(
*/
bool DbWrapper::insertMessageListToDb(const QString &userName,
enum MessageDb::MessageType messageType,
const QList<Messages::Message> &messages,
const QList<MsgEnvelope> &messages,
QList<qint64> &messageChangedStatusList, QString &txt,
QList<qint64> &listOfNewMsgIds)
/* ========================================================================= */
......@@ -138,34 +138,37 @@ bool DbWrapper::insertMessageListToDb(const QString &userName,
int msgs = messages.count();
msgDb->beginTransaction();
for (int i = 0; i < msgs; ++i) {
bool hasFiles;
int msgStatus =
msgDb->getMessageStatusFromDb(messages.at(i).dmID, hasFiles);
msgDb->getMessageStatusFromDb(messages.at(i).dmID(), hasFiles);
// -1 = message is not in the database, mesasge is new
if (-1 == msgStatus) {
newMsgs++;
if (!msgDb->insertOrUpdateMessageEnvelopeInDb(messages.at(i))) {
txt = tr("Message %1 envelope insertion failed!").
arg(messages.at(i).dmID);
arg(messages.at(i).dmID());
} else {
// New message envelope has been saved into
// database. Append message id to list
// of complete messages to be downloaded.
listOfNewMsgIds.append(messages.at(i).dmID);
listOfNewMsgIds.append(messages.at(i).dmID());
}
} else {
if (!msgDb->updateMessageEnvelopeInDb(messages.at(i))) {
txt = tr("Message %1 envelope update failed!").
arg(messages.at(i).dmID);
arg(messages.at(i).dmID());
}
if (isSentMessage) {
if (msgStatus != messages.at(i).dmMessageStatus && hasFiles) {
messageChangedStatusList.append(messages.at(i).dmID);
if (msgStatus != messages.at(i).dmMessageStatus() && hasFiles) {
messageChangedStatusList.append(messages.at(i).dmID());
}
}
}
}
msgDb->commitTransaction();
if (!isSentMessage) {
......@@ -181,7 +184,7 @@ bool DbWrapper::insertMessageListToDb(const QString &userName,
}
bool DbWrapper::insertCompleteMessageToDb(const QString &userName,
Messages::Message &msg, QList<Files::File> &fileList, QString &txt)
MsgEnvelope &msg, QList<Files::File> &fileList, QString &txt)
{
bool ret = true;
......@@ -215,17 +218,17 @@ bool DbWrapper::insertCompleteMessageToDb(const QString &userName,
/* Update message envelope data in messages database */
if (ret) {
msg._dmReadLocally = true;
msg._dmAttachDownloaded = true;
msg._setDmReadLocally(true);
msg._setDmAttachDownloaded(true);
if (!msgDb->insertOrUpdateMessageEnvelopeInDb(msg)) {
txt = tr("Message %1 envelope update failed!").
arg(msg.dmID);
arg(msg.dmID());
ret = ret * false;
}
}
if (ret) {
msgDb->setAttachmentDownloaded(msg.dmID, true);
msgDb->setAttachmentDownloaded(msg.dmID(), true);
}
txt = tr("Message has been downloaded");
......
......@@ -26,6 +26,7 @@
#include <QObject>
#include "src/qml_interaction/message_envelope.h"
#include "src/sqlite/message_db_container.h"
#include "src/sqlite/file_db_container.h"
......@@ -125,7 +126,7 @@ public:
*/
bool insertMessageListToDb(const QString &userName,
enum MessageDb::MessageType messageType,
const QList<Messages::Message> &messages,
const QList<MsgEnvelope> &messages,
QList<qint64> &messageChangedStatusList, QString &txt,
QList<qint64> &listOfNewMsgIds);
......@@ -139,7 +140,7 @@ public:
* @return true if success.
*/
bool insertCompleteMessageToDb(const QString &userName,
Messages::Message &msg, QList<Files::File> &fileList,
MsgEnvelope &msg, QList<Files::File> &fileList,
QString &txt);
/*!
......
......@@ -31,6 +31,7 @@
#include "src/models/messagemodel.h"
#include "src/net/isds_wrapper.h"
#include "src/net/xml_layer.h"
#include "src/qml_interaction/message_envelope.h"
#include "src/settings.h"
#include "src/worker/emitter.h"
#include "src/worker/task_change_password.h"
......@@ -465,21 +466,21 @@ void IsdsWrapper::sendMessage(const QString &userName,
return;
}
Messages::Message msg;
MsgEnvelope msg;
/* Fill message envelope */
msg.dmAnnotation = dmAnnotation;
msg.dmLegalTitleLaw = dmLegalTitleLaw;
msg.dmLegalTitleYear = dmLegalTitleYear;
msg.dmLegalTitleSect = dmLegalTitleSect;
msg.dmLegalTitlePar = dmLegalTitlePar;
msg.dmLegalTitlePoint = dmLegalTitlePoint;
msg.dmToHands = dmToHands;
msg.dmRecipientRefNumber = dmRecipientRefNumber;
msg.dmRecipientIdent = dmRecipientIdent;
msg.dmSenderRefNumber = dmSenderRefNumber;
msg.dmSenderIdent = dmSenderIdent;
msg.dmAllowSubstDelivery = dmAllowSubstDelivery;
msg.dmPersonalDelivery =dmPersonalDelivery;
msg.setDmAnnotation(dmAnnotation);
msg.setDmLegalTitleLaw(dmLegalTitleLaw);
msg.setDmLegalTitleYear(dmLegalTitleYear);
msg.setDmLegalTitleSect(dmLegalTitleSect);
msg.setDmLegalTitlePar(dmLegalTitlePar);
msg.setDmLegalTitlePoint(dmLegalTitlePoint);
msg.setDmToHands(dmToHands);
msg.setDmRecipientRefNumber(dmRecipientRefNumber);
msg.setDmRecipientIdent(dmRecipientIdent);
msg.setDmSenderRefNumber(dmSenderRefNumber);
msg.setDmSenderIdent(dmSenderIdent);
msg.setDmAllowSubstDelivery(dmAllowSubstDelivery);
msg.setDmPersonalDelivery(dmPersonalDelivery);
int totalAttachmentSizeKBs = 0;
QList<Files::File> attachList;
......@@ -502,16 +503,16 @@ void IsdsWrapper::sendMessage(const QString &userName,
attachList.append(attach);
}
msg.dmAttachmentSize = totalAttachmentSizeKBs;
msg.setDmAttachmentSize(totalAttachmentSizeKBs);
emit statusBarTextChanged(tr("%1: sending message").arg(userName),
true, true);
/* Send message to all recipients */
foreach (const DataboxModelEntry &db, databoxModel->allEntries()) {
msg.dbIDRecipient = db.dbID();
msg.dmRecipient = db.dbName();
msg.dmRecipientAddress = db.dbAddress();
msg.setDbIDRecipient(db.dbID());
msg.setDmRecipient(db.dbName());
msg.setDmRecipientAddress(db.dbAddress());
TaskSendMessage *task;
task = new (std::nothrow) TaskSendMessage(
m_isdsSession.isdsCtxMap[userName], &m_netLayer,
......
......@@ -223,7 +223,7 @@ QByteArray XmlLayer::xmlCreateMarkMessageAsDownloadedSoapRequest(qint64 msgId)
return xmlCreateSoapEnvelope(xmlContent);
}
QByteArray XmlLayer::xmlCreateSendMessageSoapRequest(const Messages::Message &msg,
QByteArray XmlLayer::xmlCreateSendMessageSoapRequest(const MsgEnvelope &msg,
const QList<Files::File> &fileList, bool dmOVM, bool dmPublishOwnID)
{
QString xmlContent("<CreateMessage xmlns=\"");
......@@ -232,89 +232,89 @@ QByteArray XmlLayer::xmlCreateSendMessageSoapRequest(const Messages::Message &ms
xmlContent.append("<dmEnvelope>");
xmlContent.append("<dmSenderOrgUnit/><dmSenderOrgUnitNum/>");
xmlContent.append("<dbIDRecipient>");
xmlContent.append(msg.dbIDRecipient);
xmlContent.append(msg.dbIDRecipient());
xmlContent.append("</dbIDRecipient>");
xmlContent.append("<dmRecipientOrgUnit/><dmRecipientOrgUnitNum/>");
if (msg.dmToHands.isEmpty()) {
if (msg.dmToHands().isEmpty()) {
xmlContent.append("<dmToHands/>");
} else {
xmlContent.append("<dmToHands>");
xmlContent.append(msg.dmToHands);
xmlContent.append(msg.dmToHands());
xmlContent.append("</dmToHands>");
}
xmlContent.append("<dmAnnotation>");
xmlContent.append(msg.dmAnnotation);
xmlContent.append(msg.dmAnnotation());
xmlContent.append("</dmAnnotation>");
if (msg.dmRecipientRefNumber.isEmpty()) {
if (msg.dmRecipientRefNumber().isEmpty()) {
xmlContent.append("<dmRecipientRefNumber/>");
} else {
xmlContent.append("<dmRecipientRefNumber>");
xmlContent.append(msg.dmRecipientRefNumber);
xmlContent.append(msg.dmRecipientRefNumber());
xmlContent.append("</dmRecipientRefNumber>");
}
if (msg.dmSenderRefNumber.isEmpty()) {
if (msg.dmSenderRefNumber().isEmpty()) {
xmlContent.append("<dmSenderRefNumber/>");
} else {
xmlContent.append("<dmSenderRefNumber>");
xmlContent.append(msg.dmSenderRefNumber);
xmlContent.append(msg.dmSenderRefNumber());
xmlContent.append("</dmSenderRefNumber>");
}
if (msg.dmRecipientIdent.isEmpty()) {
if (msg.dmRecipientIdent().isEmpty()) {
xmlContent.append("<dmRecipientIdent/>");
} else {
xmlContent.append("<dmRecipientIdent>");
xmlContent.append(msg.dmRecipientIdent);
xmlContent.append(msg.dmRecipientIdent());
xmlContent.append("</dmRecipientIdent>");
}
if (msg.dmSenderIdent.isEmpty()) {
if (msg.dmSenderIdent().isEmpty()) {
xmlContent.append("<dmSenderIdent/>");
} else {
xmlContent.append("<dmSenderIdent>");
xmlContent.append(msg.dmSenderIdent);
xmlContent.append(msg.dmSenderIdent());
xmlContent.append("</dmSenderIdent>");
}
if (msg.dmLegalTitleLaw.isEmpty()) {
if (msg.dmLegalTitleLaw().isEmpty()) {
xmlContent.append("<dmLegalTitleLaw/>");
} else {
xmlContent.append("<dmLegalTitleLaw>");
xmlContent.append(msg.dmLegalTitleLaw);
xmlContent.append(msg.dmLegalTitleLaw());
xmlContent.append("</dmLegalTitleLaw>");
}
if (msg.dmLegalTitleYear.isEmpty()) {
if (msg.dmLegalTitleYear().isEmpty()) {
xmlContent.append("<dmLegalTitleYear/>");
} else {
xmlContent.append("<dmLegalTitleYear>");
xmlContent.append(msg.dmLegalTitleYear);
xmlContent.append(msg.dmLegalTitleYear());
xmlContent.append("</dmLegalTitleYear>");
}
if (msg.dmLegalTitleSect.isEmpty()) {
if (msg.dmLegalTitleSect().isEmpty()) {
xmlContent.append("<dmLegalTitleSect/>");
} else {
xmlContent.append("<dmLegalTitleSect>");
xmlContent.append(msg.dmLegalTitleSect);
xmlContent.append(msg.dmLegalTitleSect());
xmlContent.append("</dmLegalTitleSect>");
}
if (msg.dmLegalTitlePar.isEmpty()) {
if (msg.dmLegalTitlePar().isEmpty()) {
xmlContent.append("<dmLegalTitlePar/>");
} else {
xmlContent.append("<dmLegalTitlePar>");
xmlContent.append(msg.dmLegalTitlePar);
xmlContent.append(msg.dmLegalTitlePar());
xmlContent.append("</dmLegalTitlePar>");
}
if (msg.dmLegalTitlePoint.isEmpty()) {
if (msg.dmLegalTitlePoint().isEmpty()) {
xmlContent.append("<dmLegalTitlePoint/>");
} else {
xmlContent.append("<dmLegalTitlePoint>");
xmlContent.append(msg.dmLegalTitlePoint);
xmlContent.append(msg.dmLegalTitlePoint());
xmlContent.append("</dmLegalTitlePoint>");
}
xmlContent.append("<dmPersonalDelivery>");
xmlContent.append((msg.dmPersonalDelivery)?"true":"false");
xmlContent.append((msg.dmPersonalDelivery())?"true":"false");
xmlContent.append("</dmPersonalDelivery>");
xmlContent.append("<dmAllowSubstDelivery>");
xmlContent.append((msg.dmAllowSubstDelivery)?"true":"false");
xmlContent.append((msg.dmAllowSubstDelivery())?"true":"false");
xmlContent.append("</dmAllowSubstDelivery>");
xmlContent.append("<dmOVM>");
......@@ -375,7 +375,7 @@ QByteArray XmlLayer::xmlCreateSoapEnvelope(const QString &xmlContent)
}
bool XmlLayer::completeMessageParse(QXmlStreamReader &xml,
Messages::Message &msg, QList<Files::File> &fileList)
MsgEnvelope &msg, QList<Files::File> &fileList)
{
qDebug("%s()", __func__);
......@@ -394,109 +394,109 @@ bool XmlLayer::completeMessageParse(QXmlStreamReader &xml,
if (xml.tokenType() == QXmlStreamReader::StartElement) {
if (xml.name() == "dmID") {
xml.readNext();
msg.dmID = xml.text().toLongLong();
msg.setDmID(xml.text().toLongLong());
//qDebug() << msg.dmID;
} else
if (xml.name() == "dbIDSender") {
xml.readNext();
msg.dbIDSender = xml.text().toString();
msg.setDbIDSender(xml.text().toString());
} else
if (xml.name() == "dmSender") {
xml.readNext();
msg.dmSender = xml.text().toString();
msg.setDmSender(xml.text().toString());
} else
if (xml.name() == "dmSenderAddress") {
xml.readNext();
msg.dmSenderAddress = xml.text().toString();
msg.setDmSenderAddress(xml.text().toString());
} else
if (xml.name() == "dmSenderType") {
xml.readNext();
msg.dmSenderType = xml.text().toString();
msg.setDmSenderType(xml.text().toInt());
} else
if (xml.name() == "dmRecipient") {
xml.readNext();
msg.dmRecipient = xml.text().toString();
msg.setDmRecipient(xml.text().toString());
} else
if (xml.name() == "dmRecipientAddress") {
xml.readNext();
msg.dmRecipientAddress = xml.text().toString();
msg.setDmRecipientAddress(xml.text().toString());
} else
if (xml.name() == "dmSenderOrgUnit") {
xml.readNext();
msg.dmSenderOrgUnit = xml.text().toString();
msg.setDmSenderOrgUnit(xml.text().toString());
} else
if (xml.name() == "dmSenderOrgUnitNum") {
xml.readNext();
msg.dmSenderOrgUnitNum = xml.text().toString();
msg.setDmSenderOrgUnitNum(xml.text().toString());
} else
if (xml.name() == "dbIDRecipient") {
xml.readNext();
msg.dbIDRecipient = xml.text().toString();
msg.setDbIDRecipient(xml.text().toString());
} else
if (xml.name() == "dmRecipientOrgUnit") {
xml.readNext();
msg.dmRecipientOrgUnit = xml.text().toString();
msg.setDmRecipientOrgUnit(xml.text().toString());
} else
if (xml.name() == "dmRecipientOrgUnitNum") {
xml.readNext();
msg.dmRecipientOrgUnitNum = xml.text().toString();
msg.setDmRecipientOrgUnitNum(xml.text().toString());
} else
if (xml.name() == "dmToHands") {
xml.readNext();
msg.dmToHands = xml.text().toString();
msg.setDmToHands(xml.text().toString());
} else
if (xml.name() == "dmAnnotation") {
xml.readNext();
msg.dmAnnotation = xml.text().toString();
msg.setDmAnnotation(xml.text().toString());
} else
if (xml.name() == "dmRecipientRefNumber") {
xml.readNext();
msg.dmRecipientRefNumber = xml.text().toString();
msg.setDmRecipientRefNumber(xml.text().toString());
} else
if (xml.name() == "dmSenderRefNumber") {
xml.readNext();
msg.dmSenderRefNumber = xml.text().toString();
msg.setDmSenderRefNumber(xml.text().toString());
} else
if (xml.name() == "dmRecipientIdent") {
xml.readNext();
msg.dmRecipientIdent = xml.text().toString();
msg.setDmRecipientIdent(xml.text().toString());