Migrates remaining services and plugins to generated rtiddsgen API
Converts accessor calls to plain member access across the residual service set.
This commit is contained in:
104 files changed
+2424
-2430
No files matched your search
+92
-92
@@ -146,7 +146,7 @@ void NomTests::tryCreateHQ()
|
||||
qint64 expiryTime = currentTime + Settings::expiryIntervalMSec();
|
||||
NotificationManagement::NomNotification notif;
|
||||
|
||||
notif.title(tr("HQ Reports ").toStdString());
|
||||
notif.title = tr("HQ Reports ").toStdString();
|
||||
|
||||
// format: "[Open HQ Report Dialog](//flmHQReport/party=3&folder=51&file=12)"
|
||||
// Open HQ Report Dialog : this text link will display on notification and is clickable
|
||||
@@ -161,24 +161,24 @@ void NomTests::tryCreateHQ()
|
||||
QString linkName = QStringLiteral("Open HQ Report Dialog");
|
||||
QString content = QStringLiteral("[%1](//flmHQReport/?party=%2&folder=%3&file=%4)");
|
||||
content = content.arg(linkName).arg(partyId).arg(folderId).arg(fileId);
|
||||
notif.content(content.toStdString());
|
||||
notif.timeStamp(currentTime);
|
||||
notif.expiryTime(expiryTime);
|
||||
notif.content = content.toStdString();
|
||||
notif.timeStamp = currentTime;
|
||||
notif.expiryTime = expiryTime;
|
||||
|
||||
notif.priority(static_cast<NotificationManagement::Priority_def::type>(Settings::notificationPriority()));
|
||||
notif.processedPriority(NotificationManagement::Priority_def::Highest);
|
||||
notif.exerciseId(m_exerciseId);
|
||||
notif.priority = static_cast<NotificationManagement::Priority_def::type>(Settings::notificationPriority());
|
||||
notif.processedPriority = NotificationManagement::Priority::Highest;
|
||||
notif.exerciseId = m_exerciseId;
|
||||
|
||||
for (const auto &userId : m_opmDtc->getOperatorsByOperatorRight(OperatorRights::FileManagementFilesEdit))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(userId);
|
||||
addr.isRead(false);
|
||||
addr.addressId = userId;
|
||||
addr.isRead = false;
|
||||
QString name = QStringLiteral("Operator ") + QString::number(userId);
|
||||
addr.name(name.toStdString());
|
||||
addr.addressType(NotificationManagement::AddressType_def::Operator);
|
||||
addr.addressSubId(userId+10);
|
||||
notif.recipientIds().push_back(addr);
|
||||
addr.name = name.toStdString();
|
||||
addr.addressType = NotificationManagement::AddressType::Operator;
|
||||
addr.addressSubId = userId+10;
|
||||
notif.recipientIds.push_back(addr);
|
||||
}
|
||||
|
||||
// NotificationManagement::Address addrSender;
|
||||
@@ -189,7 +189,7 @@ void NomTests::tryCreateHQ()
|
||||
// notif.sender(addrSender);
|
||||
|
||||
NotificationManagement::CreateNotificationRequest notifReq;
|
||||
notifReq.notification(notif);
|
||||
notifReq.notification = notif;
|
||||
|
||||
if (!m_ftc->createNotificationRequest(notifReq, this))
|
||||
ERROR_LOG(m_logger) << "Error requesting create Notification data";
|
||||
@@ -204,15 +204,15 @@ void NomTests::tryReadReceipt()
|
||||
m_dtc->waitForHistoricalDataNomNotification();
|
||||
NotificationManagement::NomNotification data = m_dtc->nomNotification(m_notificationId);
|
||||
|
||||
NotificationManagement::Address recipientAddress = data.recipientIds().front();
|
||||
NotificationManagement::Address recipientAddress = data.recipientIds.front();
|
||||
//NotificationManagement::Address recipientAddress = data.recipientIds().at(2);
|
||||
NotificationManagement::ReadReceiptRequest request;
|
||||
request.addressId(recipientAddress.id());
|
||||
request.operatorId(recipientAddress.addressId());
|
||||
request.workstationId(0);
|
||||
request.addressId = recipientAddress.id;
|
||||
request.operatorId = recipientAddress.addressId;
|
||||
request.workstationId = 0;
|
||||
|
||||
request.notificationIds({m_notificationId});
|
||||
request.processed(true);
|
||||
request.notificationIds = {m_notificationId};
|
||||
request.processed = true;
|
||||
|
||||
INFO_LOG(m_logger) << "trying to send CreateNotificationRequest";
|
||||
if (!m_ftc->readReceiptRequest(request, this))
|
||||
@@ -258,24 +258,24 @@ void NomTests::tryGetAllNotifications()
|
||||
for (const NomNotification ¬if : m_dtc->nomNotifications())
|
||||
{
|
||||
// needed for Test 11 tryGetNotification
|
||||
m_notificationId = notif.id();
|
||||
m_notificationId = notif.id;
|
||||
|
||||
INFO_LOG(m_logger) << "Nom(" << notif.id() << ") :"
|
||||
<< " title:" << notif.title()
|
||||
<< " content:" << notif.content()
|
||||
<< " timeStamp:" << notif.timeStamp()
|
||||
<< " priority:" << notif.priority()
|
||||
<< " processed: " << notif.processed()
|
||||
<< " processedTime: " << notif.processTime()
|
||||
<< " processPrio: " << notif.processedPriority()
|
||||
<< " recipient count:" << notif.recipientIds().size();
|
||||
INFO_LOG(m_logger) << "Nom(" << notif.id << ") :"
|
||||
<< " title:" << notif.title
|
||||
<< " content:" << notif.content
|
||||
<< " timeStamp:" << notif.timeStamp
|
||||
<< " priority:" << notif.priority
|
||||
<< " processed: " << notif.processed
|
||||
<< " processedTime: " << notif.processTime
|
||||
<< " processPrio: " << notif.processedPriority
|
||||
<< " recipient count:" << notif.recipientIds.size();
|
||||
|
||||
INFO_LOG(m_logger) << "SenderAddress(" << notif.sender().id() << ") :"
|
||||
<< " name: " << notif.sender().name()
|
||||
<< ", addressId: " << notif.sender().addressId()
|
||||
<< ", addressSubId: " << notif.sender().addressSubId()
|
||||
<< ", addressSubSubId: " << notif.sender().addressSubSubId()
|
||||
<< ", addressType: " << notif.sender().addressType();
|
||||
INFO_LOG(m_logger) << "SenderAddress(" << notif.sender.id << ") :"
|
||||
<< " name: " << notif.sender.name
|
||||
<< ", addressId: " << notif.sender.addressId
|
||||
<< ", addressSubId: " << notif.sender.addressSubId
|
||||
<< ", addressSubSubId: " << notif.sender.addressSubSubId
|
||||
<< ", addressType: " << notif.sender.addressType;
|
||||
}
|
||||
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
@@ -299,40 +299,40 @@ void NomTests::tryGetNotification()
|
||||
m_dtc->waitForHistoricalDataNomNotification();
|
||||
NotificationManagement::NomNotification notif = m_dtc->nomNotification(m_notificationId);
|
||||
|
||||
if (notif.id() <= 0)
|
||||
if (notif.id <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error receiving data for notificationId " << m_notificationId << " returnVal:" << notif.id();
|
||||
ERROR_LOG(m_logger) << "Error receiving data for notificationId " << m_notificationId << " returnVal:" << notif.id;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG(m_logger) << "NomNotification(" << notif.id() << ") :"
|
||||
<< " title:" << notif.title()
|
||||
<< " content:" << notif.content()
|
||||
<< " timeStamp:" << notif.timeStamp()
|
||||
<< " priority:" << notif.priority()
|
||||
<< " processed: " << notif.processed()
|
||||
<< " processedTime: " << notif.processTime()
|
||||
<< " processPrio: " << notif.processedPriority()
|
||||
<< " recipient count:" << notif.recipientIds().size();
|
||||
INFO_LOG(m_logger) << "NomNotification(" << notif.id << ") :"
|
||||
<< " title:" << notif.title
|
||||
<< " content:" << notif.content
|
||||
<< " timeStamp:" << notif.timeStamp
|
||||
<< " priority:" << notif.priority
|
||||
<< " processed: " << notif.processed
|
||||
<< " processedTime: " << notif.processTime
|
||||
<< " processPrio: " << notif.processedPriority
|
||||
<< " recipient count:" << notif.recipientIds.size();
|
||||
|
||||
for (const NotificationManagement::Address &addr : notif.recipientIds())
|
||||
for (const NotificationManagement::Address &addr : notif.recipientIds)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Recipient(" << addr.id() << ") :"
|
||||
<< " name: " << addr.name()
|
||||
<< ", addressId: " << addr.addressId()
|
||||
<< ", addressSubId: " << addr.addressSubId()
|
||||
<< ", addressSubSubId: " << addr.addressSubSubId()
|
||||
<< ", addressType: " << addr.addressType()
|
||||
<< ", isRead: " << addr.isRead();
|
||||
INFO_LOG(m_logger) << "Recipient(" << addr.id << ") :"
|
||||
<< " name: " << addr.name
|
||||
<< ", addressId: " << addr.addressId
|
||||
<< ", addressSubId: " << addr.addressSubId
|
||||
<< ", addressSubSubId: " << addr.addressSubSubId
|
||||
<< ", addressType: " << addr.addressType
|
||||
<< ", isRead: " << addr.isRead;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "SenderAddress(" << notif.sender().id() << ") :"
|
||||
<< " name: " << notif.sender().name()
|
||||
<< ", addressId: " << notif.sender().addressId()
|
||||
<< ", addressSubId: " << notif.sender().addressSubId()
|
||||
<< ", addressSubSubId: " << notif.sender().addressSubSubId()
|
||||
<< ", addressType: " << notif.sender().addressType();
|
||||
INFO_LOG(m_logger) << "SenderAddress(" << notif.sender.id << ") :"
|
||||
<< " name: " << notif.sender.name
|
||||
<< ", addressId: " << notif.sender.addressId
|
||||
<< ", addressSubId: " << notif.sender.addressSubId
|
||||
<< ", addressSubSubId: " << notif.sender.addressSubSubId
|
||||
<< ", addressType: " << notif.sender.addressType;
|
||||
}
|
||||
|
||||
if (m_testId == 0)
|
||||
@@ -442,15 +442,15 @@ void NomTests::onReceiveNotificationChanged(const NomNotification &data, DataMod
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
INFO_LOG(m_logger) << "*** NomNotification added received. notificationId:" << data.id();
|
||||
INFO_LOG(m_logger) << "*** NomNotification added received. notificationId:" << data.id;
|
||||
break;
|
||||
|
||||
case DataModification::eModified:
|
||||
INFO_LOG(m_logger) << "*** NomNotification modified received. notificationId:" << data.id();
|
||||
INFO_LOG(m_logger) << "*** NomNotification modified received. notificationId:" << data.id;
|
||||
break;
|
||||
|
||||
case DataModification::eRemoved:
|
||||
INFO_LOG(m_logger) << "*** NomNotification removed received. notificationId:" << data.id();
|
||||
INFO_LOG(m_logger) << "*** NomNotification removed received. notificationId:" << data.id;
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -466,47 +466,47 @@ void NomTests::getCreateNotificationRequestData(CreateNotificationRequest &data)
|
||||
qint64 expiryTime = currentTime + 100 * 1000;
|
||||
NotificationManagement::NomNotification notif;
|
||||
|
||||
notif.title("TestNotificationCreate");
|
||||
notif.content("Dies ist ein Test mit Content");
|
||||
notif.timeStamp(currentTime);
|
||||
notif.expiryTime(expiryTime);
|
||||
notif.priority(NotificationManagement::Priority_def::High);
|
||||
notif.processedPriority(NotificationManagement::Priority_def::Low);
|
||||
notif.exerciseId(m_exerciseId);
|
||||
notif.title = "TestNotificationCreate";
|
||||
notif.content = "Dies ist ein Test mit Content";
|
||||
notif.timeStamp = currentTime;
|
||||
notif.expiryTime = expiryTime;
|
||||
notif.priority = NotificationManagement::Priority::High;
|
||||
notif.processedPriority = NotificationManagement::Priority::Low;
|
||||
notif.exerciseId = m_exerciseId;
|
||||
|
||||
for (int i=10; i< 24; i++)
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(i);
|
||||
addr.isRead(false);
|
||||
addr.addressId = i;
|
||||
addr.isRead = false;
|
||||
QString name = QStringLiteral("Operator ") + QString::number(i);
|
||||
addr.name(name.toStdString());
|
||||
addr.addressType(NotificationManagement::AddressType_def::Operator);
|
||||
addr.addressSubId(i+10);
|
||||
notif.recipientIds().push_back(addr);
|
||||
addr.name = name.toStdString();
|
||||
addr.addressType = NotificationManagement::AddressType::Operator;
|
||||
addr.addressSubId = i+10;
|
||||
notif.recipientIds.push_back(addr);
|
||||
}
|
||||
|
||||
NotificationManagement::Address wsAddr;
|
||||
wsAddr.addressId(302);
|
||||
wsAddr.isRead(false);
|
||||
wsAddr.addressId = 302;
|
||||
wsAddr.isRead = false;
|
||||
QString name = QStringLiteral("Workstation 2 ");
|
||||
wsAddr.name(name.toStdString());
|
||||
wsAddr.addressType(NotificationManagement::AddressType_def::Workstation);
|
||||
notif.recipientIds().push_back(wsAddr);
|
||||
wsAddr.name = name.toStdString();
|
||||
wsAddr.addressType = NotificationManagement::AddressType::Workstation;
|
||||
notif.recipientIds.push_back(wsAddr);
|
||||
|
||||
NotificationManagement::Address addrSender;
|
||||
addrSender.addressId(ParticipantManagement::Offset);
|
||||
addrSender.name(QStringLiteral("svcParticipantManagement ").toStdString());
|
||||
addrSender.addressType(NotificationManagement::AddressType_def::Service);
|
||||
notif.sender(addrSender);
|
||||
addrSender.addressId = ParticipantManagement::Offset;
|
||||
addrSender.name = QStringLiteral("svcParticipantManagement ").toStdString();
|
||||
addrSender.addressType = NotificationManagement::AddressType::Service;
|
||||
notif.sender = addrSender;
|
||||
|
||||
data.notification(notif);
|
||||
data.notification = notif;
|
||||
} // end of getCreateNotificationRequestData()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool NomTests::onCompareCreatedData(NomNotification &data)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "start onCompareCreatedData() for id :" << data.id();
|
||||
DEBUG_LOG(m_logger) << "start onCompareCreatedData() for id :" << data.id;
|
||||
|
||||
// Vergleicht die zurueckgelesen Datan mit den statischen create Daten
|
||||
|
||||
@@ -514,14 +514,14 @@ bool NomTests::onCompareCreatedData(NomNotification &data)
|
||||
|
||||
getCreateNotificationRequestData(createData);
|
||||
|
||||
if (createData.notification().title() != data.title())
|
||||
if (createData.notification.title != data.title)
|
||||
return false;
|
||||
|
||||
if (createData.notification().priority() != data.priority())
|
||||
if (createData.notification.priority != data.priority)
|
||||
return false;
|
||||
if (createData.notification().content() != data.content())
|
||||
if (createData.notification.content != data.content)
|
||||
return false;
|
||||
if (createData.notification().processedPriority() != data.processedPriority())
|
||||
if (createData.notification.processedPriority != data.processedPriority)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user