X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=HomeScreenAppFrameworkBinderAGL%2Fsrc%2Fhomescreenappframeworkbinderagl.cpp;h=125dba5a59ca91bad31ba1173fc544df403005e0;hb=09f2f0036f122e49aa49e6c446d723850192a725;hp=91df6f7530018a5900f8b7d2a70b69544b1c119d;hpb=f9e65355cede6829b94b3c0e0e435ed775630913;p=staging%2FHomeScreen.git diff --git a/HomeScreenAppFrameworkBinderAGL/src/homescreenappframeworkbinderagl.cpp b/HomeScreenAppFrameworkBinderAGL/src/homescreenappframeworkbinderagl.cpp index 91df6f7..125dba5 100644 --- a/HomeScreenAppFrameworkBinderAGL/src/homescreenappframeworkbinderagl.cpp +++ b/HomeScreenAppFrameworkBinderAGL/src/homescreenappframeworkbinderagl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ HomeScreenAppFrameworkBinderAgl::HomeScreenAppFrameworkBinderAgl(QObject *parent QDBusConnection::sessionBus(), 0); -#ifdef __arm__ +#ifdef HAVE_IVI_LAYERMANAGEMENT_API QString runnables = mp_dBusAfmUserProxy->runnables("{\"dummy\": \"entry\"}"); qDebug("runnables: %s", runnables.toStdString().c_str()); @@ -51,12 +51,11 @@ HomeScreenAppFrameworkBinderAgl::HomeScreenAppFrameworkBinderAgl(QObject *parent 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"); @@ -82,15 +81,11 @@ QList HomeScreenAppFrameworkBinderAgl::getAvailableApps() 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()); @@ -110,8 +105,7 @@ int HomeScreenAppFrameworkBinderAgl::launchApp(const QString &name) } qDebug("launchApp pid: %d", pid); -#endif -#ifdef __i386__ +#else qDebug("launchApp name: %s", name.toStdString().c_str()); pid = qrand(); #endif