QDBusConnection::sessionBus(),
0);
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
QString runnables = mp_dBusAfmUserProxy->runnables("{\"dummy\": \"entry\"}");
qDebug("runnables: %s", runnables.toStdString().c_str());
QJsonObject appObject = appsArray[i].toObject();
AppInfo appInfo;
appInfo.read(appObject);
- qDebug("name %s", appInfo.name.toStdString().c_str());
+ qDebug("name %s", appInfo.name().toStdString().c_str());
m_apps.append(appInfo);
}
-#endif
-#ifdef __i386__
+#else
// for the simulation
/*AppInfo ai;
ai.setName("org.test.app1");
int HomeScreenAppFrameworkBinderAgl::launchApp(const QString &name)
{
int pid = -1;
-#ifdef __arm__
+#ifdef HAVE_IVI_LAYERMANAGEMENT_API
qDebug("launchApp name: %s", name.toStdString().c_str());
QString jsonLaunch = "{\"id\":\"" + name + "\", \"mode\":\"local\"}";
qDebug("jsonLaunch %s", jsonLaunch.toStdString().c_str());
- QString runIdString = mp_dBusAfmUserProxy->start(jsonLaunch);
- qDebug("runIdString %s", runIdString.toStdString().c_str());
- int runid = runIdString.toInt();
-
- QString stateString = mp_dBusAfmUserProxy->state(runIdString);
+ QString stateString = mp_dBusAfmUserProxy->once(jsonLaunch);
qDebug("stateString %s", stateString.toStdString().c_str());
QJsonDocument jsonResponse = QJsonDocument::fromJson(stateString.toUtf8());
}
qDebug("launchApp pid: %d", pid);
-#endif
-#ifdef __i386__
+#else
qDebug("launchApp name: %s", name.toStdString().c_str());
pid = qrand();
#endif