X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=homescreen%2Fsrc%2Fapplicationlauncher.cpp;h=559a93ca7738dfe98e7ffcb4605ce3d3206d64fd;hb=0d3a0050cd3d35dbda51931134bd81460a1d12b2;hp=7b825bb6fc4a41c66d87f0685dc034fd01663fab;hpb=620ed99557cf2842426a17f4bfc48c4639efbf4b;p=apps%2Fhomescreen.git diff --git a/homescreen/src/applicationlauncher.cpp b/homescreen/src/applicationlauncher.cpp index 7b825bb..559a93c 100644 --- a/homescreen/src/applicationlauncher.cpp +++ b/homescreen/src/applicationlauncher.cpp @@ -17,22 +17,15 @@ #include "applicationlauncher.h" +#include "afm_user_daemon_proxy.h" + #include -ApplicationLauncher::ApplicationLauncher(QObject *parent) - : QObject(parent), - mp_dBusAppFrameworkProxy() -{ - qDebug("D-Bus: connect to org.agl.homescreenappframeworkbinder /AppFramework"); - mp_dBusAppFrameworkProxy = new org::agl::appframework("org.agl.homescreenappframeworkbinder", - "/AppFramework", - QDBusConnection::sessionBus(), - 0); -} +extern org::AGL::afm::user *afm_user_daemon_proxy; -ApplicationLauncher::~ApplicationLauncher() +ApplicationLauncher::ApplicationLauncher(QObject *parent) + : QObject(parent) { - delete mp_dBusAppFrameworkProxy; } int ApplicationLauncher::launch(const QString &application) @@ -40,12 +33,13 @@ int ApplicationLauncher::launch(const QString &application) int result = -1; qDebug() << "launch" << application; - result = mp_dBusAppFrameworkProxy->launchApp(application); + result = afm_user_daemon_proxy->start(application).value().toInt(); qDebug() << "pid:" << result; if (result > 1) { setCurrent(application); } + return result; }