diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-05-12 21:52:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2017-05-12 21:52:36 +0000 |
commit | 73837973a94aaae5128953fc69835447face8d98 (patch) | |
tree | 8dd31ce52f9794fd7aa016ab6b04f594d68e2001 | |
parent | e297dedb9d88a4ff88c0dd7848f4a0b3630cf71c (diff) | |
parent | 0d3a0050cd3d35dbda51931134bd81460a1d12b2 (diff) |
Merge "ApplicationLauncher: use single afm_user_daemon"
-rw-r--r-- | homescreen/src/applicationlauncher.cpp | 20 | ||||
-rw-r--r-- | homescreen/src/applicationlauncher.h | 4 |
2 files changed, 7 insertions, 17 deletions
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 <QtCore/QDebug> -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; } diff --git a/homescreen/src/applicationlauncher.h b/homescreen/src/applicationlauncher.h index f4066e5..a31e663 100644 --- a/homescreen/src/applicationlauncher.h +++ b/homescreen/src/applicationlauncher.h @@ -19,8 +19,6 @@ #define APPLICATIONLAUNCHER_H #include <QtCore/QObject> -#include <include/appframework.hpp> -#include <appframework_proxy.h> class ApplicationLauncher : public QObject { @@ -28,7 +26,6 @@ class ApplicationLauncher : public QObject Q_PROPERTY(QString current READ current WRITE setCurrent NOTIFY currentChanged) public: explicit ApplicationLauncher(QObject *parent = NULL); - ~ApplicationLauncher(); QString current() const; @@ -41,7 +38,6 @@ public slots: void setCurrent(const QString ¤t); private: - org::agl::appframework *mp_dBusAppFrameworkProxy; QString m_current; }; |