mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-06 17:53:23 +08:00
refs #140 , adjust sample for DBus marshalling / unmarshalling in order to test "tupel-ized" classes
* Added further DBus tests * Crossover from refs #85 , removed dependency from generator adaptor and XML files, as this will not work anymore in the future * Removed from .pro DBUS_ADAPTORS , DBUS_INTERFACES, QDBUSXML2CPP_INTERFACE_HEADER_FLAGS , QDBUSXML2CPP_ADAPTOR_HEADER_FLAGS * Added interface, as this will be no longer generated * Removed samples no longer required, the sample no represents a framework to test DBus marshalling / unmarshalling
This commit is contained in:
@@ -65,10 +65,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
qDebug() << "1 .. Run testservice to test data transfer" << addressTcp;
|
||||
qDebug() << "1sb. Run testservice via session bus";
|
||||
qDebug() << "2 .. Data context example (via TCP)" << addressTcp;
|
||||
qDebug() << "2sb. Data context example (via session bus)";
|
||||
qDebug() << "3 .. Data context example, only server (via TCP)" << addressTcp;
|
||||
qDebug() << "3sb. Data context example, only server (via session bus)";
|
||||
qDebug() << "----- Change address / port (no validation, do before starting server)";
|
||||
qDebug() << "loop Address to loopback, 127.0.0.1";
|
||||
qDebug() << "ip some IP address, e.g 192.168.100.100";
|
||||
@@ -107,16 +103,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
// start DBus
|
||||
address = QString(useSessionBusForServer ? "session" : addressTcp); // testing with real transfer
|
||||
bool startClient = !mode.startsWith('3');
|
||||
if (mode.contains("sb", Qt::CaseInsensitive)) address = "session";
|
||||
if (mode.startsWith("1"))
|
||||
{
|
||||
mode = "testservice";
|
||||
}
|
||||
else if (mode.startsWith('2') || mode.startsWith('3'))
|
||||
{
|
||||
mode = "context";
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
@@ -142,17 +133,13 @@ int main(int argc, char *argv[])
|
||||
args << ip;
|
||||
args << port;
|
||||
}
|
||||
if (startClient) BlackMiscTest::ServiceTool::startNewProcess(executable, args, &a);
|
||||
BlackMiscTest::ServiceTool::startNewProcess(executable, args, &a);
|
||||
|
||||
// run tests
|
||||
if (mode == "testservice")
|
||||
{
|
||||
BlackMiscTest::ServiceTool::dataTransferTestServer(dBusServer);
|
||||
}
|
||||
else if (mode == "context")
|
||||
{
|
||||
BlackMiscTest::ServiceTool::contextTestServer(dBusServer);
|
||||
}
|
||||
|
||||
// loop
|
||||
return a.exec();
|
||||
@@ -167,10 +154,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
BlackMiscTest::ServiceTool::dataTransferTestClient(address);
|
||||
}
|
||||
else if (cmdlineArgs.contains("context", Qt::CaseInsensitive))
|
||||
{
|
||||
BlackMiscTest::ServiceTool::contextTestClient(address);
|
||||
}
|
||||
|
||||
// loop
|
||||
return a.exec();
|
||||
|
||||
Reference in New Issue
Block a user