summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
620ed99)
Also simplify the implementation.
Change-Id: I3eec730825c358517ea2a6573b9070ec05009c4c
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
#include "applicationlauncher.h"
#include "applicationlauncher.h"
+#include "afm_user_daemon_proxy.h"
+
-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)
}
int ApplicationLauncher::launch(const QString &application)
int result = -1;
qDebug() << "launch" << 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);
}
qDebug() << "pid:" << result;
if (result > 1) {
setCurrent(application);
}
#define APPLICATIONLAUNCHER_H
#include <QtCore/QObject>
#define APPLICATIONLAUNCHER_H
#include <QtCore/QObject>
-#include <include/appframework.hpp>
-#include <appframework_proxy.h>
class ApplicationLauncher : public QObject
{
class ApplicationLauncher : public QObject
{
Q_PROPERTY(QString current READ current WRITE setCurrent NOTIFY currentChanged)
public:
explicit ApplicationLauncher(QObject *parent = NULL);
Q_PROPERTY(QString current READ current WRITE setCurrent NOTIFY currentChanged)
public:
explicit ApplicationLauncher(QObject *parent = NULL);
- ~ApplicationLauncher();
void setCurrent(const QString ¤t);
private:
void setCurrent(const QString ¤t);
private:
- org::agl::appframework *mp_dBusAppFrameworkProxy;